# HG changeset patch # User Michiel Broek # Date 1591900819 -7200 # Node ID fa44bd094e01d037a84e7ca993994ff6f470e2cc # Parent 7f02dbee58d001883b2c993feaf9fe8e9e87ab4f Added power usage counters to manual mode. diff -r 7f02dbee58d0 -r fa44bd094e01 main/automation.c --- a/main/automation.c Wed Jun 10 14:09:27 2020 +0200 +++ b/main/automation.c Thu Jun 11 20:40:19 2020 +0200 @@ -385,7 +385,7 @@ } double mwu = (runtime.MLT_usage / 1000.0 / 60.0 / 60.0) * equipment.MLT_watt / 1000.0; double hwu = (runtime.HLT_usage / 1000.0 / 60.0 / 60.0) * equipment.HLT_watt / 1000.0; - log_msg(TAG, "MLT usage %.3f KWU, HLT usage %.3f KWU, total %.3f KWU", mwu, hwu, mwu + hwu); + log_msg(TAG, "MLT usage %.3f KWh, HLT usage %.3f KWh, total %.3f KWh", mwu, hwu, mwu + hwu); _fg = TFT_YELLOW; TFT_setFont(DEJAVU24_FONT, NULL); if (Main_Screen == MAIN_AUTO_DONE) { diff -r 7f02dbee58d0 -r fa44bd094e01 main/manual.c --- a/main/manual.c Wed Jun 10 14:09:27 2020 +0200 +++ b/main/manual.c Thu Jun 11 20:40:19 2020 +0200 @@ -131,6 +131,10 @@ driver_state->mlt_sp = runtime.ManualMLT; xSemaphoreGive(xSemaphoreDriver); } + runtime.MLT_usage = 0; + runtime.HLT_usage = 0; + write_runtime(); + if (_ManualHLT) { if (xSemaphoreTake(xSemaphoreDriver, 10) == pdTRUE) { driver_state->hlt_mode = HLT_MODE_OFF; @@ -168,6 +172,9 @@ driver_state->pump_run = 0; xSemaphoreGive(xSemaphoreDriver); } + double mwu = (runtime.MLT_usage / 1000.0 / 60.0 / 60.0) * equipment.MLT_watt / 1000.0; + double hwu = (runtime.HLT_usage / 1000.0 / 60.0 / 60.0) * equipment.HLT_watt / 1000.0; + log_msg(TAG, "MLT usage %.3f KWh, HLT usage %.3f KWh, total %.3f KWh", mwu, hwu, mwu + hwu); write_runtime(); break; diff -r 7f02dbee58d0 -r fa44bd094e01 main/recipes.c --- a/main/recipes.c Wed Jun 10 14:09:27 2020 +0200 +++ b/main/recipes.c Thu Jun 11 20:40:19 2020 +0200 @@ -523,7 +523,7 @@ _fg = TFT_YELLOW; y += 16; for (i = 0; i < recipe_hdr.mashmax; i++) { - ESP_LOGI(TAG, "%2d %-31s %3d %5.2f %5.2f %2d %2d %7.4f %6.3f", i, recipe.MashStep[i].Name, recipe.MashStep[i].Type, + ESP_LOGD(TAG, "%2d %-31s %3d %5.2f %5.2f %2d %2d %7.4f %6.3f", i, recipe.MashStep[i].Name, recipe.MashStep[i].Type, recipe.MashStep[i].Step_temp, recipe.MashStep[i].End_temp, recipe.MashStep[i].Step_time, recipe.MashStep[i].Ramp_time, recipe.MashStep[i].Infuse_temp, recipe.MashStep[i].Infuse_amount); if (recipe.MashStep[i].Type != 255) {