From 1b2cccddbfa656472ba456ce9a102ee91f1cc437 Mon Sep 17 00:00:00 2001 From: DieHertz Date: Thu, 16 Mar 2017 23:08:16 +0300 Subject: [PATCH] Fixed PID & Rate profile output via diff/dump --- src/main/fc/cli.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 1abbed5faa..8cd8646988 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -4597,7 +4597,7 @@ static void printConfig(char *cmdline, bool doDiff) dumpAllValues(MASTER_VALUE, dumpMask); if (dumpMask & DUMP_ALL) { - const uint8_t pidProfileIndexSave = getCurrentPidProfileIndex(); + const uint8_t pidProfileIndexSave = systemConfigCopy.pidProfileIndex; for (uint32_t pidProfileIndex = 0; pidProfileIndex < MAX_PROFILE_COUNT; pidProfileIndex++) { cliDumpPidProfile(pidProfileIndex, dumpMask); } @@ -4605,7 +4605,7 @@ static void printConfig(char *cmdline, bool doDiff) cliPrintHashLine("restore original profile selection"); cliProfile(""); - const uint8_t controlRateProfileIndexSave = getCurrentControlRateProfileIndex(); + const uint8_t controlRateProfileIndexSave = systemConfigCopy.activeRateProfile; for (uint32_t rateIndex = 0; rateIndex < CONTROL_RATE_PROFILE_COUNT; rateIndex++) { cliDumpRateProfile(rateIndex, dumpMask); } @@ -4616,18 +4616,18 @@ static void printConfig(char *cmdline, bool doDiff) cliPrintHashLine("save configuration"); cliPrint("save"); } else { - cliDumpPidProfile(getCurrentPidProfileIndex(), dumpMask); + cliDumpPidProfile(systemConfigCopy.pidProfileIndex, dumpMask); - cliDumpRateProfile(getCurrentControlRateProfileIndex(), dumpMask); + cliDumpRateProfile(systemConfigCopy.activeRateProfile, dumpMask); } } if (dumpMask & DUMP_PROFILE) { - cliDumpPidProfile(getCurrentPidProfileIndex(), dumpMask); + cliDumpPidProfile(systemConfigCopy.pidProfileIndex, dumpMask); } if (dumpMask & DUMP_RATES) { - cliDumpRateProfile(getCurrentControlRateProfileIndex(), dumpMask); + cliDumpRateProfile(systemConfigCopy.activeRateProfile, dumpMask); } #ifdef USE_PARAMETER_GROUPS // restore configs from copies