Skip to content

Reading too many bits from OPR_MODE register for determing the operation mode #79

Closed
@GuenterQ

Description

@GuenterQ

Hello friends,

According to Page 56 of the BNO055 datasheet (Rev. 1.7, November 2020), only bit0 - bit3 of OPR_MODE register represent the operation mode of the sensor.

However, in file adafruit_bno055.py, line 302, all of the eight bits are returned as the operation mode, which leads to strange behaviors as reported in #67. There, some physical values such as euler, quaternion etc. are shown as None, because a wrongly translated operation mode is out of range.

Suggestion:
return ( self._read_register(_MODE_REGISTER) & 0b00001111 )

Best Regards
GuenterQ

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