mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 06:16:02 +08:00
Send M105 only if no temperature is sent
so went printer is heating and automaticaly send temperature no M105 is necessary Add some yield() to avoid possible WD triggered
This commit is contained in:
parent
f12d7d9abb
commit
3aedb9c019
@ -112,6 +112,7 @@ uint8_t i,data;
|
||||
serverClients[i] = data_server->available();
|
||||
continue;
|
||||
}
|
||||
yield();
|
||||
}
|
||||
//no free/disconnected spot so reject
|
||||
WiFiClient serverClient = data_server->available();
|
||||
@ -127,6 +128,7 @@ uint8_t i,data;
|
||||
Serial.write(data);
|
||||
COMMAND::read_buffer_tcp(data);
|
||||
}
|
||||
yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -482,6 +482,7 @@ void handle_web_interface_root()
|
||||
{
|
||||
istatus++;
|
||||
stationtmp = STAILQ_NEXT(stationtmp, next);
|
||||
yield();
|
||||
}
|
||||
//start table as at least one connected
|
||||
buffer2send+=(PROGMEM2CHAR(TABLE_START));
|
||||
@ -500,6 +501,7 @@ void handle_web_interface_root()
|
||||
istatus=0;
|
||||
while(station)
|
||||
{
|
||||
yield();
|
||||
istatus++;
|
||||
//display each client
|
||||
buffer2send+=(PROGMEM2CHAR(TR_S));
|
||||
@ -1483,7 +1485,6 @@ void handle_web_interface_printer()
|
||||
|
||||
void handle_web_interface_status()
|
||||
{
|
||||
Serial.println("M105");
|
||||
Serial.println("M114");
|
||||
String buffer2send =(PROGMEM2CHAR(DATA_S));
|
||||
String description;
|
||||
@ -1491,6 +1492,9 @@ void handle_web_interface_status()
|
||||
static bool flashit = true;
|
||||
int temperature,target;
|
||||
flashit=!flashit;
|
||||
//request temperature only if no feedback
|
||||
if ((system_get_time()-web_interface->last_temp)>3000000)
|
||||
Serial.println("M105");
|
||||
if ((system_get_time()-web_interface->last_temp)<3200000)
|
||||
{
|
||||
if (flashit)status_color="lime";
|
||||
|
Loading…
x
Reference in New Issue
Block a user