Skip to content

Commit 4c1effd

Browse files
committed
fix modes lists for Euler, quaternion, and magnetic
1 parent e7dc35e commit 4c1effd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_bno055.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def magnetic(self):
362362
"""Gives the raw magnetometer readings in microteslas.
363363
Returns an empty tuple of length 3 when this property has been disabled by the current mode.
364364
"""
365-
if self.mode not in [0x00, 0x03, 0x05, 0x08]:
365+
if self.mode not in [0x00, 0X01, 0x03, 0x05, 0x08]:
366366
return self._magnetic
367367
return (None, None, None)
368368

@@ -388,7 +388,7 @@ def euler(self):
388388
"""Gives the calculated orientation angles, in degrees.
389389
Returns an empty tuple of length 3 when this property has been disabled by the current mode.
390390
"""
391-
if self.mode in [0x09, 0x0B, 0x0C]:
391+
if self.mode in [0x09, 0x0B, 0x0C, 0x08, 0x0A]:
392392
return self._euler
393393
return (None, None, None)
394394

@@ -401,7 +401,7 @@ def quaternion(self):
401401
"""Gives the calculated orientation as a quaternion.
402402
Returns an empty tuple of length 3 when this property has been disabled by the current mode.
403403
"""
404-
if self.mode in [0x09, 0x0B, 0x0C]:
404+
if self.mode in [0x09, 0x0B, 0x0C, 0x08, 0x0A]:
405405
return self._quaternion
406406
return (None, None, None, None)
407407

0 commit comments

Comments
 (0)