From 45fa0f829449419aee83d61f967ca32450e63527 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 22 Jan 2019 14:37:55 +0800 Subject: [PATCH] Fix issue with WiFi lib sending the wrong event ID when debug is on --- libraries/WiFi/src/WiFiGeneric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/WiFiGeneric.cpp b/libraries/WiFi/src/WiFiGeneric.cpp index c9c61e9c..33392f6b 100644 --- a/libraries/WiFi/src/WiFiGeneric.cpp +++ b/libraries/WiFi/src/WiFiGeneric.cpp @@ -339,7 +339,7 @@ const char * system_event_reasons[] = { "UNSPECIFIED", "AUTH_EXPIRE", "AUTH_LEAV #endif esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event) { - log_d("Event: %d - %s", event->event_id, system_event_names[event->event_id]); + if(event->event_id < 26) log_d("Event: %d - %s", event->event_id, system_event_names[event->event_id]); if(event->event_id == SYSTEM_EVENT_SCAN_DONE) { WiFiScanClass::_scanDone();