Here are the relevant code;
void init()
{
Serial.begin(SERIAL_BAUD_RATE);
Serial.commandProcessing(true);
commandHandler.registerCommand(CommandDelegate("appheap","Usage appheap on/off/now for
heapdisplay\r\n","testGroup", appheapCommand));
memoryTimer.initializeMs(250,checkHeap).start();
}
void appheapCommand(String commandLine ,CommandOutput* commandOutput)
{
Vector<String> commandToken;
int numToken = splitString(commandLine, ',' , commandToken);
//The rest are same as inside sample code.
}
When I send this string `appheap ,off` to the UART, the command is parsed properly.
However, when I send this string `appheap,off` to the UART, the command is not parsed properly. The message returned is `Command not found, cmd = 'appheap,off'`.
If things are going fine, both strings `appheap ,off` and `appheap,off`should work fine.