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

Moved rate profiles out of pid profiles

This commit is contained in:
Martin Budden 2017-02-24 22:18:26 +00:00
parent ff40e8c844
commit 051c9cca48
16 changed files with 61 additions and 60 deletions

View file

@ -67,7 +67,7 @@ static long cmsx_menuImu_onEnter(void)
profileIndex = systemConfig()->current_profile_index;
tmpProfileIndex = profileIndex + 1;
rateProfileIndex = masterConfig.profile[profileIndex].activeRateProfile;
rateProfileIndex = systemConfig()->activeRateProfile;
tmpRateProfileIndex = rateProfileIndex + 1;
return 0;
@ -78,7 +78,7 @@ static long cmsx_menuImu_onExit(const OSD_Entry *self)
UNUSED(self);
systemConfigMutable()->current_profile_index = profileIndex;
masterConfig.profile[profileIndex].activeRateProfile = rateProfileIndex;
systemConfigMutable()->activeRateProfile = rateProfileIndex;
return 0;
}
@ -174,7 +174,7 @@ static CMS_Menu cmsx_menuPid = {
static long cmsx_RateProfileRead(void)
{
memcpy(&rateProfile, &masterConfig.profile[profileIndex].controlRateProfile[rateProfileIndex], sizeof(controlRateConfig_t));
memcpy(&rateProfile, controlRateProfiles(rateProfileIndex), sizeof(controlRateConfig_t));
return 0;
}
@ -183,7 +183,7 @@ static long cmsx_RateProfileWriteback(const OSD_Entry *self)
{
UNUSED(self);
memcpy(&masterConfig.profile[profileIndex].controlRateProfile[rateProfileIndex], &rateProfile, sizeof(controlRateConfig_t));
memcpy(controlRateProfilesMutable(rateProfileIndex), &rateProfile, sizeof(controlRateConfig_t));
return 0;
}