From 08fd0420f5869b395fa35770a02485f75dc196b5 Mon Sep 17 00:00:00 2001 From: Maakbaas Date: Tue, 28 Dec 2021 07:29:28 +0100 Subject: [PATCH] Enable Wifi.persistent (fixes #136) --- src/WiFiManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/WiFiManager.cpp b/src/WiFiManager.cpp index dffade3..dc308db 100644 --- a/src/WiFiManager.cpp +++ b/src/WiFiManager.cpp @@ -15,9 +15,10 @@ void WifiManager::begin(char const *apName, unsigned long newTimeout) { captivePortalName = apName; timeout = newTimeout; - + WiFi.mode(WIFI_STA); - + WiFi.persistent(true); + //set static IP if entered ip = IPAddress(configManager.internal.ip); gw = IPAddress(configManager.internal.gw);