mirror of https://github.com/arendst/Tasmota.git
Add WIFI_NONE_SLEEP when sleep = 0 and SO60 = 0
This commit is contained in:
parent
1c2d32a2b5
commit
40007bbae9
|
@ -153,11 +153,22 @@ void WiFiSetSleepMode(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Sleep explanation: https://github.com/esp8266/Arduino/blob/3f0c601cfe81439ce17e9bd5d28994a7ed144482/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L255
|
// Sleep explanation: https://github.com/esp8266/Arduino/blob/3f0c601cfe81439ce17e9bd5d28994a7ed144482/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L255
|
||||||
|
/*
|
||||||
if (TasmotaGlobal.sleep && Settings.flag3.sleep_normal) { // SetOption60 - Enable normal sleep instead of dynamic sleep
|
if (TasmotaGlobal.sleep && Settings.flag3.sleep_normal) { // SetOption60 - Enable normal sleep instead of dynamic sleep
|
||||||
WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times
|
WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times
|
||||||
} else {
|
} else {
|
||||||
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Disable sleep (Esp8288/Arduino core and sdk default)
|
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Disable sleep (Esp8288/Arduino core and sdk default)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
if (TasmotaGlobal.sleep && Settings.flag3.sleep_normal) { // SetOption60 - Enable normal sleep instead of dynamic sleep
|
||||||
|
WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times
|
||||||
|
} else {
|
||||||
|
if (0 == TasmotaGlobal.sleep) {
|
||||||
|
WiFi.setSleepMode(WIFI_NONE_SLEEP); // Disable sleep
|
||||||
|
} else {
|
||||||
|
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Sleep (Esp8288/Arduino core and sdk default)
|
||||||
|
}
|
||||||
|
}
|
||||||
WifiSetOutputPower();
|
WifiSetOutputPower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue