Skip to content

Commit

Permalink
CMS profiles. Keep external and local profile items in sync on index …
Browse files Browse the repository at this point in the history
…change.
  • Loading branch information
AndersHoglund committed May 8, 2024
1 parent 3488a2e commit bd479fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/cms/cms_menu_imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ static const void *cmsx_profileIndexOnChange(displayPort_t *displayPort, const v

pidProfileIndex = tmpPidProfileIndex - 1;
changePidProfile(pidProfileIndex);
pidProfile = pidProfilesMutable(pidProfileIndex);
setProfileIndexString(pidProfileIndexString, pidProfileIndex, pidProfile->profileName);

return NULL;
}
Expand All @@ -162,6 +164,8 @@ static const void *cmsx_rateProfileIndexOnChange(displayPort_t *displayPort, con

rateProfileIndex = tmpRateProfileIndex - 1;
changeControlRateProfile(rateProfileIndex);
memcpy(&rateProfile, controlRateProfiles(rateProfileIndex), sizeof(controlRateConfig_t));
setProfileIndexString(rateProfileIndexString, rateProfileIndex, controlRateProfilesMutable(rateProfileIndex)->profileName);

return NULL;
}
Expand Down

0 comments on commit bd479fd

Please sign in to comment.