From cce452bf9a115b359eabdb2f51d1f05a4edd15f2 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Wed, 27 Nov 2019 21:28:33 -0800 Subject: [PATCH] commit NVS parameter on reboot - release --- components/cmd_system/cmd_system.c | 6 ++++++ main/console.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/cmd_system/cmd_system.c b/components/cmd_system/cmd_system.c index b73e845a..6ccb04c5 100644 --- a/components/cmd_system/cmd_system.c +++ b/components/cmd_system/cmd_system.c @@ -102,6 +102,9 @@ esp_err_t guided_boot(esp_partition_subtype_t partition_subtype) #if RECOVERY_APPLICATION if(partition_subtype ==ESP_PARTITION_SUBTYPE_APP_FACTORY){ ESP_LOGW(TAG,"RECOVERY application is already active"); + if(!wait_for_commit()){ + ESP_LOGW(TAG,"Unable to commit configuration. "); + } ESP_LOGW(TAG, "Restarting after tx complete"); uart_wait_tx_done(UART_NUM_1, 500 / portTICK_RATE_MS); esp_restart(); @@ -110,6 +113,9 @@ esp_err_t guided_boot(esp_partition_subtype_t partition_subtype) #else if(partition_subtype !=ESP_PARTITION_SUBTYPE_APP_FACTORY){ ESP_LOGW(TAG,"SQUEEZELITE application is already active"); + if(!wait_for_commit()){ + ESP_LOGW(TAG,"Unable to commit configuration. "); + } ESP_LOGW(TAG, "Restarting after tx complete"); uart_wait_tx_done(UART_NUM_1, 500 / portTICK_RATE_MS); esp_restart(); diff --git a/main/console.c b/main/console.c index e5c4ad41..6ccd2e0a 100644 --- a/main/console.c +++ b/main/console.c @@ -57,7 +57,7 @@ void process_autoexec(){ char * str_flag = config_alloc_get(NVS_TYPE_STR, "autoexec"); if(!bypass_wifi_manager){ - ESP_LOGW(TAG, "Procesing autoexec commands while wifi_manager active. Wifi related commands will be ignored."); + ESP_LOGW(TAG, "Processing autoexec commands while wifi_manager active. Wifi related commands will be ignored."); } #if RECOVERY_APPLICATION ESP_LOGD(TAG, "Processing autoexec commands in recovery mode. Squeezelite commands will be ignored.");