Added validation for Dterm notch filter settings.

This commit is contained in:
mikeller 2017-03-01 00:23:24 +13:00 committed by Michael Keller
parent 1559fbab64
commit 780257faeb
1 changed files with 5 additions and 0 deletions

View File

@ -1216,6 +1216,11 @@ void validateAndFixConfig(void)
resetSerialConfig(serialConfig);
}
// 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)