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:
parent
e379757718
commit
ab8ee84eef
1 changed files with 4 additions and 0 deletions
|
@ -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] == '*')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue