1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +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:
Bruce Luckcuck 2019-03-29 08:53:34 -04:00
parent 5c75974415
commit 3fdb0e2b2e
4 changed files with 18 additions and 7 deletions

View file

@ -296,13 +296,10 @@ void updateArmingStatus(void)
#ifdef USE_RPM_FILTER
// USE_RPM_FILTER will only be defined if USE_DSHOT and USE_DSHOT_TELEMETRY are defined
// If the RPM filter is anabled and any motor isn't providing telemetry, then disable arming
if (motorConfig()->dev.useDshotTelemetry
&& (rpmFilterConfig()->gyro_rpm_notch_harmonics || rpmFilterConfig()->dterm_rpm_notch_harmonics)) {
if (!isDshotTelemetryActive()) {
setArmingDisabled(ARMING_DISABLED_RPMFILTER);
} else {
unsetArmingDisabled(ARMING_DISABLED_RPMFILTER);
}
if (isRpmFilterEnabled() && !isDshotTelemetryActive()) {
setArmingDisabled(ARMING_DISABLED_RPMFILTER);
} else {
unsetArmingDisabled(ARMING_DISABLED_RPMFILTER);
}
#endif