mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
CLI: non-digit values should give invalid value, not 0
This commit is contained in:
parent
f6a03a3c00
commit
d93abe9475
1 changed files with 12 additions and 10 deletions
|
@ -2396,6 +2396,7 @@ static void cliSet(char *cmdline)
|
|||
int_float_value_t tmp;
|
||||
switch (valueTable[i].type & VALUE_MODE_MASK) {
|
||||
case MODE_DIRECT: {
|
||||
if(strspn(eqptr, "0123456789.+-") == strlen(eqptr)) {
|
||||
int32_t value = 0;
|
||||
float valuef = 0;
|
||||
|
||||
|
@ -2412,6 +2413,7 @@ static void cliSet(char *cmdline)
|
|||
changeValue = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MODE_LOOKUP: {
|
||||
const lookupTableEntry_t *tableEntry = &lookupTables[valueTable[i].config.lookup.tableIndex];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue