61f065230a
The conversion of the raw sensor value overflows because only a 32 bit multiplication is executed. Fix the issue by promoting the raw sensor value to uint64_t before executing the multiplication. Analysis: The current implementation overflows for all raw values grater than 9544(14-bit). But according to the datasheet the sensor has a maximum resolution of 20-bit. So Multiplying that value with 450.000 would need at least 39 bit to avoid an overflow, hence do it using 64-bit arithmetic. Fixes CID 330657 Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
ltrf216a.c |