From f5b118bafb5e1edf3d71698e4a38091d71ebd2f8 Mon Sep 17 00:00:00 2001
From: Eric Duminil <eric.duminil@gmail.com>
Date: Thu, 10 Feb 2022 16:12:26 +0100
Subject: [PATCH] Removing unused code

---
 ampel-firmware/web_config.cpp | 8 +-------
 ampel-firmware/web_server.cpp | 2 --
 platformio.ini                | 2 --
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/ampel-firmware/web_config.cpp b/ampel-firmware/web_config.cpp
index e0c1297..f7ef657 100644
--- a/ampel-firmware/web_config.cpp
+++ b/ampel-firmware/web_config.cpp
@@ -14,8 +14,8 @@
 #include "util.h"
 #include "sensor_console.h"
 
-#include <IotWebConfTParameter.h>
 #include <IotWebConf.h>
+#include <IotWebConfTParameter.h>
 #include <IotWebConfOptionalGroup.h>
 
 //TODO: Check memory consumption. Disable DEBUG info?
@@ -237,12 +237,6 @@ namespace web_config {
 # endif
     iotWebConf->setWifiConnectionTimeoutMs(1000UL * WIFI_TIMEOUT);
 
-#if defined(ESP8266)
-  WiFi.hostname(ampel.sensorId);
-#elif defined(ESP32)
-    WiFi.setHostname(ampel.sensorId);
-#endif
-
     iotWebConf->skipApStartup();
     //TODO: Add callbacks
     //TODO: Add LED effects
diff --git a/ampel-firmware/web_server.cpp b/ampel-firmware/web_server.cpp
index 05f2c3a..11c5f61 100644
--- a/ampel-firmware/web_server.cpp
+++ b/ampel-firmware/web_server.cpp
@@ -16,10 +16,8 @@
 #include <IotWebConfTParameter.h>
 #if defined(ESP8266)
 #  include <ESP8266WebServer.h>
-#  include <ESP8266mDNS.h> //allows sensor to be seen as SENSOR_ID.local, from the local network. For example : espd03cc5.local
 #elif defined(ESP32)
 #  include <WebServer.h>
-#  include <ESPmDNS.h>
 #endif
 
 namespace config {
diff --git a/platformio.ini b/platformio.ini
index 07cf7a0..a0443ae 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -16,8 +16,6 @@ platform = espressif8266
 board = esp12e
 framework = arduino
 monitor_speed = 115200
-;build_flags =
-;	-D IOTWEBCONF_DEBUG_DISABLED
 lib_deps =
     EEPROM
     DNSServer
-- 
GitLab