Skip to content

Commit

Permalink
minor update to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpdx committed Oct 21, 2023
1 parent 21e0bf4 commit 65d19ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
31 changes: 1 addition & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,10 @@ transfers.
They contain all card specific objects and PDOs.
- **NOTE:** The cards YAML are simular to CANopen's `.eds` files; they are for
a device type, not a unique device on a CAN network.
- The `beacon.yaml` file defines the beacon definition as all the data is pull
- The `beacon.yaml` file defines the beacon definition as all the data is pulled
strait out the the C3 OD, which is mostly build from all other ODs.
- All the configs are passed to `gen_od_db()` that reads in all configs
cross reference so all OD definition of PDOs match.
- All python-based projects can just import their OreSat OD like:
```python
from oresat_od_db.oresat0_5 import GPS_OD

print(GPS_OD["skytraq"]["latitude"].value)
```
- All ChibiOS-based projects generate their `OD.[c/h]` files by:
```bash
$ oresat-gen-canopennode-od oresat0.5 imu -d path/to/output/dir
```
And use it like:
```c
#include "OD.h"
#include "CANopen.h"
#include <stdint.h>

/** Example function that gets a value from the OD. */
int main(void) {
int16_t gryo_yaw = 0;

// OD is a global provided by CANopen.h
// OD_INDEX_GYROSCOPE and OD_SUBINDEX_GYROSCOPE_YAW are defined in OD.h
OD_entry_t *entry = OD_find(OD, OD_INDEX_GYROSCOPE);

// boolean is a flag to bypass any OD callback functions and read strait
// from the OD
gryo_yaw = OD_get_u8(entry, OD_SUBINDEX_GYROSCOPE_YAW, true);
}
```

## Updating a Config

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ linters = "pycodestyle,pyflakes,pylint,mccabe,mypy,radon"
# C0206: Consider iterating dictionaries with .items()
# R1716: Simplify chained comparison between the operands
# W1514: Using open without explicitly specifying an encoding
ignore = "E402,C901,C0103,E203,R0912,R0915,R901,R901,R0914,C0413,C0206,R1716,W1514"
# R1702: Too many nested blocks
ignore = "E402,C901,C0103,E203,R0912,R0915,R901,R901,R0914,C0413,C0206,R1716,W1514,R1702"
max_line_length = 100

[[tool.pylama.files]]
Expand Down

0 comments on commit 65d19ed

Please sign in to comment.