From 835e990d888cf6605e42e1742751cae4e70823b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Marschollek?= Date: Fri, 21 Apr 2023 20:40:04 +0200 Subject: [PATCH] Avoid cooling down the extruder in PRINT_START The current `PRINT_START` macro heats the extruder to 150 degrees, then to 170, and finally to the target temperature. If the extruder is already hot, this unnecessarily cools it down and wastes time. This change only cools down the hotend if it's above the target temperature and then only to that temperature. If the extruder was colder than 150 degrees, this change maintains the current behaviour. --- 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 007bf92..e987a76 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -136,8 +136,8 @@ gcode: {% endif %} {% set bedtempAlmost = (bedtemp - 2, 0)|max %} - {% set hotendtempStepOne = 150|int %} - {% set hotendtempStepTwo = 170|int %} + {% set hotendtempStepOne = ((hotendtemp, printer[printer.toolhead.extruder].temperature|int)|min, 150)|max %} + {% set hotendtempStepTwo = ((hotendtemp, printer[printer.toolhead.extruder].temperature|int)|min, 170)|max %} BED_MESH_PROFILE LOAD=default ; NOTE if not using a mesh, comment out this line ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1