IZU2020 / PQLPS22HB

Dependents:   IZU2020_AVIONICS qqq_izu_main_test IZU2020_AVIONICS Hybrid_OB2021_MAIN

Files at this revision

API Documentation at this revision

Comitter:
tanahashi
Date:
Mon Dec 23 23:59:48 2019 +0000
Parent:
1:e77331b61ce6
Commit message:
fix: short to int

Changed in this revision

PQLPS22HB.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e77331b61ce6 -r b2e1b4e9fdf8 PQLPS22HB.cpp
--- 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)