Skip to content

Commit

Permalink
Merge pull request #3800 from BennyE/wifi-better-logs
Browse files Browse the repository at this point in the history
Enhance debug log for wifi scan, sta_start, sta_stop
  • Loading branch information
tannewt committed Dec 7, 2020
2 parents 7ac2000 + 70827ac commit 22ad76b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ports/esp32s2/common-hal/wifi/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,15 @@ static void event_handler(void* arg, esp_event_base_t event_base,
if (event_base == WIFI_EVENT) {
switch (event_id) {
case WIFI_EVENT_SCAN_DONE:
ESP_EARLY_LOGW(TAG, "scan");
xEventGroupSetBits(radio->event_group_handle, WIFI_SCAN_DONE_BIT);
break;
case WIFI_EVENT_STA_START:
ESP_EARLY_LOGW(TAG, "start");
break;
case WIFI_EVENT_STA_STOP:
ESP_EARLY_LOGW(TAG, "stop");
break;
case WIFI_EVENT_STA_CONNECTED:
ESP_EARLY_LOGW(TAG, "connected");
break;
Expand All @@ -74,8 +81,6 @@ static void event_handler(void* arg, esp_event_base_t event_base,
}

// Cases to handle later.
// case WIFI_EVENT_STA_START:
// case WIFI_EVENT_STA_STOP:
// case WIFI_EVENT_STA_AUTHMODE_CHANGE:
default:
break;
Expand Down

0 comments on commit 22ad76b

Please sign in to comment.