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:
parent
c0d25b1296
commit
532e8afe61
6 changed files with 78 additions and 48 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue