Merge pull request #10479 from mikeller/fix_validation_order

Reordered configuration validation to put custom target validation to the end.
This commit is contained in:
Michael Keller 2021-01-17 10:59:58 +08:00 committed by GitHub
commit 34614231d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -574,10 +574,6 @@ static void validateAndFixConfig(void)
}
#endif
#if defined(TARGET_VALIDATECONFIG)
targetValidateConfiguration();
#endif
validateAndFixRatesSettings(); // constrain the various rates settings to limits imposed by the rates type
#if defined(USE_RX_MSP_OVERRIDE)
@ -601,6 +597,11 @@ static void validateAndFixConfig(void)
batteryConfigMutable()->vbatmincellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MIN;
batteryConfigMutable()->vbatmaxcellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MAX;
}
#if defined(TARGET_VALIDATECONFIG)
// This should be done at the end of the validation
targetValidateConfiguration();
#endif
}
void validateAndFixGyroConfig(void)