mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 11:16:45 +00:00
Disable Wifi Sleep
This commit is contained in:
parent
09b00f4630
commit
1ebf1a2fcb
@ -163,9 +163,11 @@ void wifiSetup(JsonObject settings)
|
|||||||
// wifiEventHandler[0] = WiFi.onStationModeConnected(wifiSTAConnected);
|
// wifiEventHandler[0] = WiFi.onStationModeConnected(wifiSTAConnected);
|
||||||
gotIpEventHandler = WiFi.onStationModeGotIP(wifiSTAGotIP); // As soon WiFi is connected, start NTP Client
|
gotIpEventHandler = WiFi.onStationModeGotIP(wifiSTAGotIP); // As soon WiFi is connected, start NTP Client
|
||||||
disconnectedEventHandler = WiFi.onStationModeDisconnected(wifiSTADisconnected);
|
disconnectedEventHandler = WiFi.onStationModeDisconnected(wifiSTADisconnected);
|
||||||
|
WiFi.setSleepMode(WIFI_NONE_SLEEP);
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
WiFi.onEvent(wifi_callback);
|
WiFi.onEvent(wifi_callback);
|
||||||
|
WiFi.setSleep(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WiFi.begin(wifiSsid.c_str(), wifiPassword.c_str());
|
WiFi.begin(wifiSsid.c_str(), wifiPassword.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user