rolling v20210809

This commit is contained in:
jomjol
2021-08-09 21:53:07 +02:00
parent 32f15fc557
commit 6c365dd949
6 changed files with 12 additions and 10 deletions

View File

@@ -115,14 +115,10 @@ static void event_handler(void* arg, esp_event_base_t event_base,
LEDBlinkTask(200, 1, true);
esp_wifi_connect();
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
// LEDBlinkTask(200, 1, true);
// if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY){
esp_wifi_connect();
s_retry_num++;
ESP_LOGI(TAG, "retry to connect to the AP");
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
}
ESP_LOGI(TAG,"connect to the AP fail");
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;