refactoring into multiple files, not tested on hardware
This commit is contained in:
19
command_processor.cpp
Normal file
19
command_processor.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user