refactoring into multiple files, not tested on hardware

This commit is contained in:
Adolfo Reyna
2025-12-09 18:41:03 -05:00
parent bc0e082b89
commit 47956bf64c
8 changed files with 552 additions and 439 deletions

19
command_processor.cpp Normal file
View 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;
}