20 lines
431 B
C++
20 lines
431 B
C++
#include "command_processor.h"
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
CommandAction parse_command(const char* input) {
|
|
if (input[0] != '/') {
|
|
return CMD_NONE;
|
|
}
|
|
|
|
if (strcmp(input, "/refresh") == 0) {
|
|
return CMD_REFRESH;
|
|
} else if (strcmp(input, "/clear") == 0) {
|
|
return CMD_CLEAR;
|
|
} else if (strcmp(input, "/wifisetup") == 0) {
|
|
return CMD_WIFI;
|
|
}
|
|
|
|
return CMD_UNKNOWN;
|
|
}
|