From 2a7ecdeffbc4ede9b55e1f19e03a34268e992e03 Mon Sep 17 00:00:00 2001
From: Eric Duminil <eric.duminil@gmail.com>
Date: Fri, 14 May 2021 23:58:07 +0200
Subject: [PATCH] No AP if not needed

---
 ampel-firmware/web_server.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ampel-firmware/web_server.cpp b/ampel-firmware/web_server.cpp
index 42c5faf..395c9b2 100644
--- a/ampel-firmware/web_server.cpp
+++ b/ampel-firmware/web_server.cpp
@@ -75,7 +75,8 @@ namespace web_server {
 # else
     iotWebConf->setStatusPin(ONBOARD_LED_PIN, HIGH);
 # endif
-    //TODO: Disable AP if WiFi connects
+    iotWebConf->setWifiConnectionTimeoutMs(1000UL * WIFI_TIMEOUT);
+    iotWebConf->skipApStartup();
     //TODO: Add callbacks
     //TODO: Add LED effects
     //TODO: Add other params
-- 
GitLab