|
@@ -723,12 +723,12 @@ void wifi_setup() {
|
723
|
723
|
// https://github.com/espressif/arduino-esp32/issues/2501#issuecomment-513602522
|
724
|
724
|
debug.println("WiFi: connection work-around");
|
725
|
725
|
WiFi.onEvent([](WiFiEvent_t event, WiFiEventInfo_t info) {
|
726
|
|
- if (info.disconnected.reason == 202) {
|
|
726
|
+ if (info.wifi_sta_disconnected.reason == 202) {
|
727
|
727
|
esp_sleep_enable_timer_wakeup(10);
|
728
|
728
|
esp_deep_sleep_start();
|
729
|
729
|
delay(100);
|
730
|
730
|
}
|
731
|
|
- }, WiFiEvent_t::SYSTEM_EVENT_STA_DISCONNECTED);
|
|
731
|
+ }, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);
|
732
|
732
|
|
733
|
733
|
// Connect to WiFi AP
|
734
|
734
|
debug.println("WiFi: SSID=" WIFI_SSID);
|