Skip to content

IMUPLUS_MODE and M4G_MODE not properly supported. #75

Closed
@ViennaMike

Description

@ViennaMike

Per the documentation for the BNO055 (section 3.3.3) there are absolute and non-absolute (relative) fusion modes. All 5 of these provide meaningful Euler angle and quaternion outputs, but the code in adafrit_bno055.py does not include IMUPLUS or M4G modes in the mode list to return values and instead always return None's.

Fix needed:
In the code:

@property
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]:
        return self._euler
    return (None, None, None)

the values 0x08 and 0x0A need to be added to the list.
The same two values need to be added to the list in:

@property
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, 0x08, 0x0A]:
        return self._quaternion
    return (None, None, None, None)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions