From 18bac7dcc7edbcb417a17815f28c342aef0efb14 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 12 Sep 2024 02:18:44 +0200 Subject: [PATCH] Remove old settings from sdkconfig and add optimizations --- dependencies.lock | 2 +- sdkconfig.defaults | 13 +++---------- src/lib/led_handler.cpp | 4 ++-- src/lib/ota.cpp | 2 ++ 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dependencies.lock b/dependencies.lock index f47f33d..2cb885d 100644 --- a/dependencies.lock +++ b/dependencies.lock @@ -4,6 +4,6 @@ dependencies: source: type: idf version: 4.4.7 -manifest_hash: 3117ab97df715ceaa7b9cacfc3cc7071408d26f122740eea130b5286dc5cd988 +manifest_hash: 841ba2a95f4b32d39636bf4fdf07c48a2052f71c9728a5b7f263083a3b430a4f target: esp32s3 version: 1.0.0 diff --git a/sdkconfig.defaults b/sdkconfig.defaults index ffb944e..ab761ec 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -16,18 +16,14 @@ CONFIG_HEAP_POISONING_LIGHT=y CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y CONFIG_BOOTLOADER_LOG_LEVEL=0 -CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_LOG_DEFAULT_LEVEL_NONE=y CONFIG_LOG_DEFAULT_LEVEL=0 CONFIG_LOG_MAXIMUM_LEVEL=0 -CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y -CONFIG_LOG_BOOTLOADER_LEVEL=0 -CONFIG_CXX_EXCEPTIONS=y CONFIG_COMPILER_CXX_EXCEPTIONS=y #CONFIG_BOOTLOADER_WDT_ENABLE=n -#CONFIG_TASK_WDT=n +#CONFIG_ESP_TASK_WDT=n #Required for BTClock #CONFIG_SPIRAM_MODE_OCT=y @@ -42,14 +38,11 @@ CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=12 CONFIG_ESP32_WIFI_RX_BA_WIN=6 CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120 -CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240 CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y CONFIG_RTC_CLK_CAL_CYCLES=576 CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120 CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=n CONFIG_SPIRAM_CACHE_WORKAROUND=y -CONFIG_COMPILER_OPTIMIZATION_PERF=y -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -CONFIG_MBEDTLS_SSL_SERVER_VERIFY=n -CONFIG_MBEDTLS_SSL_VERIFY_CLIENT_CERTIFICATE=n \ No newline at end of file +CONFIG_COMPILER_OPTIMIZATION_PERF=y +CONFIG_NEWLIB_NANO_FORMAT=y \ No newline at end of file diff --git a/src/lib/led_handler.cpp b/src/lib/led_handler.cpp index 1b6756e..8dccf82 100644 --- a/src/lib/led_handler.cpp +++ b/src/lib/led_handler.cpp @@ -323,6 +323,8 @@ void ledTask(void *parameter) break; } case LED_FLASH_UPDATE: + blinkDelayTwoColor(250, 3, pixels.Color(0, 230, 0), + pixels.Color(230, 230, 0)); break; case LED_FLASH_BLOCK_NOTIFY: { @@ -574,7 +576,6 @@ void saveLedState() { int pixelColor = pixels.getPixelColor(i); char key[12]; - snprintf(key, 12, "%s%d", "ledColor_", i); preferences.putUInt(key, pixelColor); } @@ -586,7 +587,6 @@ void restoreLedState() for (int i = 0; i < pixels.numPixels(); i++) { char key[12]; - snprintf(key, 12, "%s%d", "ledColor_", i); uint pixelColor = preferences.getUInt(key, pixels.Color(0, 0, 0)); pixels.setPixelColor(i, pixelColor); } diff --git a/src/lib/ota.cpp b/src/lib/ota.cpp index 3a391ca..d4b11a6 100644 --- a/src/lib/ota.cpp +++ b/src/lib/ota.cpp @@ -84,7 +84,9 @@ void handleOTATask(void *parameter) if (xQueueReceive(otaQueue, &msg, 0) == pdTRUE) { if (msg.updateType == UPDATE_ALL) { + queueLedEffect(LED_FLASH_UPDATE); int resultWebUi = downloadUpdateHandler(UPDATE_WEBUI); + queueLedEffect(LED_FLASH_UPDATE); int resultFw = downloadUpdateHandler(UPDATE_FIRMWARE); if (resultWebUi == 0 && resultFw == 0) {