mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-03 05:46:32 +02:00
fix issue with STA emiting the wrong event
This commit is contained in:
@ -313,8 +313,12 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event)
|
||||
WiFiSTAClass::_setStatus(WL_DISCONNECTED);
|
||||
} else if(event->event_id == SYSTEM_EVENT_STA_STOP) {
|
||||
WiFiSTAClass::_setStatus(WL_NO_SHIELD);
|
||||
} else if(event->event_id == SYSTEM_EVENT_STA_CONNECTED) {
|
||||
WiFiSTAClass::_setStatus(WL_IDLE_STATUS);
|
||||
} else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) {
|
||||
WiFiSTAClass::_setStatus(WL_CONNECTED);
|
||||
if(WiFiSTAClass::status() == WL_IDLE_STATUS) {
|
||||
WiFiSTAClass::_setStatus(WL_CONNECTED);
|
||||
}
|
||||
}
|
||||
|
||||
for(uint32_t i = 0; i < cbEventList.size(); i++) {
|
||||
|
Reference in New Issue
Block a user