1
0
Fork 0
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:
Martin Budden 2016-12-29 17:15:16 +00:00 committed by borisbstyle
parent 029015afd8
commit 2aa89cf791
4 changed files with 19 additions and 7 deletions

View file

@ -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();