refactor(wifi): Refactor WiFi sleep modes#12067
Conversation
👋 Hello szerwi, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 15m 42s ⏱️ Results for commit 443cfba. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
most of the changes are renaming variables. That makes reading your changes really hard. Please revert var names! |
@me-no-dev sure, I will revert that. Should I use old var names, which are not accurate in some cases, or can I correct them and split those changes into 2 commits (logic change & vars renaming)? |
|
please use the old names and only provide the logic changes. In a separate PR you can rename the variables later |
881fabe to
443cfba
Compare
|
@me-no-dev Var names reverted |
Description of Change
Refactor
WiFiGenericClass::setSleep()andWiFiGenericClass::getSleep()functions.WiFiGenericClass::setSleep()was returning false when requested mode was the same as already set, which is not expected behavior.I have refactored functions logic, unified variables names, removed unused variable
_forceSleepLastModefromWiFiGenericClass.I am not sure if this ifdef should be kept. Is there any reason to disable modem sleep for ESP32 S2? I haven't found any info about it in ESP-IDF docs.
Test Scenarios
Tested on v3.3.4 and ESP32 DevKit
Related links