/* * configurationMode.cpp * * Created on: Aug 20, 2017 * Author: wn */ #include #include #include #include #include "configurationMode.h" #include ESP8266WebServer webServer(80); void configServeNotFound() { webServer.send(404, "text/plain", "page not found"); #ifdef DEBUG Serial.println("page not found served"); #endif } void setupConfigurationNetwork() { WiFi.mode(WIFI_AP); WiFi.softAP(CONFIG_SSID); #ifdef DEBUG Serial.println("AP started"); #endif } void setupConfigurationServer() { webServer.on("/", configServeIndex); webServer.on("/config", configServeGetConfiguration); webServer.onNotFound(configServeNotFound); webServer.begin(); #ifdef DEBUG Serial.println("Webserver started"); #endif } void loopConfiguration() { webServer.handleClient(); }