fix: validation GPIO and reset wifi for arduino-esp32 core 3.x.x fixed

This commit is contained in:
Yurii
2024-06-06 16:37:57 +03:00
parent 018a1c5188
commit baf8adfb02
2 changed files with 6 additions and 4 deletions

View File

@@ -182,9 +182,9 @@ namespace NetworkUtils {
wifi_station_dhcpc_set_maxtry(5);
#endif
#ifdef ARDUINO_ARCH_ESP32
// Nothing. Because memory leaks when turn off WiFi on ESP32, bug?
#if defined(ARDUINO_ARCH_ESP32) && ESP_ARDUINO_VERSION_MAJOR < 3
// Nothing. Because memory leaks when turn off WiFi on ESP32 SDK < 3.0.0
return true;
#else
return WiFi.mode(WIFI_OFF);