Fixes WiFi stability issue
WiFi sometimes fails and cannot reconnect without a sleep cycle. To fix this, we can fully disconnect from the WiFi connection before our reconnection attempt
This commit is contained in:
parent
a8265c9580
commit
d2322083aa
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ void WiFiEvent(WiFiEvent_t event){
|
|||
if (WifiLabel != NULL) {lv_label_set_text(WifiLabel, "");}
|
||||
// automatically try to reconnect
|
||||
Serial.printf("WiFi got disconnected. Will try to reconnect.\r\n");
|
||||
WiFi.disconnect();
|
||||
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue