Browse Source

added WiFi retry on connection lost

pull/2148/head
Alexey Emelianenko 3 months ago
parent
commit
1317470cc3
  1. 6
      examples/companion_radio/main.cpp

6
examples/companion_radio/main.cpp

@ -221,6 +221,12 @@ void setup() {
void loop() {
the_mesh.loop();
sensors.loop();
if (WiFi.status() != WL_CONNECTED) {
Serial.println("Reconnecting to WiFi...");
WiFi.disconnect();
WiFi.reconnect();
delay(5000); // Give it time to reconnect
}
#ifdef DISPLAY_CLASS
ui_task.loop();
#endif

Loading…
Cancel
Save