Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements quite a few changes in the networking code. WiFi connection logic is no longer blocking: we don't need to wait for the wifi to get connected before entering the main loop. This allows easier simultaneous NMEA 2000 and other protocol use.
The wifi disconnection watchdog that reboots the device after disconnection is now a LambdaConsumer of SystemStatus in SensESPApp instead of being hard-coded in the Networking class. Sure, the behavior is arguably still hard-coded but will be easier to modify in the future. This requires PR #365 to work.
Wifi state changes are now captured and propagated using event handlers. Due to underlying API differences, the implementation is platform-specific (different for ESP8266 and ESP32).
Wifi settings were not reset properly at least on ESP32. Now they're nuked to invalid values on reset to force the device to forget the old values.
Wifi settings are no longer saved on SPIFFS by SensESP. The settings are in any case saved to flash memory by WifiManager, so having them in multiple places just made things more difficult.