mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 11:48:59 +08:00
avoid dead loop if continuous flow from serial
if continuous flow cannot purge so just empty current rx buffer and skip
This commit is contained in:
parent
ae822a6bbf
commit
74b9516ccc
@ -3777,7 +3777,7 @@ void handle_web_command(){
|
|||||||
#if (PURGE_SERIAL == 1)
|
#if (PURGE_SERIAL == 1)
|
||||||
//empty the serial buffer and incoming data
|
//empty the serial buffer and incoming data
|
||||||
LOG("Start PurgeSerial\r\n")
|
LOG("Start PurgeSerial\r\n")
|
||||||
while(Serial.available()){
|
if(Serial.available()){
|
||||||
BRIDGE::processFromSerial2TCP();
|
BRIDGE::processFromSerial2TCP();
|
||||||
delay(1);
|
delay(1);
|
||||||
}
|
}
|
||||||
@ -3791,7 +3791,7 @@ void handle_web_command(){
|
|||||||
LOG(String(cmd.length()))
|
LOG(String(cmd.length()))
|
||||||
#if (PURGE_SERIAL == 1)
|
#if (PURGE_SERIAL == 1)
|
||||||
LOG("Start PurgeSerial\r\n")
|
LOG("Start PurgeSerial\r\n")
|
||||||
while(Serial.available()){
|
if(Serial.available()){
|
||||||
BRIDGE::processFromSerial2TCP();
|
BRIDGE::processFromSerial2TCP();
|
||||||
delay(1);
|
delay(1);
|
||||||
}
|
}
|
||||||
@ -3832,6 +3832,7 @@ void handle_web_command(){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//get the line and transmit it
|
//get the line and transmit it
|
||||||
|
LOG("Check command: ")
|
||||||
LOG(current_line)
|
LOG(current_line)
|
||||||
LOG("\r\n")
|
LOG("\r\n")
|
||||||
//check command
|
//check command
|
||||||
@ -3864,7 +3865,7 @@ void handle_web_command(){
|
|||||||
web_interface->WebServer.sendContent("");
|
web_interface->WebServer.sendContent("");
|
||||||
#if (PURGE_SERIAL == 1)
|
#if (PURGE_SERIAL == 1)
|
||||||
LOG("Start PurgeSerial\r\n")
|
LOG("Start PurgeSerial\r\n")
|
||||||
while(Serial.available()){
|
if(Serial.available()){
|
||||||
BRIDGE::processFromSerial2TCP();
|
BRIDGE::processFromSerial2TCP();
|
||||||
delay(1);
|
delay(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user