Chris Mullins пре 8 година
родитељ
комит
28181ad5a4
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      lib/WebServer/MiLightHttpServer.cpp

+ 4 - 0
lib/WebServer/MiLightHttpServer.cpp

@@ -64,6 +64,10 @@ void MiLightHttpServer::handleSystemPost() {
   if (request.containsKey("command")) {
     if (request["command"] == "restart") {
       Serial.println("Restarting...");
+      server.send(200, "text/plain", "true");
+      
+      delay(100);
+      
       ESP.restart();
     }
   }