Skip to content

Fix ICM42688 bus device hardware type on GEPRC targets#11377

Open
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker:fix-geprc-icm42688-devhw
Open

Fix ICM42688 bus device hardware type on GEPRC targets#11377
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker:fix-geprc-icm42688-devhw

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Mar 1, 2026

User description

Summary

Fix incorrect DEVHW_MPU6000 hardware type constant for ICM42688 gyro registration on IMU1 for two GEPRC targets. The ICM42688 should be registered with DEVHW_ICM42605 (the ICM42605 driver handles both ICM42605 and ICM42688). This was a copy-paste error from the MPU6000 registration line above.

Without this fix, boards populated with ICM42688 chips on IMU1 would fail gyro detection because the ICM42605 driver searches for DEVHW_ICM42605, not DEVHW_MPU6000. The IMU2 registration on line 33 was already correct.

Changes

  • GEPRC_TAKER_H743/target.c line 32: DEVHW_MPU6000DEVHW_ICM42605
  • GEPRCF745_BT_HD/target.c line 32: DEVHW_MPU6000DEVHW_ICM42605

Testing

  • Built GEPRC_TAKER_H743 target successfully (661KB/1792KB flash)
  • Built GEPRCF745_BT_HD target successfully (646KB/960KB flash)
  • Cannot test on hardware (no GEPRC boards available) — requesting hardware testing from maintainers

Code Review

Reviewed with inav-code-review — no issues found. The fix is a single-token change per file, consistent with the already-correct IMU2 registration pattern.


PR Type

Bug fix


Description

  • Corrects ICM42688 hardware type constant from DEVHW_MPU6000 to DEVHW_ICM42605

  • Fixes gyro detection failure on IMU1 for two GEPRC targets

  • Aligns IMU1 registration with already-correct IMU2 pattern


Diagram Walkthrough

flowchart LR
  A["ICM42688 IMU1<br/>DEVHW_MPU6000"] -->|"Incorrect<br/>driver mismatch"| B["Gyro detection fails"]
  C["ICM42688 IMU1<br/>DEVHW_ICM42605"] -->|"Correct<br/>driver match"| D["Gyro detected"]
  E["IMU2 already<br/>DEVHW_ICM42605"] -->|"Pattern now<br/>consistent"| D
Loading

File Walkthrough

Relevant files
Bug fix
target.c
Fix ICM42688 IMU1 hardware type constant                                 

src/main/target/GEPRCF745_BT_HD/target.c

  • Changed ICM42688 IMU1 bus device registration from DEVHW_MPU6000 to
    DEVHW_ICM42605
  • Fixes hardware type mismatch that prevented ICM42605 driver from
    detecting the sensor
  • Aligns with correct IMU2 registration pattern on line 33
+1/-1     
target.c
Fix ICM42688 IMU1 hardware type constant                                 

src/main/target/GEPRC_TAKER_H743/target.c

  • Changed ICM42688 IMU1 bus device registration from DEVHW_MPU6000 to
    DEVHW_ICM42605
  • Fixes hardware type mismatch that prevented ICM42605 driver from
    detecting the sensor
  • Aligns with correct IMU2 registration pattern on line 33
+1/-1     

The ICM42688 gyro on IMU1 was registered with DEVHW_MPU6000 instead
of DEVHW_ICM42605, preventing the ICM42605 driver from detecting it.
Boards populated with ICM42688 chips would fail to detect the primary
gyro. The IMU2 registration was already correct.

Affected targets: GEPRC_TAKER_H743, GEPRCF745_BT_HD

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant