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