remove test cmd, introduce resources to cmdServer
This commit is contained in:
5
cmd.cpp
5
cmd.cpp
@ -2,6 +2,7 @@
|
||||
|
||||
#include "cmd.h"
|
||||
#include "fatal.h"
|
||||
#include "Resources.h"
|
||||
|
||||
|
||||
void Cmd::registerYourself(CmdServer *cmdServer) {
|
||||
@ -73,7 +74,7 @@ void CmdServer::parseCommand() {
|
||||
Cmd *c = cmdList[i];
|
||||
m_stream->println(c->getCmdName() + " " + c->getHelp());
|
||||
}
|
||||
m_stream->println("HELP List this help for all commands");
|
||||
m_stream->println(getResource(CMDSERVER_HELP_KEY));
|
||||
} else {
|
||||
bool found = false;
|
||||
for (uint8_t i = 0; i < cmdListIdx; i++) {
|
||||
@ -88,7 +89,7 @@ void CmdServer::parseCommand() {
|
||||
}
|
||||
}
|
||||
if (! found)
|
||||
m_stream->println("command not found");
|
||||
m_stream->println(getResource(CMDSERVER_CMD_NOT_FOUND_KEY));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user