1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

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

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)