Minh Nguyen / MPU6050
Revision:
13:23c9db5753c8
Parent:
12:bc6638e00812
Child:
15:11993501be6c
--- a/MPU6050.cpp	Tue Feb 09 23:53:03 2021 +0000
+++ b/MPU6050.cpp	Mon Feb 15 21:48:30 2021 +0000
@@ -157,7 +157,7 @@
     range = range & 0x03;
     temp = this->read(MPU6050_GYRO_CONFIG_REG);
     temp &= ~(3<<3);
-    temp = temp + range<<3;
+    temp = temp + (range<<3);
     this->write(MPU6050_GYRO_CONFIG_REG, temp);
 }