mirror of
https://github.com/esphome/esphome.git
synced 2025-01-31 02:00:55 +00:00
Fix compile errors with pioarduino/platform-espressif32: wifi_component_esp32_arduino.cpp (#7998)
This commit is contained in:
parent
8fbd512952
commit
3fa67fad32
@ -11,6 +11,11 @@
|
|||||||
#ifdef USE_WIFI_WPA2_EAP
|
#ifdef USE_WIFI_WPA2_EAP
|
||||||
#include <esp_wpa2.h>
|
#include <esp_wpa2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_WIFI_AP
|
||||||
|
#include "dhcpserver/dhcpserver.h"
|
||||||
|
#endif // USE_WIFI_AP
|
||||||
|
|
||||||
#include "lwip/apps/sntp.h"
|
#include "lwip/apps/sntp.h"
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
@ -638,7 +643,12 @@ void WiFiComponent::wifi_event_callback_(esphome_wifi_event_id_t event, esphome_
|
|||||||
}
|
}
|
||||||
|
|
||||||
WiFiSTAConnectStatus WiFiComponent::wifi_sta_connect_status_() {
|
WiFiSTAConnectStatus WiFiComponent::wifi_sta_connect_status_() {
|
||||||
auto status = WiFiClass::status();
|
#if USE_ARDUINO_VERSION_CODE < VERSION_CODE(3, 1, 0)
|
||||||
|
const auto status = WiFiClass::status();
|
||||||
|
#else
|
||||||
|
const auto status = WiFi.status();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (status == WL_CONNECT_FAILED || status == WL_CONNECTION_LOST) {
|
if (status == WL_CONNECT_FAILED || status == WL_CONNECTION_LOST) {
|
||||||
return WiFiSTAConnectStatus::ERROR_CONNECT_FAILED;
|
return WiFiSTAConnectStatus::ERROR_CONNECT_FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user