-
Notifications
You must be signed in to change notification settings - Fork 0
Native bno080 (spi) + bno080i2c implementation in circuitpython v9 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note: You can try this below to make the CI happy, since this is for prototyping and we will not ship firmware without Adafruit explicitly assigning a PID to our product. The quick fix is just to unblock your PR. First Pick a VID:PID that’s not used anywhere else in the repo:
Edit ports/nordic/boards/cionic_sense/mpconfigboard.mk
You should then be able to verify locally:
For the second issue
Your comments in some of your files currently contain unclosed/invalid text that becomes broken Python, so the script exits with error 123:
You can fix this by adding a period and end quotes:
You can test locally after fixing the syntax issue:
|
25ab0c7 to
85281c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR merges native BNO080 SPI and I2C interface modules to CircuitPython v9. The changes implement complete driver support for the BNO080 IMU sensor with both communication protocols and includes various codebase improvements for CI compatibility.
Key changes:
- Added native
bno080module for SPI-based BNO080 communication - Added native
bno080i2cmodule for I2C-based BNO080 communication - Updated build system to support new BNO080 modules with configuration flags
- Various code style and documentation fixes across multiple modules
Reviewed Changes
Copilot reviewed 41 out of 49 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| shared-module/bno080*/ | Complete BNO080 driver implementation for both SPI and I2C protocols |
| shared-bindings/bno080*/ | Python bindings for BNO080 modules with proper API documentation |
| py/circuitpy_*.mk | Build system updates to include new BNO080 modules |
| lib/cionic/ | Orientation math library and utility functions for BNO080 |
| ports/nordic/ | Board-specific configuration for cionic_sense board |
| shared-bindings/digitalio/DigitalInOut.h | Enhanced digital IO with IRQ support |
Comments suppressed due to low confidence (2)
tools/stack-loc-to-pc.py:13
- [nitpick] Adding an empty line at the end of a docstring is unnecessary and inconsistent with Python style conventions. Consider removing this empty line to maintain clean documentation formatting.
offset = re.compile(r"sp, #(\d+)")
shared-module/bno080i2c/BNO080I2C.c:90
- Using 'bzero' is deprecated. Use 'memset(tx, 0, sizeof(tx))' instead for better portability and standards compliance.
mp_printf(&mp_plat_print, "before write: %d\n", mp_hal_ticks_ms());
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merging in
bno080andbno080i2cmodules to main, updated to work with circuitpython v9. Tested using the corresponding branch incionic-circuitpython(https://github.com/cionicwear/cionic-circuitpython/tree/bno080-v9) using the same examples described there:Testing:
footpodexample, was able to get a smoother signal using just SPI bus IMUfootshankpodexample that uses both a SPI and I2C bus IMUALSO: UPDATED CIONIC FORK TO PASS CHECKS:
get_html_theme_pathas suggested in adafruit version