Skip to content

Commit 0060a1a

Browse files
committed
Add command to error report
1 parent 4788cac commit 0060a1a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ t_cliResult processCommand(char *cmdBuffer)
180180
}
181181
else
182182
{
183-
commandSendErrorResponse(tokens[0], tokens[1], (char *)"Unknown setting");
183+
commandSendErrorResponse(tokens[0], field, (char *)"Unknown setting");
184184
return (CLI_UNKNOWN_SETTING);
185185
}
186186
}
@@ -189,8 +189,13 @@ t_cliResult processCommand(char *cmdBuffer)
189189
{
190190
if (tokenCount != 3)
191191
{
192-
commandSendErrorResponse(tokens[0],
193-
(char *)"Incorrect number of arguments"); // Incorrect number of arguments
192+
if (tokenCount == 2)
193+
commandSendErrorResponse(tokens[0], tokens[1],
194+
(char *)"Incorrect number of arguments"); // Incorrect number of arguments
195+
else
196+
commandSendErrorResponse(tokens[0],
197+
(char *)"Incorrect number of arguments"); // Incorrect number of arguments
198+
194199
return (CLI_BAD_FORMAT);
195200
}
196201
else
@@ -213,7 +218,7 @@ t_cliResult processCommand(char *cmdBuffer)
213218
}
214219
else
215220
{
216-
commandSendErrorResponse(tokens[0], (char *)"Unknown setting");
221+
commandSendErrorResponse(tokens[0], field, (char *)"Unknown setting");
217222
return (CLI_UNKNOWN_SETTING);
218223
}
219224
}

0 commit comments

Comments
 (0)