fix(ORBITH743v2): register ICM40609D under its own hardware type and slot - #11845
fix(ORBITH743v2): register ICM40609D under its own hardware type and slot#11845sensei-hacker wants to merge 1 commit into
Conversation
…slot The second IMU was registered with DEVHW_ICM42605 and descriptor tag 0, so icm40609dGyroDetect/AccDetect could never match it: the ICM42605 driver rejects the ICM40609D WHO_AM_I (0x3B vs 0x42/0x47), and tag 0 collides with the first gyro while gyro_to_use=1 requests tag 1. Register it as DEVHW_ICM40609D with tag 1 and enable USE_IMU_ICM40609D so the dual-gyro selection can actually find the second IMU.
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoFix ORBITH743v2 secondary ICM40609D detection
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
|
Test firmware build ready — commit Download firmware for PR #11845 1 targets built. Find your board's
|
|
RAM / Flash usage vs. base commit None of the representative targets (MATEKF405, MATEKF722, MATEKF765, MATEKH743) were built by this PR — no size comparison to show. See RAM/flash optimization guide for techniques to reduce usage. |
Summary
Fixes ORBITH743v2's second IMU (ICM40609D) being registered under the wrong hardware-type tag, so it could never be detected.
Before (
src/main/target/ORBITH743v2/target.c):After:
And
target.hgains#define USE_IMU_ICM40609D(it was never defined, so the wholeaccgyro_icm40609d.cdriver was compiled out).Why two changes on the one registration line
DEVHW_ICM42605, but the ICM40609D driver'sbusDeviceInit/busDeviceOpenlook upDEVHW_ICM40609D, and the ICM42605 driver's WHO_AM_I check (0x42/0x47) rejects the ICM40609D's 0x3B — so the chip could never match either driver.0, colliding with the first gyro (busdev_icm42688_1, also tag 0). In this target's dual-gyro setupgyro_to_usemaps directly to the descriptor tag (0 = first, 1 = second) — every other true dual-gyro target (FRSKYPILOT, FLYWOOF7DUAL, SKYSTARSH743HD, IFLIGHTF7_TWING) tags the second IMU as1. With tag 0 on both,gyro_to_use=1finds no descriptor at all (GYRO_NONE).Verification
ORBITH743v2builds clean (CI recipe,-DWARNINGS_AS_ERRORS=ON): FLASH1 751267 B / 1792 KB (40.94%).nmonaccgyro_icm40609d.c.objshowsicm40609dAccDetect/icm40609dGyroDetectdefined (both are inside#if defined(USE_IMU_ICM40609D)).gyro_to_use=1→ ICM42605 driver finds no tag-1DEVHW_ICM42605descriptor → falls through → ICM40609D driver matches tag-1DEVHW_ICM40609Ddescriptor → WHO_AM_I 0x3B check → detected.Note on scope (vs original assignment)
The assignment said land on
release/9.1first, then forward-merge tomaintenance-10.x. That is not implementable: the ICM40609D driver (accgyro_icm40609d.c),DEVHW_ICM40609D,ICM40609D_WHO_AM_I_CONST, andUSE_IMU_ICM40609Dall exist only onmaintenance-10.x(commit21bf312d2b, "Add ICM40609D IMU driver") — none are present onrelease/9.1, so this fix cannot compile there. Per user direction this PR targetsmaintenance-10.xonly.