Skip to content

Add support for LSM6DSK320X gyroscope to existing targets#1040

Open
Greypang wants to merge 23 commits intobetaflight:masterfrom
Greypang:A4
Open

Add support for LSM6DSK320X gyroscope to existing targets#1040
Greypang wants to merge 23 commits intobetaflight:masterfrom
Greypang:A4

Conversation

@Greypang
Copy link
Contributor

@Greypang Greypang commented Feb 24, 2026

Add support for LSM6DSK320X gyroscope to existing targets

Summary by CodeRabbit

  • New Features
    • Expanded sensor compatibility by adding LSM6DSK320X accelerometer/gyroscope support across multiple flight controller boards
    • Added BMI270 accelerometer/gyroscope sensor support to select flight controller boards

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Warning

Rate limit exceeded

@Greypang has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between a8783ef and 40ead6d.

📒 Files selected for processing (14)
  • configs/GEPRCF405/config.h
  • configs/GEPRCF405_BT_HD/config.h
  • configs/GEPRCF411SX1280/config.h
  • configs/GEPRCF722/config.h
  • configs/GEPRCF722_BT_HD/config.h
  • configs/GEPRCF722_BT_HD_V3/config.h
  • configs/GEPRCF745_BT_HD/config.h
  • configs/GEPRC_F722_AIO/config.h
  • configs/GEPRC_TAKER_F405AIO/config.h
  • configs/GEPRC_TAKER_G473AIO/config.h
  • configs/GEPRC_TAKER_H743/config.h
  • configs/GEPRC_TAKER_H743MINI/config.h
  • configs/TAKERF722SE/config.h
  • configs/TAKERG4AIO/config.h

Walkthrough

This PR adds preprocessor macros to enable LSM6DSK320X accelerometer/gyroscope support across 14 GEPRC flight controller board configuration files. Some configurations additionally enable BMI270 support. All changes are feature flag additions with no logic modifications.

Changes

Cohort / File(s) Summary
LSM6DSK320X only
configs/GEPRCF405/config.h, configs/GEPRCF405_BT_HD/config.h, configs/GEPRCF411SX1280/config.h, configs/GEPRCF722_BT_HD/config.h, configs/GEPRC_F722_AIO/config.h, configs/TAKERF722SE/config.h
Added USE_ACCGYRO_LSM6DSK320X macro to enable LSM6DSK320X sensor support.
BMI270 and LSM6DSK320X
configs/GEPRCF722/config.h, configs/GEPRCF722_BT_HD_V3/config.h, configs/GEPRCF745_BT_HD/config.h, configs/GEPRC_TAKER_F405AIO/config.h, configs/GEPRC_TAKER_G473AIO/config.h, configs/GEPRC_TAKER_H743/config.h, configs/GEPRC_TAKER_H743MINI/config.h, configs/TAKERG4AIO/config.h
Added both USE_ACCGYRO_BMI270 and USE_ACCGYRO_LSM6DSK320X macros to enable dual sensor support options.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

Ready to merge

Suggested reviewers

  • ot0tot
  • haslinghuis
  • blckmn
  • nerdCopter
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is largely incomplete and does not follow the repository's required template for hardware/target submissions, missing all mandatory sections including hardware compliance, design guidelines adherence, schematics review, hardware testing, and the required checklist. Provide comprehensive description following the template: include manufacturer compliance details, hardware design validation, schematics review status, testing results, and complete the mandatory checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding support for BMI270 and LSM6DSK320X gyroscopes to existing configuration targets, which aligns with all the file modifications shown in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Greypang Greypang changed the title Add support for BMI270 LSM6DSK320X gyroscope to existing targets Add support for LSM6DSK320X gyroscope to existing targets Feb 24, 2026
@ot0tot
Copy link
Contributor

ot0tot commented Feb 24, 2026

I don't think we can add this gyro to targets with GYRO_CLKIN defined, as the LSM6DSK320X does not support gyro clock.

Presumably they are using the same FC footprint, so this will provide a 32kHz clock signal on INT2 which the LSM6DSK320X does not expect. I'm not sure what the behavior will be in this case.

@haslinghuis
Copy link
Member

@ot0tot verified with firmware - GYRO_CLKIN is only used in 426xx driver.

@VitroidFPV
Copy link
Member

Maybe add ifdefs for CLIKIN based on defines for the ICM-42688-P? Not sure what the best approach would be tbh.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants