1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Reordered configuration validation to put custom target validation to the end.

This commit is contained in:
Michael Keller 2021-01-16 16:21:07 +13:00
parent 35de1c8229
commit 6e282cf246

View file

@ -574,10 +574,6 @@ static void validateAndFixConfig(void)
} }
#endif #endif
#if defined(TARGET_VALIDATECONFIG)
targetValidateConfiguration();
#endif
validateAndFixRatesSettings(); // constrain the various rates settings to limits imposed by the rates type validateAndFixRatesSettings(); // constrain the various rates settings to limits imposed by the rates type
#if defined(USE_RX_MSP_OVERRIDE) #if defined(USE_RX_MSP_OVERRIDE)
@ -601,6 +597,11 @@ static void validateAndFixConfig(void)
batteryConfigMutable()->vbatmincellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MIN; batteryConfigMutable()->vbatmincellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MIN;
batteryConfigMutable()->vbatmaxcellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MAX; 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) void validateAndFixGyroConfig(void)