You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug which reveals itself on 16 or 32 bit MPUs. RAW acceleration is returned via 2 8-bit registers, but is signed, and 2's complement encoded. Registers are mapped as uint8_t (unsigned 8-bit), which is fine, but they are bitshifted and ORed together and assigned to float variable.
xha << 8 | xla creates xa, but it's type is uint16_t, while it should be int16_t... both can be assigned to float variable, but only second one is valid.
There is a bug which reveals itself on 16 or 32 bit MPUs. RAW acceleration is returned via 2 8-bit registers, but is signed, and 2's complement encoded. Registers are mapped as uint8_t (unsigned 8-bit), which is fine, but they are bitshifted and ORed together and assigned to float variable.
xha << 8 | xla creates xa, but it's type is uint16_t, while it should be int16_t... both can be assigned to float variable, but only second one is valid.
Is:
Should be:
The text was updated successfully, but these errors were encountered: