Updated esp-ide. Changed some logging levels. Disabled support for termios.h

Thu, 04 Jul 2019 15:57:43 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 04 Jul 2019 15:57:43 +0200
changeset 61
c7b8a9931b59
parent 60
f93706c82762
child 62
2e90ada37476

Updated esp-ide. Changed some logging levels. Disabled support for termios.h

main/task_http.c file | annotate | diff | comparison | revisions
main/task_sdcard.c file | annotate | diff | comparison | revisions
main/task_wifi.c file | annotate | diff | comparison | revisions
sdkconfig file | annotate | diff | comparison | revisions
--- a/main/task_http.c	Wed Jul 03 11:18:20 2019 +0200
+++ b/main/task_http.c	Thu Jul 04 15:57:43 2019 +0200
@@ -173,7 +173,7 @@
     strncat(header, "\r\n", 255 - strlen(header));	// Add last empty line.
     err = netconn_write(conn, header, strlen(header), NETCONN_NOCOPY);
     if (err != ERR_OK) {
-	ESP_LOGE(TAG, "%s sendfile %s%s err=%d on header write", ipstr, temp_url, (send_gz) ? ".gz":"", err);
+	ESP_LOGW(TAG, "%s sendfile %s%s err=%d on header write", ipstr, temp_url, (send_gz) ? ".gz":"", err);
 	fclose(f);
 	return;
     }
@@ -192,7 +192,7 @@
 
 	err = netconn_write(conn, buff, bytes, NETCONN_NOCOPY);
 	if (err != ERR_OK) {
-	    ESP_LOGE(TAG, "%s sendfile %s%s err=%d send %u bytes of %ld bytes", ipstr, temp_url,  (send_gz) ? ".gz":"", err, sentsize, filesize);
+	    ESP_LOGW(TAG, "%s sendfile %s%s err=%d send %u bytes of %ld bytes", ipstr, temp_url,  (send_gz) ? ".gz":"", err, sentsize, filesize);
 	    break;
 	}
 	vTaskDelay(2 / portTICK_PERIOD_MS);
@@ -333,7 +333,7 @@
 
     if (err != ERR_OK) {
 	if (err != ERR_TIMEOUT) {	// Ignore timeout
-	    ESP_LOGI(TAG,"%s error %d on read", ipstr, err);
+	    ESP_LOGW(TAG,"%s error %d on read", ipstr, err);
 	}
 	netconn_close(conn);
 	netconn_delete(conn);
@@ -468,7 +468,7 @@
 	err = netconn_accept(conn, &newconn);
 	if (err == ERR_OK) {
 	    if (xQueueSendToBack(client_queue,&newconn,portMAX_DELAY) != pdTRUE) {
-		ESP_LOGE(TAG, "xQueueSendToBack() queue full");	    
+		ESP_LOGW(TAG, "xQueueSendToBack() queue full");	    
 	    };
 	}
 	vTaskDelay(5 / portTICK_PERIOD_MS);
--- a/main/task_sdcard.c	Wed Jul 03 11:18:20 2019 +0200
+++ b/main/task_sdcard.c	Thu Jul 04 15:57:43 2019 +0200
@@ -208,13 +208,13 @@
     // connect SDMMC driver to FATFS
     pdrv = 0xFF;
     if (ff_diskio_get_drive(&pdrv) != ESP_OK || pdrv == 0xFF) {
-	ESP_LOGI(TAG, "the maximum count of volumes is already mounted");
+	ESP_LOGE(TAG, "the maximum count of volumes is already mounted");
 	return ESP_ERR_NO_MEM;
     }
 
     s_base_path = strdup(base_path);
     if (!s_base_path) {
-	ESP_LOGI(TAG, "could not copy base_path");
+	ESP_LOGE(TAG, "could not copy base_path");
 	return ESP_ERR_NO_MEM;
     }
     esp_err_t err = ESP_OK;
@@ -226,7 +226,7 @@
 
     err = (*host_config->init)();
     if (err != ESP_OK) {
-	ESP_LOGI(TAG, "host init returned rc=0x%x", err);
+	ESP_LOGE(TAG, "host init returned rc=0x%x", err);
 	goto fail;
     }
 
@@ -237,7 +237,7 @@
 	err = sdmmc_host_init_slot(host_config->slot, (const sdmmc_slot_config_t*) slot_config);
     }
     if (err != ESP_OK) {
-	ESP_LOGI(TAG, "slot_config returned rc=0x%x", err);
+	ESP_LOGE(TAG, "slot_config returned rc=0x%x", err);
 	goto fail;
     }
     return ESP_OK;
@@ -344,13 +344,13 @@
 
     f = fopen(ff, "r");
     if (f == NULL) {
-	ESP_LOGE(TAG, "FileCopy cannot open %s for read, error %d", ff, errno);
+	ESP_LOGW(TAG, "FileCopy cannot open %s for read, error %d", ff, errno);
 	return 1;
     }
 
     t = fopen(tf, "w+");
     if (t == NULL) {
-	ESP_LOGE(TAG, "FileCopy cannot open %s for create/write, error %d", tf, errno);
+	ESP_LOGW(TAG, "FileCopy cannot open %s for create/write, error %d", tf, errno);
 	fclose(f);
 	return 1;
     }
--- a/main/task_wifi.c	Wed Jul 03 11:18:20 2019 +0200
+++ b/main/task_wifi.c	Thu Jul 04 15:57:43 2019 +0200
@@ -106,7 +106,7 @@
 	    sprintf(config.lastSSID, "%s", task_wifi_ConfigSTA->sta.ssid);
 	    write_config();
 	}
-//	ESP_LOGI(TAG, "SaveStaConfig %s, record %d", wifiStation.SSID, record);
+	ESP_LOGD(TAG, "SaveStaConfig %s, record %d", wifiStation.SSID, record);
     }
 
     return ESP_OK;
@@ -181,7 +181,7 @@
 		const system_event_sta_disconnected_t *disconnected = &event->event_info.disconnected;
 		wifi_ap_record_t    ap;
 
-            	ESP_LOGI(TAG, "Event STA disconnected, ssid:%s, ssid_len:%d, bssid:" MACSTR ", reason:%d",
+            	ESP_LOGW(TAG, "Event STA disconnected, ssid:%s, ssid_len:%d, bssid:" MACSTR ", reason:%d",
                        disconnected->ssid, disconnected->ssid_len, MAC2STR(disconnected->bssid), disconnected->reason);
 		if (xSemaphoreTake(xSemaphoreWiFi, 10) == pdTRUE) {
 		    wifi_state->STA_connected = false;
@@ -203,7 +203,7 @@
 		    break;
 		}
 		if (disconnected->reason == WIFI_REASON_NO_AP_FOUND && _wifi_ScanAPs && _wifi_ScanDone) {
-//		    ESP_LOGI(TAG, "Scan completed, look for another AP, found:%d", _wifi_Scanned);
+		    ESP_LOGD(TAG, "Scan completed, look for another AP, found:%d", _wifi_Scanned);
 		    _wifi_ScanAPs = false;
                     _wifi_ScanDone = false;
 		    for (int i = 0; i < _wifi_Scanned; i++) {
@@ -217,7 +217,7 @@
                             memset(config, 0x00, sizeof(wifi_config_t));
                             memcpy(config->sta.ssid, wifiStation.SSID, strlen(wifiStation.SSID));
                             memcpy(config->sta.password, wifiStation.Password, strlen(wifiStation.Password));
-//			ESP_LOGI(TAG, "new AP %s %s", wifiStation.SSID, wifiStation.Password);
+			    ESP_LOGD(TAG, "new AP %s %s", wifiStation.SSID, wifiStation.Password);
                             xEventGroupSetBits(xEventGroupWifi, TASK_WIFI_REQUEST_STA_CONNECT);
 			    break;
 			}
@@ -269,7 +269,7 @@
 		break;
 
 	case SYSTEM_EVENT_STA_LOST_IP:
-		ESP_LOGI(TAG, "Lost IP address");
+		ESP_LOGW(TAG, "Lost IP address");
 		xEventGroupClearBits(xEventGroupWifi, TASK_WIFI_HAS_IP);
 		if (xSemaphoreTake(xSemaphoreWiFi, 10) == pdTRUE) {
 		    wifi_state->STA_ip[0] = '\0';
@@ -529,7 +529,7 @@
 		    /* save wifi config */
 		    SaveStaConfig();
 		} else {
-		    ESP_LOGI(TAG, "Connection failed");
+		    ESP_LOGW(TAG, "Connection failed");
 		    /* failed attempt to connect regardles of the reason */
 
 		    /* otherwise: reset the config */
@@ -538,7 +538,7 @@
 		xEventGroupClearBits(xEventGroupWifi, TASK_WIFI_REQUEST_STA_CONNECT);
 	    } else {
 		/* hit 10 seconds timeout */
-		ESP_LOGI(TAG, "Connection timeout");
+		ESP_LOGW(TAG, "Connection timeout");
 		xEventGroupClearBits(xEventGroupWifi, TASK_WIFI_REQUEST_STA_CONNECT);
                 vTaskDelay(100 / portTICK_PERIOD_MS);
 		xEventGroupSetBits(xEventGroupWifi, TASK_WIFI_REQUEST_STA_CONNECT);
--- a/sdkconfig	Wed Jul 03 11:18:20 2019 +0200
+++ b/sdkconfig	Thu Jul 04 15:57:43 2019 +0200
@@ -520,8 +520,8 @@
 CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
 # CONFIG_UNITY_ENABLE_FIXTURE is not set
 # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set
-CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
-# CONFIG_SUPPORT_TERMIOS is not set
+CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
+# CONFIG_VFS_SUPPORT_TERMIOS is not set
 CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
 CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
 # CONFIG_WL_SECTOR_SIZE_512 is not set
@@ -675,4 +675,6 @@
 # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
 # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
 CONFIG_IP_LOST_TIMER_INTERVAL=120
+CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
+# CONFIG_SUPPORT_TERMIOS is not set
 # End of deprecated options

mercurial