#include #include "ProjGlobals.h" #include "Web_RootPage.h" #include "GrowController.h" #include "Web_Resources.h" void HandleRootPage() { if (server.hasArg("SW")) { String newState = server.arg("SW"); if (newState == "1") { SetCircuit(CMD_On); Serial.printf("SW 1\n"); } else if (newState == "0") { SetCircuit(CMD_Off); Serial.printf("SW 0\n"); } else if (newState == "2") { SetCircuit(CMD_Toggle); Serial.printf("SW 2\n"); } else { Serial.printf("SW %s ???\n", newState.c_str()); ; // no action } } String modeText = (isStationMode) ? "Station mode
" : "Access Point mode
"; String status = GetCircuitStatus() ? "On
" : "Off
"; String myIP = String(WiFi.localIP()[0]); myIP += "." + String(WiFi.localIP()[1]); myIP += "." + String(WiFi.localIP()[2]); myIP += "." + String(WiFi.localIP()[3]); server.send_P(200, "text/html", index_htm); }