Added commands to restore profile / rateprofile selection to output of 'dump all' CLI command. Also added command to save config to 'dump all' output.

This commit is contained in:
Michael Keller 2016-05-10 11:16:00 +12:00
parent 90bc67e2cc
commit 4e178629e0
1 changed files with 13 additions and 4 deletions

View File

@ -1977,8 +1977,16 @@ static void cliDump(char *cmdline)
cliDumpRateProfile(rateCount);
}
cliPrint("\r\n# restore original profile / rateprofile 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);
cliDumpRateProfile(currentProfile->activeRateProfile);
@ -2003,12 +2011,13 @@ void cliDumpProfile(uint8_t profileIndex) {
cliPrint("\r\n# profile\r\n");
cliProfile("");
cliPrintf("############################# PROFILE VALUES ####################################\r\n");
cliProfile("");
printSectionBreak();
dumpValues(PROFILE_VALUE);
cliRateProfile("");
}
void cliDumpRateProfile(uint8_t rateProfileIndex) {
if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values
return;
@ -2019,8 +2028,8 @@ void cliDumpRateProfile(uint8_t rateProfileIndex) {
printSectionBreak();
dumpValues(PROFILE_RATE_VALUE);
}
void cliEnter(serialPort_t *serialPort)
{
cliMode = 1;