mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Added dummy PG. Fixed setting of profile
This commit is contained in:
parent
029015afd8
commit
2aa89cf791
4 changed files with 19 additions and 7 deletions
|
@ -550,7 +550,7 @@ uint8_t getCurrentProfile(void)
|
|||
return masterConfig.current_profile_index;
|
||||
}
|
||||
|
||||
void setProfile(uint8_t profileIndex)
|
||||
static void setProfile(uint8_t profileIndex)
|
||||
{
|
||||
currentProfile = &masterConfig.profile[profileIndex];
|
||||
currentControlRateProfileIndex = currentProfile->activeRateProfile;
|
||||
|
@ -1139,10 +1139,14 @@ void readEEPROM(void)
|
|||
failureMode(FAILURE_INVALID_EEPROM_CONTENTS);
|
||||
}
|
||||
|
||||
pgActivateProfile(getCurrentProfile());
|
||||
|
||||
// pgActivateProfile(getCurrentProfile());
|
||||
// setControlRateProfile(rateProfileSelection()->defaultRateProfileIndex);
|
||||
setControlRateProfile(0);
|
||||
|
||||
if (masterConfig.current_profile_index > MAX_PROFILE_COUNT - 1) {// sanity check
|
||||
masterConfig.current_profile_index = 0;
|
||||
}
|
||||
|
||||
setProfile(masterConfig.current_profile_index);
|
||||
|
||||
validateAndFixConfig();
|
||||
activateConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue