From 646d757460d6eb49c15d87f87aec33363225649d Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Sun, 15 Oct 2017 07:45:51 +0100 Subject: [PATCH] Use arming flag names in CLI whenever possible Some targets define both MINIMAL_CLI and OSD, in this case the arming disable flan name strings are present but unused for the CLI. Match the test in the cli.c with that in runtime_config.[ch] so that the flag names are used whenever they are included. --- src/main/fc/cli.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 91e0878df9..39fa9a52cc 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -3013,9 +3013,8 @@ static void cliStatus(char *cmdline) const int systemRate = getTaskDeltaTime(TASK_SYSTEM) == 0 ? 0 : (int)(1000000.0f / ((float)getTaskDeltaTime(TASK_SYSTEM))); cliPrintLinef("CPU:%d%%, cycle time: %d, GYRO rate: %d, RX rate: %d, System rate: %d", constrain(averageSystemLoadPercent, 0, 100), getTaskDeltaTime(TASK_GYROPID), gyroRate, rxRate, systemRate); -#ifdef MINIMAL_CLI - cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags()); -#else +#if defined(OSD) || !defined(MINIMAL_CLI) + /* Flag strings are present if OSD is compiled so may as well use them even with MINIMAL_CLI */ cliPrint("Arming disable flags:"); uint16_t flags = getArmingDisableFlags(); while (flags) { @@ -3024,6 +3023,8 @@ static void cliStatus(char *cmdline) cliPrintf(" %s", armingDisableFlagNames[bitpos]); } cliPrintLinefeed(); +#else + cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags()); #endif }