Ver Fonte

commit NVS parameter on reboot - release

philippe44 há 5 anos atrás
pai
commit
cce452bf9a
2 ficheiros alterados com 7 adições e 1 exclusões
  1. 6 0
      components/cmd_system/cmd_system.c
  2. 1 1
      main/console.c

+ 6 - 0
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();

+ 1 - 1
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.");