mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Fixed display of CLI lookup options. (#5493)
This commit is contained in:
parent
4786e1a333
commit
5dc23e662f
1 changed files with 7 additions and 5 deletions
|
@ -488,13 +488,15 @@ static void cliPrintVarRange(const clivalue_t *var)
|
|||
break;
|
||||
case (MODE_LOOKUP): {
|
||||
const lookupTableEntry_t *tableEntry = &lookupTables[var->config.lookup.tableIndex];
|
||||
cliPrint("Allowed values:");
|
||||
for (uint32_t i = 0; i < tableEntry->valueCount; i++) {
|
||||
cliPrint("Allowed values: ");
|
||||
bool firstEntry = true;
|
||||
for (unsigned i = 0; i < tableEntry->valueCount; i++) {
|
||||
if (tableEntry->values[i]) {
|
||||
cliPrintf(" %s", tableEntry->values[i]);
|
||||
if (i + 1 < tableEntry->valueCount) {
|
||||
cliPrint(",");
|
||||
if (!firstEntry) {
|
||||
cliPrint(", ");
|
||||
}
|
||||
cliPrintf("%s", tableEntry->values[i]);
|
||||
firstEntry = false;
|
||||
}
|
||||
}
|
||||
cliPrintLinefeed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue