1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 01:05:21 +03:00

CLI: ignore spaces between cmd and setting name for get/set

This commit is contained in:
Michel Pastor 2019-03-24 17:28:39 +01:00
parent e379757718
commit ab8ee84eef

View file

@ -2546,6 +2546,8 @@ static void cliGet(char *cmdline)
int matchedCommands = 0;
char name[SETTING_MAX_NAME_LENGTH];
while(*cmdline == ' ') ++cmdline; // ignore spaces
for (uint32_t i = 0; i < SETTINGS_TABLE_COUNT; i++) {
val = settingGet(i);
if (settingNameContains(val, name, cmdline)) {
@ -2574,6 +2576,8 @@ static void cliSet(char *cmdline)
char *eqptr = NULL;
char name[SETTING_MAX_NAME_LENGTH];
while(*cmdline == ' ') ++cmdline; // ignore spaces
len = strlen(cmdline);
if (len == 0 || (len == 1 && cmdline[0] == '*')) {