Skip to content

Commit 3f243a6

Browse files
committed
dropped support for arduino-esp32 < 2.0.0, updated example
1 parent b1ffd5e commit 3f243a6

File tree

4 files changed

+15
-24
lines changed

4 files changed

+15
-24
lines changed

examples/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ monitor_filters =
2222
board_build.partitions = partitions.csv
2323

2424
lib_deps =
25-
https://github.com/me-no-dev/ESPAsyncWebServer
26-
https://github.com/MartinVerges/esp32-wifi-manager
25+
ESP32Async/ESPAsyncWebServer@^3.7.4
26+
martinverges/ESP32 Wifi Manager
2727

2828
build_flags =
2929
-std=c++17

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP32 Wifi Manager",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "A multi wifi manager for arduino based ESP applications, with extensive RESTful API, and configuration stored on non volatile memory.",
55
"keywords": "esp32, wifi, ap, softap, sta, restful, api, manager, arduino",
66
"repository":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP32_Wifi_Manager
2-
version=1.3.0
2+
version=1.4.0
33
author=Martin Verges
44
maintainer=Martin Verges <[email protected]>
55
sentence=Wifi manager for ESP32 devices

wifimanager.cpp

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,34 +88,25 @@ WIFIMANAGER::WIFIMANAGER(const char * ns) {
8888
WiFi.onEvent([&](WiFiEvent_t event, WiFiEventInfo_t info) {
8989
logMessage("[WIFI] onEvent() AP mode started!\n");
9090
softApRunning = true;
91-
#if ESP_ARDUINO_VERSION_MAJOR >= 2
92-
}, ARDUINO_EVENT_WIFI_AP_START); // arduino-esp32 2.0.0 and later
93-
#else
94-
}, SYSTEM_EVENT_AP_START); // arduino-esp32 1.0.6
95-
#endif
91+
}, ARDUINO_EVENT_WIFI_AP_START
92+
);
93+
9694
WiFi.onEvent([&](WiFiEvent_t event, WiFiEventInfo_t info) {
9795
logMessage("[WIFI] onEvent() AP mode stopped!\n");
9896
softApRunning = false;
99-
#if ESP_ARDUINO_VERSION_MAJOR >= 2
100-
}, ARDUINO_EVENT_WIFI_AP_STOP); // arduino-esp32 2.0.0 and later
101-
#else
102-
}, SYSTEM_EVENT_AP_STOP); // arduino-esp32 1.0.6
103-
#endif
97+
}, ARDUINO_EVENT_WIFI_AP_STOP
98+
);
99+
104100
// AP client join/leave
105101
WiFi.onEvent([&](WiFiEvent_t event, WiFiEventInfo_t info) {
106102
logMessage("[WIFI] onEvent() new client connected to softAP!\n");
107-
#if ESP_ARDUINO_VERSION_MAJOR >= 2
108-
}, ARDUINO_EVENT_WIFI_AP_STACONNECTED); // arduino-esp32 2.0.0 and later
109-
#else
110-
}, SYSTEM_EVENT_AP_STACONNECTED); // arduino-esp32 1.0.6
111-
#endif
103+
}, ARDUINO_EVENT_WIFI_AP_STACONNECTED
104+
);
105+
112106
WiFi.onEvent([&](WiFiEvent_t event, WiFiEventInfo_t info) {
113107
logMessage("[WIFI] onEvent() Client disconnected from softAP!\n");
114-
#if ESP_ARDUINO_VERSION_MAJOR >= 2
115-
}, ARDUINO_EVENT_WIFI_AP_STADISCONNECTED); // arduino-esp32 2.0.0 and later
116-
#else
117-
}, SYSTEM_EVENT_AP_STADISCONNECTED); // arduino-esp32 1.0.6
118-
#endif
108+
}, ARDUINO_EVENT_WIFI_AP_STADISCONNECTED
109+
);
119110
}
120111

121112
/**

0 commit comments

Comments
 (0)