mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Disallow dual gyro in "BOTH" mode if RPM filter enabled
RPM Filter currently doesn't support dual-gyro running in "BOTH" mode. Switch to the "FIRST" gyro if configured for "BOTH" and RPM filter is enabled. Once RPM filter is updated to support dual-gyro using both sensors then this check should be removed.
This commit is contained in:
parent
5c75974415
commit
3fdb0e2b2e
4 changed files with 18 additions and 7 deletions
|
@ -461,6 +461,14 @@ static void validateAndFixConfig(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
// Temporary workaround until RPM Filter supports dual-gyro using both sensors
|
||||
// Once support is added remove this block
|
||||
#if defined(USE_MULTI_GYRO) && defined(USE_RPM_FILTER)
|
||||
if (gyroConfig()->gyro_to_use == GYRO_CONFIG_USE_GYRO_BOTH && isRpmFilterEnabled()) {
|
||||
gyroConfigMutable()->gyro_to_use = GYRO_CONFIG_USE_GYRO_1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_VALIDATECONFIG)
|
||||
targetValidateConfiguration();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue