|
|
ad2b599420
|
feat(firmware): BNO055 NDOF IMU driver on I2C1 (Issue #135)
Auto-detected alongside MPU6000. Acts as balance primary when MPU6000
fails, or provides NDOF-fused yaw/pitch when both sensors are present.
- include/bno055.h: full API — bno055_init/read/is_ready/calib_status/
temperature/save_offsets/restore_offsets
- src/bno055.c: I2C1 driver; probes 0x28/0x29, resets via SYS_TRIGGER,
enters NDOF mode; 2-burst 12-byte reads (gyro+euler, LIA+gravity);
Euler/gyro/accel scaling (÷16, ÷16, ÷100); auto-saves offsets to
RTC backup regs BKP0R–BKP6R on first full cal; restores on boot
(bno055_is_ready() returns true immediately); temperature updated 1Hz
- include/config.h: BNO055_BKP_MAGIC = 0xB055CA10
- src/main.c: bno055_init() in I2C probe block (before IWDG); imu_calibrated()
macro dispatches mpu6000_is_calibrated() vs bno055_is_ready();
BNO055 read deferred inside balance gate to avoid stalling main loop;
USB JSON reports bno_cs (calib status) and bno_t (temperature)
- test/test_bno055_data.py: 43 pytest tests (43/43 pass) — calib status
bit extraction, Euler/gyro/accel scaling, burst parsing, offset
round-trip packing, temperature signed-byte encoding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-02 09:40:44 -05:00 |
|