diff --git a/WiFiAccessPointConfigurator/WebServer.ino b/WiFiAccessPointConfigurator/WebServer.ino
index 9c8fbb2..df6cc31 100644
--- a/WiFiAccessPointConfigurator/WebServer.ino
+++ b/WiFiAccessPointConfigurator/WebServer.ino
@@ -43,14 +43,14 @@ void handleSave() {
}
server.send(200, "text/html", "
Configuration Saved
"
- "You can reboot now");
+ "You can reboot now");
}
void handleOTA() {
- Serial.println("Boot mode Set to OTA");
- saveBootMode(BOOTMODE_OTA);
- server.send(200, "text/html", "OTA Mode set
"
- "You can reboot now");
+ Serial.println("Boot mode Set to OTA");
+ saveBootMode(BOOTMODE_OTA);
+ server.send(200, "text/html", "OTA Mode set
"
+ "You can reboot now");
}
void handleNotFound() {
@@ -72,10 +72,8 @@ void setupWebServer(int bootmode) {
server.on("/", handleRoot);
server.on("/setup", handleSetup);
server.on("/save", handleSave);
- if (bootmode == BOOTMODE_NORMAL){
- server.on("/gpio", handleGpio);
- server.on("/otamode", handleOTA);
- }
+ server.on("/gpio", handleGpio);
+ server.on("/otamode", handleOTA);
server.onNotFound(handleNotFound);
server.begin();
Serial.println("HTTP server started");
diff --git a/WifiControlSensor/WebServer.ino b/WifiControlSensor/WebServer.ino
index f6e13bb..607b1e3 100644
--- a/WifiControlSensor/WebServer.ino
+++ b/WifiControlSensor/WebServer.ino
@@ -1,6 +1,6 @@
void handleRoot() {
server.send(200, "text/html", "You are connected
"
- "Current temperature "+String(temp,2)+"C
"
+ "Current temperature " + String(temp, 2) + "C
"
"Setup
"
"OTA mode
"
"ON
"
@@ -44,14 +44,14 @@ void handleSave() {
}
server.send(200, "text/html", "Configuration Saved
"
- "You can reboot now");
+ "You can reboot now");
}
void handleOTA() {
- Serial.println("Boot mode Set to OTA");
- saveBootMode(BOOTMODE_OTA);
- server.send(200, "text/html", "OTA Mode set
"
- "You can reboot now");
+ Serial.println("Boot mode Set to OTA");
+ saveBootMode(BOOTMODE_OTA);
+ server.send(200, "text/html", "OTA Mode set
"
+ "You can reboot now");
}
void handleNotFound() {
@@ -73,10 +73,9 @@ void setupWebServer(int bootmode) {
server.on("/", handleRoot);
server.on("/setup", handleSetup);
server.on("/save", handleSave);
- if (bootmode == BOOTMODE_NORMAL){
- server.on("/gpio", handleGpio);
- server.on("/otamode", handleOTA);
- }
+ server.on("/gpio", handleGpio);
+ server.on("/otamode", handleOTA);
+
server.onNotFound(handleNotFound);
server.begin();
Serial.println("HTTP server started");