Skip to content

feat(driver): autodetect IMU, add support for SC7U22#7191

Merged
pfeerick merged 14 commits intomainfrom
3djc/rm-imu-handlng
Mar 25, 2026
Merged

feat(driver): autodetect IMU, add support for SC7U22#7191
pfeerick merged 14 commits intomainfrom
3djc/rm-imu-handlng

Conversation

@3djc
Copy link
Copy Markdown
Collaborator

@3djc 3djc commented Mar 18, 2026

This adds generic support for IMU SC7U22 and adds auto detection for RM H7 radios

Review all gyro handling.

needed in 2.12 too

@3djc 3djc changed the title feat(RM): allow several IMU chip with autodetect. Add support for SC7U22 feat(driver): allow several IMU chip with autodetect. Add support for SC7U22 Mar 18, 2026
@pfeerick pfeerick added this to the 2.12.0 milestone Mar 18, 2026
@pfeerick pfeerick changed the title feat(driver): allow several IMU chip with autodetect. Add support for SC7U22 feat(driver): autodetect IMU, add support for SC7U22 Mar 19, 2026
@3djc
Copy link
Copy Markdown
Collaborator Author

3djc commented Mar 19, 2026

I'll work with Raph on this over the week end, we want to improve it

@pfeerick pfeerick marked this pull request as draft March 19, 2026 10:20
@3djc 3djc marked this pull request as ready for review March 21, 2026 12:06
3djc and others added 12 commits March 22, 2026 07:06
Introduce etx_imu_driver_t/etx_imu_t structs separating driver interface
(init/read) from I2C configuration (bus/addr). Board provides an array of
candidates iterated by generic imuDetect(), following the gimbalsDetect()
pattern. Drivers output raw sensor data via etx_imu_data_t struct;
filtering is done generically in gyro.cpp. Replace Gyro class with C-style
functions consistent with the rest of the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

# Conflicts:
#	radio/src/drivers/icm42607C.h
Move lsm6ds_driver.cpp from targets/common/arm/stm32/ to drivers/
alongside the other IMU drivers. Move imu.cpp to hal/. Convert all
three IMU drivers (ICM42607C, SC7U22, LSM6DS) to use HAL i2c_read/
i2c_write instead of stm32-specific I2C functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@raphaelcoeffic raphaelcoeffic force-pushed the 3djc/rm-imu-handlng branch 2 times, most recently from de901e5 to b136fa7 Compare March 22, 2026 07:08
@3djc
Copy link
Copy Markdown
Collaborator Author

3djc commented Mar 22, 2026

Retested ok on existing radio and test hardware.

Would be nice to test on x12s, xlites, but shouldn't defer merge imho

@pfeerick
Copy link
Copy Markdown
Member

I'll see if the x12s user is still around otherwise "community supported" - speak up or we don't know about it - applies 🤪

@pfeerick
Copy link
Copy Markdown
Member

@pfeerick pfeerick merged commit 0ce5c8f into main Mar 25, 2026
20 checks passed
@pfeerick pfeerick deleted the 3djc/rm-imu-handlng branch March 25, 2026 06:19
pfeerick pushed a commit that referenced this pull request Mar 27, 2026
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants