MCPcopy Create free account
hub / github.com/SmingHub/Sming / handleCommand

Function handleCommand

samples/LiveDebug/app/application.cpp:540–555  ·  view source on GitHub ↗

* @brief User typed a command. Deal with it. * @retval bool true to continue reading another command */

Source from the content-addressed store, hash-verified

538 * @retval bool true to continue reading another command
539 */
540bool 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().

Callers 2

onDataReceivedFunction · 0.70
onConsoleReadCompletedFunction · 0.70

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected