Disable Wifi Sleep

This commit is contained in:
fvanroie 2020-02-16 15:24:21 +01:00
parent 09b00f4630
commit 1ebf1a2fcb

View File

@ -163,9 +163,11 @@ void wifiSetup(JsonObject settings)
// wifiEventHandler[0] = WiFi.onStationModeConnected(wifiSTAConnected);
gotIpEventHandler = WiFi.onStationModeGotIP(wifiSTAGotIP); // As soon WiFi is connected, start NTP Client
disconnectedEventHandler = WiFi.onStationModeDisconnected(wifiSTADisconnected);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
#endif
#if defined(ARDUINO_ARCH_ESP32)
WiFi.onEvent(wifi_callback);
WiFi.setSleep(false);
#endif
WiFi.begin(wifiSsid.c_str(), wifiPassword.c_str());