* @brief User typed a command. Deal with it. * @retval bool true to continue reading another command */
| 538 | * @retval bool true to continue reading another command |
| 539 | */ |
| 540 | bool handleCommand(const String& cmd) |
| 541 | { |
| 542 | if(logFile.isValid()) { |
| 543 | logFile << _F("handleCommand('") << cmd << "')" << endl; |
| 544 | } |
| 545 | |
| 546 | #define XX(tag, desc) \ |
| 547 | if(cmd.equalsIgnoreCase(F(#tag))) { \ |
| 548 | return handleCommand_##tag(); \ |
| 549 | } |
| 550 | COMMAND_MAP(XX) |
| 551 | #undef XX |
| 552 | |
| 553 | Serial << _F("Unknown command '") << cmd << _F("', try 'help'") << endl; |
| 554 | return true; |
| 555 | } |
| 556 | |
| 557 | /* |
| 558 | * Completion callback for console read test. See readConsole(). |
no test coverage detected