Library for Bosch Sensortech BMI160 IMU
Fork of BMI160 by
Diff: bmi160.cpp
- Revision:
- 7:9848196cb65e
- Parent:
- 6:9615aa90087d
- Child:
- 8:a89b529b1d96
diff -r 9615aa90087d -r 9848196cb65e bmi160.cpp --- a/bmi160.cpp Thu Dec 15 00:38:04 2016 +0000 +++ b/bmi160.cpp Thu Dec 15 23:46:42 2016 +0000 @@ -74,7 +74,7 @@ rawTemp = ((data[1] << 8) | data[0]); if(rawTemp & 0x8000) { - *temp = (23.0F - (((0xFFFF - rawTemp) + 1)/512.0F)); + *temp = (23.0F - ((0x10000 - rawTemp)/512.0F)); } else {