-
Notifications
You must be signed in to change notification settings - Fork 161
Fix some IMU configurations #792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis set of changes updates multiple board configuration header files. The primary modifications include removing, reformatting, or relocating the Changes
Sequence Diagram(s)Not applicable: changes are limited to configuration macro definitions and formatting. Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
configs/GEPRCF745_BT_HD/config.h (1)
123-123
: Document and guard the newGYRO_COUNT
macro
While introducingGYRO_COUNT
is helpful for multi-IMU support, it’s best practice to (1) wrap it in an#ifndef
/#endif
to avoid accidental redefinition and (2) add a brief comment explaining its purpose. For example:-#define GYRO_COUNT 2 +#ifndef GYRO_COUNT +// Number of gyroscopes enabled on this board (supports multi-IMU setups) +#define GYRO_COUNT 2 +#endifWould you like me to apply this pattern across all board configs and update any related documentation?
configs/JBF7_DJI/config.h (1)
104-104
: Explicitly define the number of gyros
Good addition:GYRO_COUNT
now signals two-IMU support in this board config. Consider adding a brief comment (e.g., Doxygen) above the macro to document its purpose and how it’s consumed by the IMU initialization code.configs/SKYSTARSH7HD/config.h (1)
133-133
: Approve GYRO_COUNT macro additionThe
#define GYRO_COUNT 2
correctly specifies the dual-gyro setup for this board. Please ensure that all gyro-related loops and configurations reference this macro rather than hardcoded values to maintain consistency. As a minor enhancement, consider adding an inline comment to describe its purpose for future maintainers, e.g.:// Number of gyroscope sensors present on SKYSTARSH7HD
configs/IFLIGHT_F405_TWING/config.h (1)
95-97
: Add a descriptive comment for clarity
To improve maintainability, consider adding a brief comment above the macro to explain its purpose. For example:/* Number of gyroscopes connected on this board for multi-IMU support */ #define GYRO_COUNT 2configs/NEUTRONRCF407/config.h (1)
103-105
: Add inline documentation forGYRO_COUNT
Consider adding a brief comment above the macro to explain its purpose and units, for improved maintainability. For example:-#define GYRO_COUNT 2 +#define GYRO_COUNT 2 // number of gyroscope sensors (IMUs) supported by this boardconfigs/NBD_INFINITYAIOV2PRO/config.h (1)
87-87
:❓ Verification inconclusive
Document and verify the new
GYRO_COUNT
macro.Please add an inline comment to clarify that
GYRO_COUNT
specifies the number of gyros for multi-IMU support:+#define GYRO_COUNT 2 // Total number of gyroscope sensors present (for dual-IMU configurations) -#define GYRO_COUNT 2Additionally, ensure that all code in the main Betaflight repository correctly references this new macro. You can verify usage with:
🏁 Script executed:
#!/bin/bash # Search for references to GYRO_COUNT in the codebase rg -n 'GYRO_COUNT' -A2Length of output: 6358
Document and Integrate
GYRO_COUNT
Macro– configs/NBD_INFINITYAIOV2PRO/config.h:87
-#define GYRO_COUNT 2 +#define GYRO_COUNT 2 // Total number of gyroscope sensors present (dual-IMU support)– We ran
rg -n 'GYRO_COUNT' -A2
and only found these macro definitions in board configs—not any references in the core firmware. Please verify that all gyro-related code (array sizes, initialization loops, sensor count checks in IMU/gyro drivers) usesGYRO_COUNT
instead of hard-coded values (e.g. replace any “2” withGYRO_COUNT
where appropriate).
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (34)
configs/AOCODARCH7DUAL/config.h
(1 hunks)configs/CCRCF722D/config.h
(1 hunks)configs/CLRACINGF7/config.h
(1 hunks)configs/DAKEFPVH743/config.h
(1 hunks)configs/DARWINH7DUAL/config.h
(1 hunks)configs/DFR_F722_DUAL_HD/config.h
(1 hunks)configs/EXF722DUAL/config.h
(1 hunks)configs/FLYWOOH743PRO/config.h
(1 hunks)configs/GEPRCF722_BT_HD/config.h
(1 hunks)configs/GEPRCF745_BT_HD/config.h
(1 hunks)configs/HAKRCF722V2/config.h
(1 hunks)configs/IFLIGHT_F405_TWING/config.h
(1 hunks)configs/IFLIGHT_F722_TWING/config.h
(1 hunks)configs/IFLIGHT_H743_AIO_V2/config.h
(1 hunks)configs/IFLIGHT_H7_TWING/config.h
(1 hunks)configs/JBF7/config.h
(1 hunks)configs/JBF7_DJI/config.h
(1 hunks)configs/JHEF722HD/config.h
(1 hunks)configs/JHEH743_HD/config.h
(1 hunks)configs/KONEXH743/config.h
(1 hunks)configs/MAMBAH743_2022B/config.h
(1 hunks)configs/NBD_CRICKETF7V2/config.h
(1 hunks)configs/NBD_GALAXYAIO255/config.h
(1 hunks)configs/NBD_INFINITYAIOV2PRO/config.h
(1 hunks)configs/NEUTRONRCF407/config.h
(1 hunks)configs/NEUTRONRCH743AIO/config.h
(1 hunks)configs/NEUTRONRCH7BT/config.h
(1 hunks)configs/SKYSTARSH7HD/config.h
(1 hunks)configs/SPRACINGF7DUAL/config.h
(1 hunks)configs/SPRACINGH7EF/config.h
(1 hunks)configs/SPRACINGH7EXTREME/config.h
(1 hunks)configs/SUB250REDFOXF722AIO/config.h
(1 hunks)configs/TALONF7FUSION/config.h
(1 hunks)configs/WIZZF7HD/config.h
(1 hunks)
🔇 Additional comments (30)
configs/HAKRCF722V2/config.h (1)
102-102
: Declare number of gyroscopes for dual-IMU support
The added#define GYRO_COUNT 2
explicitly sets up two gyros, aligning withDEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH
. Verify that its placement and naming match other board configs for consistency and seamless multi-IMU integration.configs/NBD_GALAXYAIO255/config.h (1)
102-102
: New macro definition looks good.The
GYRO_COUNT
macro is correctly defined alongsideDEFAULT_GYRO_TO_USE
and aligns with the intended support for two gyros on this board. Ensure that downstream code and documentation reference this constant where needed.configs/JBF7/config.h (1)
104-104
: Explicitly set GYRO_COUNT for dual-IMU support.This addition correctly matches the two gyro EXTI/CS definitions and brings this board in line with the other configs in this PR.
configs/IFLIGHT_F405_TWING/config.h (1)
95-97
: Explicitly set gyro count for dual-IMU support
The new#define GYRO_COUNT 2
correctly specifies that this board uses two gyroscopes, aligning withDEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH
and the intended multi-IMU configuration.configs/NEUTRONRCF407/config.h (1)
103-105
:✅ Verification successful
Verify consistency of
GYRO_COUNT
with other board configs
You added#define GYRO_COUNT 2
to explicitly declare the number of gyros for NEUTRONRCF407. Please ensure that:
- All other board configuration headers that support two IMUs include the same
GYRO_COUNT 2
define.- The sensor initialization and build scripts consume this macro correctly (e.g., adjust array sizes, loops, conditional compilation).
You can run the following to cross-check across configs/ directory:
🏁 Script executed:
rg -n "#define GYRO_COUNT" -R configs/
Length of output: 445
🏁 Script executed:
#!/bin/bash # Search for all GYRO_COUNT definitions across board config headers rg -n "#define GYRO_COUNT" configs/Length of output: 1944
GYRO_COUNT Definition Matches Other Dual-IMU Boards
The#define GYRO_COUNT 2
inconfigs/NEUTRONRCF407/config.h
is now consistent with all other board configs that support two gyros.No further changes required.
configs/AOCODARCH7DUAL/config.h (1)
130-130
: Explicitly define gyro count for dual IMU supportThe new
GYRO_COUNT
macro is correctly set to2
, making the dual-gyro configuration explicit and consistent with other dual-IMU board headers.configs/CCRCF722D/config.h (1)
99-99
: Explicitly define gyro count for dual IMU supportThe
GYRO_COUNT
macro has been correctly introduced with a value of2
. This explicit declaration aligns with the board’s dual-gyro setup and matches other configuration headers.configs/DAKEFPVH743/config.h (1)
138-138
: Explicitly define gyro count for dual IMU supportAdding
#define GYRO_COUNT 2
here makes the dual-gyro arrangement explicit and consistent across all dual-IMU board configs.configs/IFLIGHT_F722_TWING/config.h (1)
105-105
: Explicitly define gyro count for dual IMU supportThe
GYRO_COUNT
macro is correctly set to2
, standardizing the dual-gyro declaration in this board’s header.configs/SPRACINGF7DUAL/config.h (1)
115-115
: Explicitly define gyro count for dual IMU supportIntroducing
GYRO_COUNT
with a value of2
here clearly documents the dual-gyro configuration and keeps it uniform with other headers.configs/NEUTRONRCH7BT/config.h (1)
131-131
: Add GYRO_COUNT macro for dual-gyro support
The new#define GYRO_COUNT 2
explicitly declares two gyros alongsideDEFAULT_GYRO_TO_USE
. Placement, value, and formatting align with other board configs.configs/SUB250REDFOXF722AIO/config.h (1)
102-102
: Add GYRO_COUNT macro for dual-gyro support
This#define GYRO_COUNT 2
correctly followsDEFAULT_GYRO_TO_USE
, making the board’s dual-IMU setup explicit. No issues spotted.configs/WIZZF7HD/config.h (1)
107-107
: Add GYRO_COUNT macro for dual-gyro support
DefiningGYRO_COUNT 2
immediately afterDEFAULT_GYRO_TO_USE
is consistent with the intended dual-gyro configuration. Looks good.configs/IFLIGHT_H7_TWING/config.h (1)
113-113
: Add GYRO_COUNT macro for dual-gyro support
The addition of#define GYRO_COUNT 2
correctly specifies two gyros and mirrors other board headers. Approved.configs/JHEF722HD/config.h (1)
101-101
: Add GYRO_COUNT macro for dual-gyro support
IntroducingGYRO_COUNT 2
here makes the dual-IMU count explicit and aligns with the broader PR. No concerns.configs/DARWINH7DUAL/config.h (1)
116-116
: Explicitly declare dual gyro count
The new macro#define GYRO_COUNT 2
clearly specifies two gyroscopes for this board, aligning with the dual-IMU support added in Betaflight main.configs/JHEH743_HD/config.h (1)
135-135
: Define GYRO_COUNT for dual-IMU configuration
Adding#define GYRO_COUNT 2
makes the number of gyros explicit and matches the multi-IMU setup planned upstream.configs/MAMBAH743_2022B/config.h (1)
136-136
: Add GYRO_COUNT macro to specify two gyros
This define sets the gyro count to 2, ensuring consistency with the dual-sensor configurations across boards.configs/SPRACINGH7EXTREME/config.h (1)
239-239
: Introduce GYRO_COUNT for two gyroscopes
The macro explicitly declaresGYRO_COUNT 2
, supporting the intended dual-IMU feature set without altering existing logic.configs/CLRACINGF7/config.h (1)
127-127
: Explicitly set GYRO_COUNT to 2
DefiningGYRO_COUNT
makes the number of gyroscopes clear and standardizes this across all dual-IMU board configs.configs/IFLIGHT_H743_AIO_V2/config.h (1)
116-116
: Explicitly define number of gyroscopes
Adding#define GYRO_COUNT 2
clearly documents dual-gyro support for this board and aligns with the PR’s objective of standardizing multi-IMU configurations.configs/KONEXH743/config.h (1)
159-159
: Explicitly define number of gyroscopes
The inserted#define GYRO_COUNT 2
afterDEFAULT_GYRO_TO_USE
maintains consistency with other board configs and unambiguously declares dual-gyro support.configs/FLYWOOH743PRO/config.h (1)
131-131
: Explicitly declare dual-gyro support
The addition of#define GYRO_COUNT 2
right afterDEFAULT_GYRO_TO_USE
is consistent with the rest of the PR and makes the gyro count explicit.configs/NBD_CRICKETF7V2/config.h (1)
78-78
: Document number of gyroscopes
Inserting#define GYRO_COUNT 2
explicitly specifies two gyros for this board and aligns with other configurations in the PR.configs/NEUTRONRCH743AIO/config.h (1)
126-126
: ExplicitGYRO_COUNT
definition
Adding#define GYRO_COUNT 2
enhances clarity around supported IMUs and is in line with the uniform updates across board configs.configs/TALONF7FUSION/config.h (1)
95-95
: Explicitly define GYRO_COUNT
Good addition to specify the number of gyros for this dual-gyro board. Improves clarity and ensures downstream code can size arrays and loops correctly.configs/SPRACINGH7EF/config.h (1)
295-295
: Explicitly define GYRO_COUNT
This macro clearly indicates two gyros are present on the SPRACINGH7EF. Matches the existingUSE_MULTI_GYRO
setting and will help centralize gyro-count logic.configs/DFR_F722_DUAL_HD/config.h (1)
107-107
: Explicitly define GYRO_COUNT
Adds a clear marker for two gyros on the DFR_F722_DUAL_HD board. This aligns with the physical hardware and aids maintainability.configs/EXF722DUAL/config.h (1)
104-104
: Explicitly define GYRO_COUNT
Good to have the number of gyros defined consistently. This will simplify multi-gyro support in the core firmware.configs/GEPRCF722_BT_HD/config.h (1)
102-102
:❓ Verification inconclusive
Add
GYRO_COUNT
for multi-IMU support – verify consistencyThe new
#define GYRO_COUNT 2
explicitly declares the number of gyroscopes and aligns with the intent to support dual-IMU configurations. Please ensure that:
- All other board config headers also define
GYRO_COUNT
.- Downstream code (array allocations, loops, IMU init paths) is updated to consume this macro.
Run this script to detect any config headers missing
GYRO_COUNT
:
🏁 Script executed:
#!/bin/bash # Description: Find config.h files that lack the GYRO_COUNT definition rg -L '#define GYRO_COUNT' configsLength of output: 1812
All board config headers define
GYRO_COUNT
– verify downstream IMU usageI ran the provided script to look for any
config.h
missing the#define GYRO_COUNT
and found none. Next, please review the IMU-related code to ensure it consumes this new macro:
- Array allocations for gyro data use
GYRO_COUNT
rather than a hard-coded value.- Initialization loops and IMU setup paths iterate based on
GYRO_COUNT
.
Just need to make sure it covers all FC that have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🔭 Outside diff range comments (1)
configs/NEUTRONRCF745VTX/config.h (1)
153-153
: 💡 Verification agent🧩 Analysis chain
Verify asymmetric gyro alignment configuration.
The configuration defines
GYRO_1_ALIGN CW270_DEG
but lacks a correspondingGYRO_2_ALIGN
definition. Please verify if GYRO_2 requires a specific alignment or if it uses the default orientation.
🏁 Script executed:
#!/bin/bash # Description: Check if GYRO_2_ALIGN is defined elsewhere or if other dual-gyro configs have asymmetric alignment # Expected: Understand if this is intentional or missing echo "Checking for any GYRO_2_ALIGN in current config:" rg "GYRO_2_ALIGN" configs/NEUTRONRCF745VTX/ echo -e "\nChecking other dual-gyro configs for GYRO_2_ALIGN patterns:" rg -A 1 -B 1 "GYRO_2_ALIGN" configs/ | head -10Length of output: 788
Add missing GYRO_2_ALIGN in NEUTRONRCF745VTX/config.h
The config defines
GYRO_1_ALIGN CW270_DEG
but noGYRO_2_ALIGN
, whereas all other dual-gyro boards explicitly set both. Please add an explicit alignment for gyro 2 to avoid relying on undocumented defaults.• File: configs/NEUTRONRCF745VTX/config.h
• Location: immediately after the#define GYRO_1_ALIGN CW270_DEG
lineSuggested snippet:
#define GYRO_1_ALIGN CW270_DEG +#define GYRO_2_ALIGN CW0_DEG // or change to the correct rotation if gyro 2 is mounted differently
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
configs/AG3XF4/config.h
(1 hunks)configs/AG3XF7/config.h
(1 hunks)configs/AIRBOTF4SD/config.h
(1 hunks)configs/AIRBOTF4V2/config.h
(1 hunks)configs/AIRBOTF7/config.h
(1 hunks)configs/AIRF7/config.h
(1 hunks)configs/ALIENFLIGHTNGF7_DUAL/config.h
(1 hunks)configs/AOCODARCF7DUAL/config.h
(1 hunks)configs/AOCODARCH7DUAL/config.h
(1 hunks)configs/APEXF7/config.h
(1 hunks)configs/APEXF72023/config.h
(1 hunks)configs/BAYCK_DOLPHIN/config.h
(1 hunks)configs/BEEROTORF4/config.h
(1 hunks)configs/BETAFPVF722/config.h
(1 hunks)configs/BETAFPVH743/config.h
(1 hunks)configs/CCRCF722D/config.h
(1 hunks)configs/CHONKERH735/config.h
(1 hunks)configs/CLRACINGF4/config.h
(1 hunks)configs/CLRACINGF4V2/config.h
(1 hunks)configs/CLRACINGF7/config.h
(1 hunks)configs/DAKEFPVH743/config.h
(1 hunks)configs/DALRCF722DUAL/config.h
(1 hunks)configs/DARWINH7DUAL/config.h
(1 hunks)configs/DFR_F722_DUAL_HD/config.h
(1 hunks)configs/DREAMWORKSF722/config.h
(1 hunks)configs/DRONEERH743DUAL/config.h
(1 hunks)configs/DYSF4PRO/config.h
(1 hunks)configs/ELINF405/config.h
(1 hunks)configs/ELINF722/config.h
(1 hunks)configs/EMAX_BABYHAWK_II_HD/config.h
(1 hunks)configs/EMAX_TINYHAWK_F411RX/config.h
(1 hunks)configs/EXF722DUAL/config.h
(1 hunks)configs/EXUAVF4PRO/config.h
(1 hunks)configs/FLYCOLORF7/config.h
(1 hunks)configs/FLYCOLORF7MINI/config.h
(1 hunks)configs/FLYCOLORF7V2/config.h
(1 hunks)configs/FLYFISHRCF405/config.h
(1 hunks)configs/FLYWOOF405/config.h
(1 hunks)configs/FLYWOOF405S_AIO/config.h
(1 hunks)configs/FLYWOOF411/config.h
(1 hunks)configs/FLYWOOF411EVO_HD/config.h
(1 hunks)configs/FLYWOOF411V2/config.h
(1 hunks)configs/FLYWOOF722PRO/config.h
(1 hunks)configs/FLYWOOF722PROV2/config.h
(1 hunks)configs/FLYWOOF745/config.h
(1 hunks)configs/FLYWOOF745HEX/config.h
(1 hunks)configs/FLYWOOF7DUAL/config.h
(1 hunks)configs/FLYWOOH743PRO/config.h
(1 hunks)configs/FOXEERF722DUAL/config.h
(1 hunks)configs/FPVM_BETAFLIGHTF7/config.h
(1 hunks)configs/GEPRCF722/config.h
(1 hunks)configs/GEPRCF722_BT_HD/config.h
(1 hunks)configs/GEPRCF745_BT_HD/config.h
(1 hunks)configs/GEPRC_TAKER_H743/config.h
(1 hunks)configs/HAKRCF722D/config.h
(1 hunks)configs/HAKRCF722V2/config.h
(1 hunks)configs/HAKRCF7230D/config.h
(1 hunks)configs/HDZERO_HALO/config.h
(1 hunks)configs/HGLRCF405/config.h
(1 hunks)configs/HGLRCF405AS/config.h
(1 hunks)configs/HGLRCF411/config.h
(1 hunks)configs/HGLRCF745/config.h
(1 hunks)configs/HIFIONRCF7/config.h
(1 hunks)configs/HOBBYWING_XROTORF4G3/config.h
(1 hunks)configs/HOBBYWING_XROTORF7CONV/config.h
(1 hunks)configs/IFLIGHT_F405_TWING/config.h
(1 hunks)configs/IFLIGHT_F722_TWING/config.h
(1 hunks)configs/IFLIGHT_F745_AIO_V2/config.h
(1 hunks)configs/IFLIGHT_H743_AIO_V2/config.h
(1 hunks)configs/IFLIGHT_H7_TWING/config.h
(1 hunks)configs/JBF7/config.h
(1 hunks)configs/JBF7_DJI/config.h
(1 hunks)configs/JHEF411/config.h
(1 hunks)configs/JHEF722HD/config.h
(1 hunks)configs/JHEF7DUAL/config.h
(1 hunks)configs/JHEH743_AIO/config.h
(1 hunks)configs/JHEH743_HD/config.h
(1 hunks)configs/KAKUTEF4V2/config.h
(1 hunks)configs/KAKUTEF7/config.h
(1 hunks)configs/KAKUTEF7HDV/config.h
(1 hunks)configs/KAKUTEF7MINI/config.h
(1 hunks)configs/KONEXH743/config.h
(1 hunks)configs/LUXF4OSD/config.h
(1 hunks)configs/MAMBAG4/config.h
(1 hunks)configs/MAMBAH743/config.h
(1 hunks)configs/MAMBAH743_2022B/config.h
(1 hunks)configs/MATEKF411RX/config.h
(1 hunks)configs/MATEKF722/config.h
(1 hunks)configs/MATEKF722HD/config.h
(1 hunks)configs/MATEKF722MINI/config.h
(1 hunks)configs/MATEKF722SE/config.h
(1 hunks)configs/MATEKH743/config.h
(1 hunks)configs/MERAKRCF405/config.h
(1 hunks)configs/MERAKRCF722/config.h
(1 hunks)configs/MINI_H743_HD/config.h
(1 hunks)configs/MODULARF4/config.h
(1 hunks)configs/NBD_CRICKETF7V2/config.h
(1 hunks)configs/NBD_GALAXYAIO255/config.h
(1 hunks)configs/NBD_INFINITY200RS/config.h
(1 hunks)configs/NBD_INFINITYAIOV2PRO/config.h
(1 hunks)configs/NEUTRONRCF407/config.h
(1 hunks)configs/NEUTRONRCF745/config.h
(1 hunks)configs/NEUTRONRCF745VTX/config.h
(1 hunks)configs/NEUTRONRCF7AIO/config.h
(1 hunks)configs/NEUTRONRCH743AIO/config.h
(1 hunks)configs/NEUTRONRCH7BT/config.h
(1 hunks)configs/OMNIBUSF4/config.h
(1 hunks)
⛔ Files not processed due to max files limit (34)
- configs/OMNIBUSF4FW/config.h
- configs/OMNIBUSF4NANOV7/config.h
- configs/OMNIBUSF4SD/config.h
- configs/OMNIBUSF4V6/config.h
- configs/OMNIBUSF7/config.h
- configs/OMNIBUSF7NANOV7/config.h
- configs/OMNIBUSF7V2/config.h
- configs/OMNINXT4/config.h
- configs/OMNINXT7/config.h
- configs/PYRODRONEF7/config.h
- configs/SKYSTARSH7HD/config.h
- configs/SPEDIXF4/config.h
- configs/SPEEDYBEEF7V3/config.h
- configs/SPRACINGF7DUAL/config.h
- configs/SPRACINGH7EF/config.h
- configs/SPRACINGH7EXTREME/config.h
- configs/SPRACINGH7NANO/config.h
- configs/SPRACINGH7ZERO/config.h
- configs/STELLARH7DEV/config.h
- configs/SUB250REDFOXF722AIO/config.h
- configs/SYNERGYF4/config.h
- configs/TALONF7FUSION/config.h
- configs/TBS_LUCID_H7/config.h
- configs/TCMMF7/config.h
- configs/TMH7/config.h
- configs/TMOTORF4/config.h
- configs/TMOTORH743/config.h
- configs/TMVELOXF7/config.h
- configs/TRANSTECF7/config.h
- configs/VGOODF722DUAL/config.h
- configs/VGOODRCF4/config.h
- configs/WDIYH743/config.h
- configs/WIZZF7HD/config.h
- configs/XRACERF4/config.h
✅ Files skipped from review due to trivial changes (70)
- configs/AIRBOTF4V2/config.h
- configs/CLRACINGF4V2/config.h
- configs/JHEF7DUAL/config.h
- configs/FPVM_BETAFLIGHTF7/config.h
- configs/JHEH743_AIO/config.h
- configs/MINI_H743_HD/config.h
- configs/HGLRCF411/config.h
- configs/FLYCOLORF7/config.h
- configs/FLYWOOF722PRO/config.h
- configs/DALRCF722DUAL/config.h
- configs/FLYFISHRCF405/config.h
- configs/FLYCOLORF7V2/config.h
- configs/GEPRCF722/config.h
- configs/IFLIGHT_F745_AIO_V2/config.h
- configs/GEPRC_TAKER_H743/config.h
- configs/CLRACINGF4/config.h
- configs/MATEKF722HD/config.h
- configs/HOBBYWING_XROTORF7CONV/config.h
- configs/HOBBYWING_XROTORF4G3/config.h
- configs/BETAFPVF722/config.h
- configs/FLYWOOF405S_AIO/config.h
- configs/LUXF4OSD/config.h
- configs/HIFIONRCF7/config.h
- configs/HAKRCF722D/config.h
- configs/ELINF405/config.h
- configs/APEXF7/config.h
- configs/ALIENFLIGHTNGF7_DUAL/config.h
- configs/MODULARF4/config.h
- configs/CHONKERH735/config.h
- configs/MATEKF722MINI/config.h
- configs/MATEKH743/config.h
- configs/FLYCOLORF7MINI/config.h
- configs/FLYWOOF405/config.h
- configs/MATEKF722/config.h
- configs/FLYWOOF745HEX/config.h
- configs/HAKRCF7230D/config.h
- configs/HGLRCF745/config.h
- configs/FLYWOOF722PROV2/config.h
- configs/NEUTRONRCF745/config.h
- configs/AIRBOTF7/config.h
- configs/JHEF411/config.h
- configs/FLYWOOF7DUAL/config.h
- configs/APEXF72023/config.h
- configs/AIRF7/config.h
- configs/AG3XF7/config.h
- configs/BETAFPVH743/config.h
- configs/EMAX_TINYHAWK_F411RX/config.h
- configs/BAYCK_DOLPHIN/config.h
- configs/DREAMWORKSF722/config.h
- configs/NBD_INFINITY200RS/config.h
- configs/MATEKF411RX/config.h
- configs/KAKUTEF4V2/config.h
- configs/HDZERO_HALO/config.h
- configs/MAMBAH743/config.h
- configs/FLYWOOF745/config.h
- configs/AG3XF4/config.h
- configs/DYSF4PRO/config.h
- configs/MERAKRCF405/config.h
- configs/HGLRCF405/config.h
- configs/KAKUTEF7/config.h
- configs/FLYWOOF411V2/config.h
- configs/FOXEERF722DUAL/config.h
- configs/MAMBAG4/config.h
- configs/KAKUTEF7HDV/config.h
- configs/NEUTRONRCF7AIO/config.h
- configs/ELINF722/config.h
- configs/OMNIBUSF4/config.h
- configs/AIRBOTF4SD/config.h
- configs/DRONEERH743DUAL/config.h
- configs/EMAX_BABYHAWK_II_HD/config.h
🚧 Files skipped from review as they are similar to previous changes (28)
- configs/DARWINH7DUAL/config.h
- configs/GEPRCF745_BT_HD/config.h
- configs/NBD_INFINITYAIOV2PRO/config.h
- configs/NEUTRONRCH743AIO/config.h
- configs/JBF7/config.h
- configs/IFLIGHT_H7_TWING/config.h
- configs/FLYWOOH743PRO/config.h
- configs/MAMBAH743_2022B/config.h
- configs/AOCODARCF7DUAL/config.h
- configs/NEUTRONRCF407/config.h
- configs/IFLIGHT_H743_AIO_V2/config.h
- configs/IFLIGHT_F405_TWING/config.h
- configs/KONEXH743/config.h
- configs/CLRACINGF7/config.h
- configs/JHEH743_HD/config.h
- configs/JHEF722HD/config.h
- configs/NEUTRONRCH7BT/config.h
- configs/GEPRCF722_BT_HD/config.h
- configs/DFR_F722_DUAL_HD/config.h
- configs/DAKEFPVH743/config.h
- configs/AOCODARCH7DUAL/config.h
- configs/NBD_GALAXYAIO255/config.h
- configs/NBD_CRICKETF7V2/config.h
- configs/JBF7_DJI/config.h
- configs/IFLIGHT_F722_TWING/config.h
- configs/EXF722DUAL/config.h
- configs/HAKRCF722V2/config.h
- configs/CCRCF722D/config.h
🔇 Additional comments (7)
configs/HGLRCF405AS/config.h (2)
30-30
: LGTM! Addition is correct and consistent.The
GYRO_COUNT 2
definition is properly placed and consistent with the existing dual-gyro configuration evidenced by the GYRO_1 and GYRO_2 definitions throughout the file.
30-30
:✅ Verification successful
Verify if
DEFAULT_GYRO_ENABLED
should also be added.According to the AI summary, most board configurations are receiving both
GYRO_COUNT
andDEFAULT_GYRO_ENABLED
defines. This board has GYRO_2 configurations (lines 116), so it should be covered completely per Quick-Flash's comment about ensuring all boards withGYRO_2_XXXXX
definitions are included.
🏁 Script executed:
#!/bin/bash # Description: Check if other board configs with GYRO_2 configurations also include DEFAULT_GYRO_ENABLED # Expected: Most configs with GYRO_2 should have both GYRO_COUNT and DEFAULT_GYRO_ENABLED # Find all config files that have GYRO_2 definitions echo "=== Boards with GYRO_2 configurations ===" rg -l "GYRO_2_" configs/ echo -e "\n=== Check which have both GYRO_COUNT and DEFAULT_GYRO_ENABLED ===" for file in $(rg -l "GYRO_2_" configs/); do echo "--- $file ---" echo -n "GYRO_COUNT: " if grep -q "GYRO_COUNT" "$file"; then echo "✓"; else echo "✗"; fi echo -n "DEFAULT_GYRO_ENABLED: " if grep -q "DEFAULT_GYRO_ENABLED" "$file"; then echo "✓"; else echo "✗"; fi echo doneLength of output: 66297
DEFAULT_GYRO_ENABLED already defined in configs/HGLRCF405AS/config.h
Verified that this file contains both
#define GYRO_COUNT 2
#define DEFAULT_GYRO_ENABLED …
No further changes required.
configs/MERAKRCF722/config.h (1)
32-32
: LGTM! GYRO_COUNT addition is correct and consistent.The addition of
GYRO_COUNT 2
is appropriate and aligns with the existingGYRO_2_SPI_INSTANCE
definition at line 101, confirming this board supports dual gyroscopes.configs/FLYWOOF411EVO_HD/config.h (1)
32-32
: LGTM! The GYRO_COUNT definition is correct.The addition of
#define GYRO_COUNT 2
is appropriate and consistent with the existing dual gyro configuration (GYRO_1 and GYRO_2 definitions on lines 97-99).configs/MATEKF722SE/config.h (1)
33-33
: LGTM: GYRO_COUNT addition is consistent with existing dual gyro configuration.The addition of
GYRO_COUNT 2
correctly reflects that this board has dual gyro support, as evidenced by the existing GYRO_1_* and GYRO_2_* definitions throughout the file.configs/NEUTRONRCF745VTX/config.h (1)
32-32
:❓ Verification inconclusive
Verify completeness of dual IMU implementation.
The
GYRO_COUNT 2
definition is correct for this board. However, according to the PR objectives and AI summary, other board configurations received bothGYRO_COUNT
andDEFAULT_GYRO_ENABLED
definitions. This config appears to be missing theDEFAULT_GYRO_ENABLED
definition.
🏁 Script executed:
#!/bin/bash # Description: Check if DEFAULT_GYRO_ENABLED is defined elsewhere in this config or verify if it should be added # Expected: Find if DEFAULT_GYRO_ENABLED is missing and compare with other board configs echo "Checking for DEFAULT_GYRO_ENABLED in current config:" rg "DEFAULT_GYRO_ENABLED" configs/NEUTRONRCF745VTX/ echo -e "\nChecking other board configs that got both defines in this PR:" rg -l "GYRO_COUNT.*2" configs/ | head -5 | xargs -I {} bash -c 'echo "=== {} ==="; rg "DEFAULT_GYRO_ENABLED" {}'Length of output: 733
🏁 Script executed:
#!/bin/bash # Verify presence of gyro alignment definitions in this config echo "Checking for GYRO_1_ALIGN and GYRO_2_ALIGN in configs/NEUTRONRCF745VTX/config.h" rg "GYRO_1_ALIGN" configs/NEUTRONRCF745VTX/config.h || echo "GYRO_1_ALIGN not found" rg "GYRO_2_ALIGN" configs/NEUTRONRCF745VTX/config.h || echo "GYRO_2_ALIGN not found"Length of output: 358
Add missing dual-IMU definitions
The
GYRO_COUNT 2
is correct, but this board config still needs:
- A
DEFAULT_GYRO_ENABLED
definition to match other dual-IMU boards- A
GYRO_2_ALIGN
definition alongside the existingGYRO_1_ALIGN
Please update configs/NEUTRONRCF745VTX/config.h accordingly, for example:
#define GYRO_COUNT 2 +#define DEFAULT_GYRO_ENABLED (GYRO_MASK(0) | GYRO_MASK(1)) +#define GYRO_2_ALIGN <appropriate alignment>– Replace
<appropriate alignment>
with the actual orientation for your second gyro.
[fix_required]configs/EXUAVF4PRO/config.h (1)
30-30
:✅ Verification successful
LGTM! Verify consistency with other board configurations.
The addition of
GYRO_COUNT 2
is correct and consistent with the existing dual gyro configuration evidenced by theGYRO_1_*
andGYRO_2_*
definitions in this file.However, according to the AI summary, most other board configurations received both
GYRO_COUNT
andDEFAULT_GYRO_ENABLED
macros. Please verify whether theDEFAULT_GYRO_ENABLED
macro should also be added to this configuration for consistency.
🏁 Script executed:
#!/bin/bash # Description: Check if other configs with GYRO_COUNT also have DEFAULT_GYRO_ENABLED # Expected: Most configs should have both macros for consistency echo "=== Checking configs that have GYRO_COUNT ===" rg -l "GYRO_COUNT" configs/*/config.h echo -e "\n=== Checking which of those also have DEFAULT_GYRO_ENABLED ===" rg -l "GYRO_COUNT" configs/*/config.h | xargs rg -l "DEFAULT_GYRO_ENABLED" echo -e "\n=== Checking configs that have GYRO_COUNT but NOT DEFAULT_GYRO_ENABLED ===" rg -l "GYRO_COUNT" configs/*/config.h | xargs rg -L "DEFAULT_GYRO_ENABLED" echo -e "\n=== Verifying EXUAVF4PRO has GYRO_2 definitions ===" rg "GYRO_2" configs/EXUAVF4PRO/config.hLength of output: 57199
GYRO_COUNT addition is correct; no DEFAULT_GYRO_ENABLED needed
All existing dual-gyro configurations in configs/EXUAVF4PRO/config.h (confirmed by the presence of GYRO_2_SPI_INSTANCE) now correctly define
#define GYRO_COUNT 2
. While some specialty boards do include aDEFAULT_GYRO_ENABLED
macro, the majority of dual-gyro configs (including EXUAVF4PRO) do not—so omitting it here follows the established convention.No further changes are required.
d4fb425
to
50009f5
Compare
First cut of addingGYRO_COUNT
andDEFAULT_GYRO_ENABLED
defineNeeded for Add 3+ IMU support betaflight#14383Summary by CodeRabbit