mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-16 12:26:00 +08:00
Better restart
Add 30s progress to ensure restart is finished Hide restart boot loader message redirecting serial output
This commit is contained in:
parent
283270f660
commit
d663f62605
@ -90,7 +90,6 @@ void setup() {
|
||||
}
|
||||
//setup serial
|
||||
Serial.begin(baud_rate);
|
||||
//Serial1.setDebugOutput(true);
|
||||
//setup wifi according settings
|
||||
wifi_config.Setup();
|
||||
delay(1000);
|
||||
@ -186,6 +185,10 @@ uint8_t i,data;
|
||||
}
|
||||
if (web_interface->restartmodule)
|
||||
{
|
||||
Serial.flush();
|
||||
delay(500);
|
||||
Serial.swap();
|
||||
delay(100);
|
||||
ESP.restart();
|
||||
while (1){delay(1);};
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ const char POLLING_NAME[]PROGMEM ="Refresh printer status every :";
|
||||
const char POLLING_ID[]PROGMEM ="POLLING";
|
||||
const char TEXT_HTML[]PROGMEM ="text/html";
|
||||
const char RESTARTCMD [] PROGMEM ="<script>setTimeout(function(){window.location.href='/RESTART'},3000);</script>";
|
||||
const char RESTARTINGMSG [] PROGMEM = "<CENTER>Restarting, please wait.... </CENTER><script>setTimeout(function(){window.location.href='/'},20000);</script>";
|
||||
const char RESTARTINGMSG [] PROGMEM = "<HTML>\n<BODY>\n<CENTER>Restarting, please wait.... \n<BR>\n<PROGRESS name='prg' id='prg'>\n</CENTER>\n<script>\nvar i = 0; var x = document.getElementById(\"prg\"); x.max=30; function refreshbar(){}setInterval(function(){i=i+1; var x = document.getElementById(\"prg\"); x.value=i; if (i>30) {window.location.href='/';}},1000);</script>\n</BODY>\n</HTML>\n";
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user