PLANET-Q LPS22HB Library
Dependents: IZU2020_AVIONICS qqq_izu_main_test IZU2020_AVIONICS Hybrid_OB2021_MAIN
Diff: PQLPS22HB.cpp
- Revision:
- 3:b2e1b4e9fdf8
- Parent:
- 1:e77331b61ce6
--- a/PQLPS22HB.cpp Tue Dec 17 14:18:04 2019 +0000 +++ b/PQLPS22HB.cpp Mon Dec 23 23:59:48 2019 +0000 @@ -38,7 +38,7 @@ cmd[0] = LPS22HB_PRESS_XL; _i2c -> write(_addr, cmd, 1); _i2c -> read(_addr, buff, 3); - *press = (short)(buff[0] | buff[1] << 8 | buff[2] << 16) / 4096.0f; + *press = (int)(buff[0] | buff[1] << 8 | buff[2] << 16) / 4096.0f; } void LPS22HB :: read_temp(float *temp)