From 4a38d34a0e56f8ae8a13f721946b5dfe9353e87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Marschollek?= Date: Thu, 20 Apr 2023 22:14:33 +0200 Subject: [PATCH] Add a minimum bed temperature of 0 degrees If the bed temperature is less than 2, the print job fails with an error message complaining about an invalid temperature. This happens, for instance, when printing ABS where the bed is not supposed to be heated. This change makes sure that the bed temperature cannot be negative. --- cfgs/misc-macros.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index e959bde..b952b20 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -135,7 +135,7 @@ gcode: {% set startY = printer.configfile.settings.safe_z_home.home_xy_position[1]|float %} {% endif %} - {% set bedtempAlmost = (bedtemp - 2)|int %} + {% set bedtempAlmost = (bedtemp - 2, 0)|max %} {% set hotendtempStepOne = 150|int %} {% set hotendtempStepTwo = 170|int %} @@ -307,4 +307,4 @@ gcode: G4 P{dur} SET_PIN PIN=beeper VALUE=0 G4 P{dur} - {% endfor %} \ No newline at end of file + {% endfor %}