From 7682a85982ce1b3b0f4d91f904d9d072fde18463 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 26 Mar 2016 01:26:36 +0100 Subject: [PATCH] Improve HTML presentation --- WifiControlSensor/WebServer.ino | 44 ++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/WifiControlSensor/WebServer.ino b/WifiControlSensor/WebServer.ino index 1068291..c8ae975 100644 --- a/WifiControlSensor/WebServer.ino +++ b/WifiControlSensor/WebServer.ino @@ -1,17 +1,26 @@ void WebHandleRoot() { server.send(200, "text/html", "" - "

You are connected on " + String(hostName) +"


" - "Current temperature " + String(temp, 2) + "C
" - "Current pressure " + String(pressure, 2) + "mB
" + "

You are connected to " + String(hostName) + "

" + "
" + "Sensors" + "Temperature " + String(temp, 2) + "C
" + "Pressure " + String(pressure, 2) + "mB
" + "
" + "
" + "Pump" + "Power PUMP ON
" + "Power PUMP OFF
" + "
" + "
" + "Settings" + "Enter Setup
" + "Put device in OTA mode
" "MQTT Status: " + (MqttIsConnected() ? "Connected" : "Disconnected") + "
" "BMP 180 (Temp+Pression) Status: " + (BMP180IsConnected() ? "Connected" : "Disconnected") + "
" - "Free space: "+ ESP.getFreeSketchSpace() +"
" - "Free heap: "+ ESP.getFreeHeap() +"
" - "Setup
" - "OTA mode
" - "ON
" - "OFF
" + "Free space: " + ESP.getFreeSketchSpace() + "
" + "Free heap: " + ESP.getFreeHeap() + "
" + "
" ); } @@ -30,16 +39,16 @@ void WebHandleSetup() { server.send(200, "text/html", "
" "
" "Wifi configuration:" - "
" - "
" - "
" + "

" + "

" + "

" "
" "
" "MQTT:" - "
" - "
" - "
" - "
" + "

" + "

" + "

" + "

" "
" "
" "
"); @@ -81,7 +90,8 @@ void WebHandleOTA() { Serial.println("Boot mode Set to OTA"); EepromSaveBootMode(BOOTMODE_OTA); server.send(200, "text/html", "

OTA Mode set


" - "You can reboot now"); + "You can reboot now" + "Reboot
"); } void WebHandleNotFound() {