adafruit / adafruit/Adafruit_CircuitPython_BNO08x

error in _parse_shake_report wrong bit mask

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
41
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Noticed a typo for the shake report. In the SH-2 doc (6.5.32 page 78) it shows the lower 3 bit contain the x,y,z status bits. but the bit mask here has 0x111, it should be 0b111 or likely clearer for a " bool:
shake_bitfield = unpack_from(" 0
```

I don't have CircuitPython, so I don't have any way to test, so I won't do a pull request. What I believe will fix it:
```
def _parse_shake_report(report_bytes: bytearray) -> bool:
shake_bitfield = unpack_from(" 0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in __init__.py around line 302 and compare _parse_shake_report with the SH-2 documentation, section 6.5.32 page 78. Confirm that the mask checks the lower three status bits, then run any available project tests or validation for the BNO08x library. Done means the mask matches the documented bitfield and existing behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.