diff --git a/esp8266/command.cpp b/esp8266/command.cpp index 0122ce89..8f599e4d 100644 --- a/esp8266/command.cpp +++ b/esp8266/command.cpp @@ -95,6 +95,26 @@ void COMMAND::execute_command(int cmd,String cmd_params) Serial.print("\r\n"); } break; + case 999: + if (cmd_params=="ERROR") + { + web_interface->error_msg.clear(); + } + else if (cmd_params=="INFO") + { + web_interface->info_msg.clear(); + } + else if (cmd_params=="STATUS") + { + web_interface->status_msg.clear(); + } + else if (cmd_params=="ALL") + { + web_interface->error_msg.clear(); + web_interface->status_msg.clear(); + web_interface->info_msg.clear(); + } + break; //default: } diff --git a/esp8266/data/printer.tpl b/esp8266/data/printer.tpl index 1cdb574d..b61b32b7 100644 --- a/esp8266/data/printer.tpl +++ b/esp8266/data/printer.tpl @@ -37,9 +37,27 @@ $INCLUDE[header.inc]$
-
-
-
+

+
+"; + + +
+
+

+
+"; + + +
+
+

+
+"; + + +
+

diff --git a/esp8266/webinterface.cpp b/esp8266/webinterface.cpp index b552260d..b5f31018 100644 --- a/esp8266/webinterface.cpp +++ b/esp8266/webinterface.cpp @@ -32,6 +32,7 @@ extern "C" { #include #include "LinkedList.h" #include "storestrings.h" +#include "command.h" #ifdef SSDP_FEATURE #include @@ -3091,6 +3092,25 @@ void handle_web_command() Serial.println(scmd); //give an ack - we need to be polite, right ? web_interface->WebServer.send(200,"text/plain","Ok"); + //if it is for ESP module [ESPXXX] + int ESPpos = scmd.indexOf("[ESP"); + if (ESPpos>-1) + {//is there the second part? + int ESPpos2 = scmd.indexOf("]",ESPpos); + if (ESPpos2>-1) + { //Split in command and parameters + String cmd_part1=scmd.substring(ESPpos+4,ESPpos2); + String cmd_part2=""; + //is there space for parameters? + if (ESPpos2