-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raw bytes can be signed or unsigned.
Cast "signed raw bytes" to signed integer first, before casting to float and applying a divider. Example: datatype = 0x92 (1-0-010-010) datatype & 0x80 (bit 8) => signed value datatype & 0x38 (bits 654) => length => 2 bytes datatype & 0x07 (bits 321) => divider => 2 datatype 0x92 value 0xFC18 datatype signed, length 2, divider 2. signed int value -1000: value -10.00
- Loading branch information
Showing
2 changed files
with
34 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters