The scd4x_channel_get function converts raw word values to struct sensor_value's per the datasheet. The calculation for val2 of a struct sensor_value `val->val2 = ((tmp_val % 0xFFFF) * 1000000) / 0xFFFF;` can overflow the max of int32_t, resulting in an incorrect sensor_value. Fix it by changing the type of tmp_val to int64_t. Signed-off-by: Zach Thomas <zach.thomas1.zt@gmail.com> |
||
|---|---|---|
| .. | ||
| scd4x | ||
| sgp40 | ||
| sht3xd | ||
| sht4x | ||
| shtcx | ||
| sts4x | ||
| CMakeLists.txt | ||
| Kconfig | ||