mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Fixed rateprofile dump / restore
This commit is contained in:
parent
d214f8602d
commit
e61a58c713
1 changed files with 9 additions and 6 deletions
|
@ -2050,24 +2050,27 @@ static void cliDump(char *cmdline)
|
|||
|
||||
if (dumpMask & DUMP_ALL) {
|
||||
uint8_t activeProfile = masterConfig.current_profile_index;
|
||||
uint8_t currentRateIndex = currentProfile->activeRateProfile;
|
||||
uint8_t profileCount;
|
||||
uint8_t rateCount;
|
||||
for (profileCount=0; profileCount<MAX_PROFILE_COUNT;profileCount++) {
|
||||
cliDumpProfile(profileCount);
|
||||
|
||||
uint8_t currentRateIndex = currentProfile->activeRateProfile;
|
||||
uint8_t rateCount;
|
||||
for (rateCount=0; rateCount<MAX_RATEPROFILES; rateCount++)
|
||||
cliDumpRateProfile(rateCount);
|
||||
|
||||
cliPrint("\r\n# restore original rateprofile selection\r\n");
|
||||
|
||||
changeControlRateProfile(currentRateIndex);
|
||||
cliRateProfile("");
|
||||
}
|
||||
|
||||
cliPrint("\r\n# restore original profile / rateprofile selection\r\n");
|
||||
cliPrint("\r\n# restore original profile selection\r\n");
|
||||
|
||||
changeProfile(activeProfile);
|
||||
cliProfile("");
|
||||
printSectionBreak();
|
||||
|
||||
changeControlRateProfile(currentRateIndex);
|
||||
cliRateProfile("");
|
||||
|
||||
cliPrint("\r\n# save configuration\r\nsave\r\n");
|
||||
} else {
|
||||
cliDumpProfile(masterConfig.current_profile_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue