Added ESP32 compatible methods for setting/getting sleep mode by drzony · Pull Request #7901 · esp8266/Arduino
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the comment there is:
// @return true if modem sleep is enabled bool WiFiGenericClass::getSleep()
The naming is confusing, because "light sleep" is also an enabled sleep mode while "none sleep" has sleep mode disabled.
What about replicating the comment in esp8266 .h file, insisting on that it reflects the esp32 API ?
One other option would be to drop the bool version
That would defeat the goal of this PR. We just need to not add it in esp8266 documentation.
esp32 libraries will compile, esp8266 .h readers will see the comment, esp8266 api is unchanged.