Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix modes lists for Euler, quaternion, and magnetic
  • Loading branch information
ViennaMike committed Apr 2, 2021
commit 4c1effd33c67a5b87eba56d1991723dacc1d7e03
6 changes: 3 additions & 3 deletions adafruit_bno055.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def magnetic(self):
"""Gives the raw magnetometer readings in microteslas.
Returns an empty tuple of length 3 when this property has been disabled by the current mode.
"""
if self.mode not in [0x00, 0x03, 0x05, 0x08]:
if self.mode not in [0x00, 0X01, 0x03, 0x05, 0x08]:
return self._magnetic
return (None, None, None)

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

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

Expand Down