mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +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;
|
break;
|
||||||
case (MODE_LOOKUP): {
|
case (MODE_LOOKUP): {
|
||||||
const lookupTableEntry_t *tableEntry = &lookupTables[var->config.lookup.tableIndex];
|
const lookupTableEntry_t *tableEntry = &lookupTables[var->config.lookup.tableIndex];
|
||||||
cliPrint("Allowed values:");
|
cliPrint("Allowed values: ");
|
||||||
for (uint32_t i = 0; i < tableEntry->valueCount; i++) {
|
bool firstEntry = true;
|
||||||
|
for (unsigned i = 0; i < tableEntry->valueCount; i++) {
|
||||||
if (tableEntry->values[i]) {
|
if (tableEntry->values[i]) {
|
||||||
cliPrintf(" %s", tableEntry->values[i]);
|
if (!firstEntry) {
|
||||||
if (i + 1 < tableEntry->valueCount) {
|
cliPrint(", ");
|
||||||
cliPrint(",");
|
|
||||||
}
|
}
|
||||||
|
cliPrintf("%s", tableEntry->values[i]);
|
||||||
|
firstEntry = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cliPrintLinefeed();
|
cliPrintLinefeed();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue