Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to decode IEEE754 32-bit floats over CAN #216

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cangen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ Within the `points` member of a NetField object, there is a list of Point object
- `size`, an integer representing the size to be read in bits
- `signed` (optional), boolean representing whether or not the number is signed in two's complement form (`false` by default)
- `endianness` (optional), string representing the byte endianness of the bits being read, either `"big"` or `"little"` (`"big"` by default)
- `format` (optional, not recommended), string representing the final type of the data (`"f32"` by default)
- `format` (optional), string representing the format of the bits (e.g. `divide100`) (blank by default)
- `default_value` (optional, only for Encodable Messages), float representing the default value to be sent before a command is received or when an empty command is received. This is ignored when decoding the Point (`0` by default)
- `ieee754_f32` (optional), boolean indicating if the bits in the Point should be interpreted as an IEEE754 32-bit float. **Be sure to endian swap the float before sending!!** (`false` by default)

#### Sim
Within the `sim` member of a NetField object, there is a single sim object. This object is one of two types, either `sweep` or `enum`. However these types are implied, not written in the JSON, just use them correctly!
Expand Down
Loading