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
The datasheet says vdd_25 is a 8 bit integer with sign. This means that it could go from -128 to 127.
But in this code, when it is masked with 0x00ff, and then stored in a int16_t it will always store a positive value
After doing some test, when the data stored at the lower byte in EE[0x2433] is above 128, the value should be considered positive in the line 770. Otherwise the calculation will result in incorrect vdd values.
So I assume that vdd_25 has to be considered always as positive, and maybe the datasheet should be fixed.
Indeed this value is always negative. Thus the driver always substracts 256 (two's complement). The driver works properly and the datasheet needs some modification in order to make this clear and avoid confusion.
The datasheet says vdd_25 is a 8 bit integer with sign. This means that it could go from -128 to 127.
But in this code, when it is masked with
0x00ff
, and then stored in aint16_t
it will always store a positive valuemlx90640-library/functions/MLX90640_API.c
Line 766 in f6be7ca
mlx90640-library/functions/MLX90640_API.c
Lines 770 to 771 in f6be7ca
This is easy to fix, but I'm not sure this is a bug or I'm not understanding the code correctly
The text was updated successfully, but these errors were encountered: