1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 00:02:21 +01:00

Fix some issues with wifi driver after IDF refactor (#2387)

This commit is contained in:
Otto Winter
2021-09-25 09:16:32 +02:00
committed by GitHub
parent 8503e08ee6
commit 278863d027
3 changed files with 102 additions and 81 deletions

View File

@@ -309,6 +309,14 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
this->wifi_apply_hostname_();
// Reset flags, do this _before_ wifi_station_connect as the callback method
// may be called from wifi_station_connect
s_sta_connecting = true;
s_sta_connected = false;
s_sta_got_ip = false;
s_sta_connect_error = false;
s_sta_connect_not_found = false;
ETS_UART_INTR_DISABLE();
ret = wifi_station_connect();
ETS_UART_INTR_ENABLE();
@@ -325,12 +333,6 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
}
}
s_sta_connecting = true;
s_sta_connected = false;
s_sta_got_ip = false;
s_sta_connect_error = false;
s_sta_connect_not_found = false;
return true;
}