Skip to content

Commit 434db9a

Browse files
committed
Merge pull request betaflight#4370 from DanNixon/use_arm_disbale_flag_names_in_cli_when_names_are_compiled
Use arming flag names in CLI whenever possible
1 parent 9ec6fa9 commit 434db9a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/fc/cli.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,9 +3013,8 @@ static void cliStatus(char *cmdline)
30133013
const int systemRate = getTaskDeltaTime(TASK_SYSTEM) == 0 ? 0 : (int)(1000000.0f / ((float)getTaskDeltaTime(TASK_SYSTEM)));
30143014
cliPrintLinef("CPU:%d%%, cycle time: %d, GYRO rate: %d, RX rate: %d, System rate: %d",
30153015
constrain(averageSystemLoadPercent, 0, 100), getTaskDeltaTime(TASK_GYROPID), gyroRate, rxRate, systemRate);
3016-
#ifdef MINIMAL_CLI
3017-
cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags());
3018-
#else
3016+
#if defined(OSD) || !defined(MINIMAL_CLI)
3017+
/* Flag strings are present if OSD is compiled so may as well use them even with MINIMAL_CLI */
30193018
cliPrint("Arming disable flags:");
30203019
uint16_t flags = getArmingDisableFlags();
30213020
while (flags) {
@@ -3024,6 +3023,8 @@ static void cliStatus(char *cmdline)
30243023
cliPrintf(" %s", armingDisableFlagNames[bitpos]);
30253024
}
30263025
cliPrintLinefeed();
3026+
#else
3027+
cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags());
30273028
#endif
30283029
}
30293030

0 commit comments

Comments
 (0)