1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Fixed dumping of profile values in CLI.

This commit is contained in:
mikeller 2018-06-02 21:01:22 +12:00
parent c0d25b1296
commit 532e8afe61
6 changed files with 78 additions and 48 deletions

View file

@ -62,20 +62,18 @@ void pgResetFn_controlRateProfiles(controlRateConfig_t *controlRateConfig)
}
}
void setControlRateProfile(uint8_t controlRateProfileIndex)
void loadControlRateProfile(void)
{
if (controlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT) {
systemConfigMutable()->activeRateProfile = controlRateProfileIndex;
currentControlRateProfile = controlRateProfilesMutable(controlRateProfileIndex);
}
currentControlRateProfile = controlRateProfilesMutable(systemConfig()->activeRateProfile);
}
void changeControlRateProfile(uint8_t controlRateProfileIndex)
{
if (controlRateProfileIndex >= CONTROL_RATE_PROFILE_COUNT) {
controlRateProfileIndex = CONTROL_RATE_PROFILE_COUNT - 1;
if (controlRateProfileIndex < CONTROL_RATE_PROFILE_COUNT) {
systemConfigMutable()->activeRateProfile = controlRateProfileIndex;
}
setControlRateProfile(controlRateProfileIndex);
loadControlRateProfile();
initRcProcessing();
}