mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 06:39:03 +08:00
Fix wrong detection of [ESPXXX]Command if used in macro or web command and sent to printer using M118
This commit is contained in:
parent
91c39aa570
commit
f1b31c6864
@ -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) {
|
||||
|
@ -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 ////////////////////////////////////////////////////////////////////////
|
||||
|
@ -948,7 +948,7 @@ void handle_web_command()
|
||||
//if it is for ESP module [ESPXXX]<parameter>
|
||||
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]<parameter>
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user