mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Merge pull request #4370 from DanNixon/use_arm_disbale_flag_names_in_cli_when_names_are_compiled
Use arming flag names in CLI whenever possible
This commit is contained in:
commit
be00fb6586
1 changed files with 4 additions and 3 deletions
|
@ -3013,9 +3013,8 @@ static void cliStatus(char *cmdline)
|
||||||
const int systemRate = getTaskDeltaTime(TASK_SYSTEM) == 0 ? 0 : (int)(1000000.0f / ((float)getTaskDeltaTime(TASK_SYSTEM)));
|
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",
|
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);
|
constrain(averageSystemLoadPercent, 0, 100), getTaskDeltaTime(TASK_GYROPID), gyroRate, rxRate, systemRate);
|
||||||
#ifdef MINIMAL_CLI
|
#if defined(OSD) || !defined(MINIMAL_CLI)
|
||||||
cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags());
|
/* Flag strings are present if OSD is compiled so may as well use them even with MINIMAL_CLI */
|
||||||
#else
|
|
||||||
cliPrint("Arming disable flags:");
|
cliPrint("Arming disable flags:");
|
||||||
uint16_t flags = getArmingDisableFlags();
|
uint16_t flags = getArmingDisableFlags();
|
||||||
while (flags) {
|
while (flags) {
|
||||||
|
@ -3024,6 +3023,8 @@ static void cliStatus(char *cmdline)
|
||||||
cliPrintf(" %s", armingDisableFlagNames[bitpos]);
|
cliPrintf(" %s", armingDisableFlagNames[bitpos]);
|
||||||
}
|
}
|
||||||
cliPrintLinefeed();
|
cliPrintLinefeed();
|
||||||
|
#else
|
||||||
|
cliPrintLinef("Arming disable flags: 0x%x", getArmingDisableFlags());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue