mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Minor fixes to parameter groups
This commit is contained in:
parent
f1ce19167f
commit
728b596e1b
2 changed files with 13 additions and 6 deletions
|
@ -1270,6 +1270,10 @@ void validateAndFixConfig(void)
|
|||
if (!isSerialConfigValid(serialConfig)) {
|
||||
resetSerialConfig(serialConfig);
|
||||
}
|
||||
#else
|
||||
if (!isSerialConfigValid(serialConfig())) {
|
||||
pgResetFn_serialPinConfig(serialConfigMutable());
|
||||
}
|
||||
#endif
|
||||
|
||||
// Prevent invalid notch cutoff
|
||||
|
@ -1373,13 +1377,14 @@ void readEEPROM(void)
|
|||
failureMode(FAILURE_INVALID_EEPROM_CONTENTS);
|
||||
}
|
||||
|
||||
// pgActivateProfile(getCurrentPidProfileIndex());
|
||||
// setControlRateProfile(rateProfileSelection()->defaultRateProfileIndex);
|
||||
if (systemConfig()->activeRateProfile >= CONTROL_RATE_PROFILE_COUNT) {// sanity check
|
||||
systemConfigMutable()->activeRateProfile = 0;
|
||||
}
|
||||
setControlRateProfile(systemConfig()->activeRateProfile);
|
||||
|
||||
if (systemConfig()->pidProfileIndex > MAX_PROFILE_COUNT - 1) {// sanity check
|
||||
if (systemConfig()->pidProfileIndex >= MAX_PROFILE_COUNT) {// sanity check
|
||||
systemConfigMutable()->pidProfileIndex = 0;
|
||||
}
|
||||
|
||||
setPidProfile(systemConfig()->pidProfileIndex);
|
||||
|
||||
validateAndFixConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue