Improve critical low temperature handling
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 31 Oct 2024 13:29:33 +0000 (14:29 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 31 Oct 2024 13:29:33 +0000 (14:29 +0100)
v10/main.c

index e4ec589..3fe37df 100644 (file)
@@ -458,7 +458,12 @@ void mode_update(void)
                        forced_target_temp = sc_conf.auto_forced_target_heater_temp;
                        forced_heater_duration = sc_conf.auto_forced_heater_duration * T_MULT;
                        forced_cmd_val = sc_conf.auto_forced_mode_value;
-                       forced_heater_delay = sc_conf.auto_forced_heater_delay * T_MULT;
+                       if (water_centi_degrees > 200) {
+                               forced_heater_delay = sc_conf.auto_forced_heater_delay * T_MULT;
+                       } else {
+                               /* Water is about to freeze, do not delay forced heating */
+                               forced_heater_delay = 0;
+                       }
                }
        }