# HG changeset patch # User Michiel Broek # Date 1705395115 -3600 # Node ID e133a292ad218a70584479a6de8e9c260f694073 # Parent d2a33b279b11658cbd034b036c96486d6ac78742 Version 0.3.23. In a decoction mash step during wait for confirm prompt, leave the setpoint as it was. Set the new temperature after confirmation. Log this. diff -r d2a33b279b11 -r e133a292ad21 CMakeLists.txt --- a/CMakeLists.txt Sun Jan 14 11:19:19 2024 +0100 +++ b/CMakeLists.txt Tue Jan 16 09:51:55 2024 +0100 @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(PROJECT_VER "0.3.22") +set(PROJECT_VER "0.3.23") set(PROJECT_NAME "brewboard") include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff -r d2a33b279b11 -r e133a292ad21 main/automation.c --- a/main/automation.c Sun Jan 14 11:19:19 2024 +0100 +++ b/main/automation.c Tue Jan 16 09:51:55 2024 +0100 @@ -656,7 +656,8 @@ if (MashState == MASH_NONE) { if (runtime.MashStep == 0 && ! runtime.MaltAdded && recipe.MashStep[0].Infuse_temp) { stageTemp = recipe.MashStep[0].Infuse_temp; - } else { + } else if (recipe.MashStep[runtime.MashStep].Type != MASHTYPE_DECOCTION) { + /* Only change temperature if not doing decoction */ stageTemp = recipe.MashStep[runtime.MashStep].Step_temp; } stageTime = recipe.MashStep[runtime.MashStep].Step_time; @@ -671,7 +672,7 @@ ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); log_msg(TAG, "Mash step %d type: %s time: %d sp: %6.4f-%6.4f sv: %6.4f", runtime.MashStep, mashTypes[recipe.MashStep[runtime.MashStep].Type], - stageTime, stageTemp, recipe.MashStep[runtime.MashStep].End_temp, temp_MLT); + stageTime, recipe.MashStep[runtime.MashStep].Step_temp, recipe.MashStep[runtime.MashStep].End_temp, temp_MLT); if (runtime.MashStep) { // Do not annotate before the log is open. @@ -969,13 +970,17 @@ case 1: #ifdef CONFIG_TEMP_SENSORS_SIMULATOR if (MashState == MASH_DECOCT) { - Fake_MLT = recipe.MashStep[runtime.MashStep].Step_temp - 0.72; // Fake the decoction amt. + temp_MLT = Fake_MLT = recipe.MashStep[runtime.MashStep].Step_temp - 0.72; // Fake the decoction amt. if (xSemaphoreTake(xSemaphoreDS18B20, 10) == pdTRUE) { ds18b20_state->mlt_temperature = ((int)(Fake_MLT * 16)) / 16.0; xSemaphoreGive(xSemaphoreDS18B20); } } #endif + if (MashState == MASH_DECOCT) { + /* After decoction set the desired step temperature */ + stageTemp = recipe.MashStep[runtime.MashStep].Step_temp; + } if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { // Start PID again. driver_state->mlt_sp = stageTemp; @@ -989,10 +994,11 @@ Buttons_Show(); TFT_fillRect(65, 120, 190, 40, TFT_BLACK); if (MashState == MASH_INFUSE) { - log_msg(TAG, "Eind infusie"); + log_msg(TAG, "End infusion"); log_annotation(ANNOTATION_EVENT, (char *)"Eind infusie"); } else { - log_msg(TAG, "Eind decoctie"); + log_msg(TAG, "End decoction, sp: %6.4f-%6.4f sv: %6.4f", + recipe.MashStep[runtime.MashStep].Step_temp, recipe.MashStep[runtime.MashStep].End_temp, temp_MLT); log_annotation(ANNOTATION_EVENT, (char *)"Eind decoctie"); } MashState = Sub_Screen = MASH_WAITTEMP;