We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a3675 commit b223f6aCopy full SHA for b223f6a
drivers/sensor/lps22hb/lps22hb.c
@@ -56,7 +56,8 @@ static inline void lps22hb_press_convert(struct sensor_value *val,
56
/* Pressure sensitivity is 4096 LSB/hPa */
57
/* Convert raw_val to val in kPa */
58
val->val1 = (raw_val >> 12) / 10;
59
- val->val2 = ((s32_t)((raw_val) & 0x0FFF) * 1000L) >> 12;
+ val->val2 = (raw_val >> 12) % 10 * 100000 +
60
+ (((s32_t)((raw_val) & 0x0FFF) * 100000L) >> 12);
61
}
62
63
static inline void lps22hb_temp_convert(struct sensor_value *val,
0 commit comments