add support for command line reset

This commit is contained in:
Nicu Hodos 2024-06-29 13:37:22 +02:00
parent 5ef715227d
commit a68b9b4971

View File

@ -17,6 +17,11 @@ namespace Board {
Task tReadCommand(TASK_IMMEDIATE, TASK_FOREVER, [](){
if (serialReader.readLine(Serial) > 0) {
char* cmd = serialReader.getBuffer();
if (strcmp("reset", cmd) == 0) {
Serial.println("resetting...");
ESP.restart();
Serial.println("resetting failed");
}
runJsonCommand(cmd);
}
}, &ts);