From 0fcaf6af39459d2f09b2bdfb38210139ed496129 Mon Sep 17 00:00:00 2001 From: tbec Date: Fri, 4 Oct 2019 10:30:04 -0600 Subject: [PATCH] cleaned up a few lines. --- README.md | 12 ++++++------ main/main.c | 1 + main/wifi_manager.c | 4 ++-- sdkconfig.old | 46 ++++++++++++++++++++++++--------------------- 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 593278b..8fbcfbf 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,17 @@ Make menuconfig > AirU Configuration CONFIG_MQTT_HOST="air.eng.utah.edu" -CONFIG_MQTT_USERNAME="sensor" +CONFIG_MQTT_USERNAME="" -CONFIG_MQTT_PASSWORD="PaG06pSo43oM4Cx" +CONFIG_MQTT_PASSWORD="" -CONFIG_INFLUX_MEASUREMENT_NAME="airQuality" +CONFIG_INFLUX_MEASUREMENT_NAME="" -CONFIG_MQTT_ROOT_TOPIC="airu" +CONFIG_MQTT_ROOT_TOPIC="" -CONFIG_MQTT_DATA_PUB_TOPIC="influx" +CONFIG_MQTT_DATA_PUB_TOPIC="" -CONFIG_MQTT_SUB_ALL_TOPIC="all/v2" +CONFIG_MQTT_SUB_ALL_TOPIC="" CONFIG_DATA_UPLOAD_PERIOD=60 diff --git a/main/main.c b/main/main.c index 5bd0eae..b6ecd7a 100755 --- a/main/main.c +++ b/main/main.c @@ -295,6 +295,7 @@ void app_main() /* Panic task */ xTaskCreate(&panic_task, "panic", 2096, NULL, 10, NULL); + vTaskDelay(1000 / portTICK_PERIOD_MS); /* the initialization functions below need to wait until the event groups are created in the above tasks */ /* * These initializations need to be after the tasks, because necessary mutexs get * created above and used below. Better ways to do this but this is simplest. diff --git a/main/wifi_manager.c b/main/wifi_manager.c index 9a80de0..c3b4c8d 100755 --- a/main/wifi_manager.c +++ b/main/wifi_manager.c @@ -846,7 +846,7 @@ void wifi_manager( void * pvParameters ){ WIFI_MANAGER_REQUEST_STA_CONNECT_BIT | WIFI_MANAGER_REQUEST_WIFI_SCAN | WIFI_MANAGER_REQUEST_WIFI_DISCONNECT | - WIFI_MANAGER_REQUEST_RECONNECT | + /*WIFI_MANAGER_REQUEST_RECONNECT |*/ WIFI_MANAGER_REQUEST_PING_TEST, pdFALSE, pdFALSE, portMAX_DELAY ); ESP_LOGI(TAG, "uxBits: 0x%x", uxBits); @@ -1017,7 +1017,7 @@ void wifi_manager( void * pvParameters ){ if(strlen((char*)wifi_manager_config_sta->sta.ssid) > 0) { wifi_manager_connect_async(); } else { - ESP_LOGW("%s:[%d] - Not going to automatically connect to wifi"); + ESP_LOGW(TAG, "%s: [%d] - Not going to automatically connect to wifi", __func__, __LINE__); // Not going retry since... esp would stop working until the next reboot // Do something else but retry connecting } diff --git a/sdkconfig.old b/sdkconfig.old index 3466784..5b14157 100644 --- a/sdkconfig.old +++ b/sdkconfig.old @@ -21,13 +21,13 @@ CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= # # Bootloader config # -CONFIG_LOG_BOOTLOADER_LEVEL_NONE= +CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= CONFIG_LOG_BOOTLOADER_LEVEL_WARN= -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +CONFIG_LOG_BOOTLOADER_LEVEL_INFO= CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= -CONFIG_LOG_BOOTLOADER_LEVEL=3 +CONFIG_LOG_BOOTLOADER_LEVEL=0 CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y CONFIG_BOOTLOADER_FACTORY_RESET= @@ -47,7 +47,7 @@ CONFIG_FLASH_ENCRYPTION_ENABLED= # # Serial flasher config # -CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" +CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-1410" CONFIG_ESPTOOLPY_BAUD_115200B=y CONFIG_ESPTOOLPY_BAUD_230400B= CONFIG_ESPTOOLPY_BAUD_921600B= @@ -67,18 +67,18 @@ CONFIG_ESPTOOLPY_FLASHFREQ_26M= CONFIG_ESPTOOLPY_FLASHFREQ_20M= CONFIG_ESPTOOLPY_FLASHFREQ="40m" CONFIG_ESPTOOLPY_FLASHSIZE_1MB= -CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y -CONFIG_ESPTOOLPY_FLASHSIZE_4MB= +CONFIG_ESPTOOLPY_FLASHSIZE_2MB= +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE_8MB= CONFIG_ESPTOOLPY_FLASHSIZE_16MB= -CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y CONFIG_ESPTOOLPY_BEFORE_NORESET= CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -CONFIG_ESPTOOLPY_AFTER_NORESET= -CONFIG_ESPTOOLPY_AFTER="hard_reset" +CONFIG_ESPTOOLPY_AFTER_RESET= +CONFIG_ESPTOOLPY_AFTER_NORESET=y +CONFIG_ESPTOOLPY_AFTER="no_reset" CONFIG_MONITOR_BAUD_9600B= CONFIG_MONITOR_BAUD_57600B= CONFIG_MONITOR_BAUD_115200B=y @@ -92,9 +92,9 @@ CONFIG_MONITOR_BAUD=115200 # # AirU Configuration # -CONFIG_MQTT_HOST="example.host.com" -CONFIG_MQTT_USERNAME="username" -CONFIG_MQTT_PASSWORD="password" +CONFIG_MQTT_HOST="air.eng.utah.edu" +CONFIG_MQTT_USERNAME="sensor" +CONFIG_MQTT_PASSWORD="PaG06pSo43oM4Cx" CONFIG_INFLUX_MEASUREMENT_NAME="airQuality" CONFIG_MQTT_ROOT_TOPIC="airu" CONFIG_MQTT_DATA_PUB_TOPIC="influx" @@ -107,11 +107,11 @@ CONFIG_SD_CARD_DEBUG= # # Partition Table # -CONFIG_PARTITION_TABLE_SINGLE_APP=y -CONFIG_PARTITION_TABLE_TWO_OTA= +CONFIG_PARTITION_TABLE_SINGLE_APP= +CONFIG_PARTITION_TABLE_TWO_OTA=y CONFIG_PARTITION_TABLE_CUSTOM= CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_two_ota.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y @@ -379,9 +379,13 @@ CONFIG_FATFS_CODEPAGE_936= CONFIG_FATFS_CODEPAGE_949= CONFIG_FATFS_CODEPAGE_950= CONFIG_FATFS_CODEPAGE=437 -CONFIG_FATFS_LFN_NONE=y -CONFIG_FATFS_LFN_HEAP= +CONFIG_FATFS_LFN_NONE= +CONFIG_FATFS_LFN_HEAP=y CONFIG_FATFS_LFN_STACK= +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_API_ENCODING_ANSI_OEM=y +CONFIG_FATFS_API_ENCODING_UTF_16= +CONFIG_FATFS_API_ENCODING_UTF_8= CONFIG_FATFS_FS_LOCK=0 CONFIG_FATFS_TIMEOUT_MS=10000 CONFIG_FATFS_PER_FILE_CACHE=y @@ -452,13 +456,13 @@ CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y # # Log output # -CONFIG_LOG_DEFAULT_LEVEL_NONE= +CONFIG_LOG_DEFAULT_LEVEL_NONE=y CONFIG_LOG_DEFAULT_LEVEL_ERROR= CONFIG_LOG_DEFAULT_LEVEL_WARN= -CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL_INFO= CONFIG_LOG_DEFAULT_LEVEL_DEBUG= CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= -CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_DEFAULT_LEVEL=0 CONFIG_LOG_COLORS=y #