alpha
Login
or
Join now
jmrp.io
/
kleidos
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/jmrplens/kleidos. Kleidos — Hardware BLE password manager for ESP32-S3 (M5StickC Plus2, StickS3, M5Stack Gray, T-Deck, Cardputer)
jmrplens.github.io/kleidos/
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
kleidos
/
src
/
drivers
/
imu
/
at
main
9 files
José M. Requena Plens
Add explicit IMU comms + register read/write self-test
7d ago
d1d5dc8e
bmi270.cpp
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
bmi270.h
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
i_imu.h
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
imu_factory.cpp
Resolve IMU at runtime via a WHO_AM_I probe factory Bring the IMU up to the PMIC/RTC abstraction bar. Add drivers/imu/imu_factory.{h,cpp}: createImu(address) probes the internal I2C bus and returns the matching driver, mirroring createPmic/createRtc. Detection reuses the drivers' identity constants: BMI270 chip-id 0x24 at reg 0x00, MPU6886-family WHO_AM_I 0x19/0x68/0x71 at reg 0x75, and QMI8658 0x05 at reg 0x00 (recognized but unimplemented -> NullImu). A pure classifyImu() carries the decision; concrete instantiation stays compile-gated on the board's IMU_TYPE_* flags (the BMI270 Bosch backend is only linkable where built). The factory never returns nullptr. The IMU is now resolved once at HAL bootstrap and written into the runtime-settable BoardDef::imu slot (mutable), so the ~12 board::get().imu consumers are unchanged. Remove the per-board static IMU instantiation, #include, and .imu wiring from all 9 board_*.cpp files. Add test/drivers/test_imu_factory: exhaustive classifyImu family coverage (all families incl. BMI270/MPU, off-hardware) plus createImu probe wiring driven by a fake I2C bus (QMI8658/unknown/read-fail -> NullImu). Claude-Session: https://claude.ai/code/session_01SV58JXhfxhhc9DC6vdjBo4
1 week ago
imu_factory.h
Resolve IMU at runtime via a WHO_AM_I probe factory Bring the IMU up to the PMIC/RTC abstraction bar. Add drivers/imu/imu_factory.{h,cpp}: createImu(address) probes the internal I2C bus and returns the matching driver, mirroring createPmic/createRtc. Detection reuses the drivers' identity constants: BMI270 chip-id 0x24 at reg 0x00, MPU6886-family WHO_AM_I 0x19/0x68/0x71 at reg 0x75, and QMI8658 0x05 at reg 0x00 (recognized but unimplemented -> NullImu). A pure classifyImu() carries the decision; concrete instantiation stays compile-gated on the board's IMU_TYPE_* flags (the BMI270 Bosch backend is only linkable where built). The factory never returns nullptr. The IMU is now resolved once at HAL bootstrap and written into the runtime-settable BoardDef::imu slot (mutable), so the ~12 board::get().imu consumers are unchanged. Remove the per-board static IMU instantiation, #include, and .imu wiring from all 9 board_*.cpp files. Add test/drivers/test_imu_factory: exhaustive classifyImu family coverage (all families incl. BMI270/MPU, off-hardware) plus createImu probe wiring driven by a fake I2C bus (QMI8658/unknown/read-fail -> NullImu). Claude-Session: https://claude.ai/code/session_01SV58JXhfxhhc9DC6vdjBo4
1 week ago
imu_selftest.h
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
mpu6886.cpp
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
mpu6886.h
Add explicit IMU comms + register read/write self-test Add IImu::selfTest (default reports "no IMU"), implemented in the MPU6886 and BMI270 drivers. It proves the full I2C path in three ordered phases: a WHO_AM_I / chip-id READ, a non-destructive save/write/verify/restore of a safe config register (MPU6886 sample-rate divider 0x19; BMI270 the unused INT2_IO_CTRL pin register 0x54, writable field bits only) to exercise the WRITE path without lasting config drift, and an accel-magnitude data-path check for gravity. Extract the pure pass/fail predicates into imu_selftest.h so both drivers share them and the decision logic stays unit-testable off-hardware (the concrete drivers cannot link natively — MPU6886 needs the RTOS facade, BMI270 the Bosch API), mirroring the classifyImu seam. Add the DEBUG-gated IMURW/IMUSELFTEST console command, native test coverage, and a MAC-verified QA HIL runner.
1 week ago
null_imu.h
Clear SonarCloud maintainability issues in hal/drivers/crypto/vault/platform/web Mechanical/behaviour-preserving fixes (const-correctness, type→auto, byte-buffer→ std::array, param packs, dead stores, cognitive complexity via extracted helpers e.g. pbkdf2DeriveBlock) across hal, drivers, crypto, vault, platform, ota, web, main. No functional/crypto-semantic change. Claude-Session: https://claude.ai/code/session_01Y7Cy1HetRp6TZAUAeekN8X
2 weeks ago