Added validation for Dterm notch filter settings.

This commit is contained in:
mikeller 2017-03-01 00:23:24 +13:00 committed by Martin Budden
parent f984838d27
commit c71ef27104
1 changed files with 5 additions and 0 deletions

View File

@ -1261,6 +1261,11 @@ void validateAndFixConfig(void)
}
#endif
// Prevent invalid notch cutoff
if (currentProfile->pidProfile.dterm_notch_cutoff >= currentProfile->pidProfile.dterm_notch_hz) {
currentProfile->pidProfile.dterm_notch_hz = 0;
}
validateAndFixGyroConfig();
#if defined(TARGET_VALIDATECONFIG)