example: do not check the return value of esp_wifi_connect()

This commit is contained in:
xiehang
2021-01-15 19:40:25 +08:00
parent 7e63061fae
commit 2f4ef71beb
13 changed files with 22 additions and 22 deletions

View File

@@ -24,7 +24,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
switch(event->event_id) {
case SYSTEM_EVENT_STA_START:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
@@ -39,7 +39,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
// Stop webserver tests
if (*hd) {

View File

@@ -37,7 +37,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
switch(event->event_id) {
case SYSTEM_EVENT_STA_START:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
@@ -46,7 +46,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
break;
default:
break;

View File

@@ -197,7 +197,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
switch(event->event_id) {
case SYSTEM_EVENT_STA_START:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
@@ -211,7 +211,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
/* Stop the webserver */
if (*server) {

View File

@@ -255,7 +255,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
switch(event->event_id) {
case SYSTEM_EVENT_STA_START:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
@@ -269,7 +269,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
ESP_ERROR_CHECK(esp_wifi_connect());
esp_wifi_connect();
/* Stop the web server */
if (*server) {