1
0
Fork 0
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:
theArchLadder 2016-05-12 15:35:44 +02:00
parent f6a03a3c00
commit d93abe9475

View file

@ -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];