Fixed lis2dh12 to work on scales above 2G.
Fixed lis2dh12_get_full_scale to actually report the correct scale, by not shifting it.
Value returned by lis2dh12_get_full_scale is utilized for calculation in poll_read and stream_read.
@@ -757,7 +757,7 @@ lis2dh12_get_full_scale(struct sensor_itf *itf, uint8_t *fs)
goto err;
}
- *fs = (reg & LIS2DH12_CTRL_REG4_FS) >> 4;
+ *fs = (reg & LIS2DH12_CTRL_REG4_FS);
return 0;
err:
