diff --git a/esp3d/command.cpp b/esp3d/command.cpp index 314f3a52..7e2b8776 100644 --- a/esp3d/command.cpp +++ b/esp3d/command.cpp @@ -1828,9 +1828,10 @@ bool COMMAND::execute_command (int cmd, String cmd_params, tpipe output, level_a String currentline = currentfile.readStringUntil('\n'); currentline.replace("\n",""); currentline.replace("\r",""); + currentline.trim(); if (currentline.length() > 0) { int ESPpos = currentline.indexOf ("[ESP"); - if (ESPpos > -1) { + if (ESPpos ==0) { //is there the second part? int ESPpos2 = currentline.indexOf ("]", ESPpos); if (ESPpos2 > -1) { diff --git a/esp3d/config.h b/esp3d/config.h index 20f62ce0..2cd7e43a 100644 --- a/esp3d/config.h +++ b/esp3d/config.h @@ -19,7 +19,7 @@ */ //version and sources location -#define FW_VERSION "2.1.1.b9" +#define FW_VERSION "2.1.1.b10" #define REPOSITORY "https://github.com/luc-github/ESP3D" //Customize ESP3D //////////////////////////////////////////////////////////////////////// diff --git a/esp3d/syncwebserver.cpp b/esp3d/syncwebserver.cpp index 3d06568e..a0fa36b1 100644 --- a/esp3d/syncwebserver.cpp +++ b/esp3d/syncwebserver.cpp @@ -948,7 +948,7 @@ void handle_web_command() //if it is for ESP module [ESPXXX] cmd.trim(); int ESPpos = cmd.indexOf("[ESP"); - if (ESPpos>-1) { + if (ESPpos==0) { //is there the second part? int ESPpos2 = cmd.indexOf("]",ESPpos); if (ESPpos2>-1) { @@ -1137,7 +1137,7 @@ void handle_web_command_silent() //if it is for ESP module [ESPXXX] cmd.trim(); int ESPpos = cmd.indexOf("[ESP"); - if (ESPpos>-1) { + if (ESPpos==0) { //is there the second part? int ESPpos2 = cmd.indexOf("]",ESPpos); if (ESPpos2>-1) {