Skip to content

Commit 0010961

Browse files
authored
Fixed the operation mode reading issue
Only translate the lower 4 bits of the register OPR_MODE to the operation mode of the sensor.
1 parent 934b1f5 commit 0010961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_bno055.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def mode(self):
299299
is calculated from accelerometer, gyroscope and the magnetometer.
300300
301301
"""
302-
return self._read_register(_MODE_REGISTER)
302+
return ( self._read_register(_MODE_REGISTER) & 0x00001111 ) # Datasheet Table 4-2
303303

304304
@mode.setter
305305
def mode(self, new_mode):

0 commit comments

Comments
 (0)