drivers: sensor: sht3xd: correct humidity threshold conversion
Original scale factor assumed a maximum humidity of 10^5 percent.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
diff --git a/drivers/sensor/sht3xd/sht3xd_trigger.c b/drivers/sensor/sht3xd/sht3xd_trigger.c
index 262a322..ccb3e83 100644
--- a/drivers/sensor/sht3xd/sht3xd_trigger.c
+++ b/drivers/sensor/sht3xd/sht3xd_trigger.c
@@ -28,9 +28,9 @@
{
u64_t uval;
- /* ret = val * (2^16 -1) / 100000 */
+ /* ret = val * (2^16 -1) / 100 */
uval = (u64_t)val->val1 * 1000000 + val->val2;
- return ((uval * 0xFFFF) / 100000) / 1000000;
+ return ((uval * 0xFFFF) / 100) / 1000000;
}
int sht3xd_attr_set(struct device *dev,