Merge pull request #4015 from ascillato/patch-1

Add comment for sleep command (datasheet)
This commit is contained in:
Theo Arends 2018-10-08 22:40:26 +02:00 committed by GitHub
commit be5f86f911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1298,13 +1298,13 @@ void WiFiSetSleepMode()
* See https://github.com/arendst/Sonoff-Tasmota/issues/2559
*/
//#ifdef ARDUINO_ESP8266_RELEASE_2_4_1
// Sleep explanation: https://github.com/esp8266/Arduino/blob/3f0c601cfe81439ce17e9bd5d28994a7ed144482/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L255
#if defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
#else // Enabled in 2.3.0, 2.4.0 and stage
if (sleep) {
WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times
} else {
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Diable sleep (Esp8288/Arduino core and sdk default)
WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Disable sleep (Esp8288/Arduino core and sdk default)
}
#endif
}