-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WiFi] Prevent setting same WiFi mode multiple times #4285
[WiFi] Prevent setting same WiFi mode multiple times #4285
Conversation
And thus causing stack overflow when handling wifi disconnect while processing wifi disconnect.
This actually does advertise the correct WiFi modes for 802.11n
+ extend Sonoff POW 4M1M build to include more controllers + ADC + _VCC + new features like charts, color rules etc.
This PR is now fixing quite a few WiFi related issues. GH Actions test build: https://github.com/letscontrolit/ESPEasy/actions/runs/3200480365 |
@TD-er, I won't be available to test the build. All ESP modules are buried somewhere in a box. My lab is packed and in storage, in anticipation of the move I mentioned several months ago. All I have at this point is a desktop PC and some printers in a big empty room. Just learned a couple days ago that my Oct 31 move-in date has been delayed until mid-Jan 2023. Bad time to build a new house: Not enough construction workers and delayed material deliveries.
|
Wow, that's a clean lab environment... I bet you can't find anything in there as there simply isn't any ;) So the good news is you didn't find anything wrong with my test build :) |
Affirmative. So far it is perfect. :) |
Great! |
Reduce macro code
When no system time was set and the unit reboots, it restores the "system time" from RTC. However this is not a true system time, but the system behaved as if it has time set.
Also increase time resolution when syncing nodes
After factory reset, or when the ESP is configured to connect to an unreachable AP, ESPEasy was not starting an AP, nor trying to rescan periodically to allow to reconnect to the configured AP.
The HLW8012 does have a few volatile members. However when checking these for != 0 and then use them in a division, you may still end up with a divide by zero crash since these can change any time.
It is now merged, since @thomastech was not able to find any reason not to merge it and @tonhuisman was pushing me to merge it to let people test it a bit more before making the new build in a few days. |
@TD-er I cross my fingers that the massive work (time) you invested here pays off!! |
Thanks! |
Setting the WiFi mode may trigger recursive calls which essentially sets the same WiFi mode multiple times.
This may trigger events which eventually may hurt WiFi stability.
Fixes: #4003