Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: interpret analog input values as int16
Both signed and unsigned representations behave like a signed 16-bit integer. In the case of unsigned, the value is limited to the range 0-32767, the former is limited to -32768-32767. As such, treating the values from the terminal as int16 (and thus sign extending them when assigning to RVAL) is the correct way of doing things. This does not handle the MSB representation properly however. That will require more work down the line if we ever decide to support it. For now, users will need to use the unsigned or signed representations for the data to be correctly read.
- Loading branch information