From 7daa76382f858817ea7b52d11f9fae88d252988d Mon Sep 17 00:00:00 2001 From: Robby Candra Date: Sun, 5 Dec 2021 05:14:19 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Park=20nozzle=20on=20"loud=20kil?= =?UTF-8?q?l"=20(#23172)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/temperature.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 758275d21e..9d6c8ae061 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -67,6 +67,10 @@ #include "../gcode/gcode.h" #endif +#if ENABLED(NOZZLE_PARK_FEATURE) + #include "../libs/nozzle.h" +#endif + // MAX TC related macros #define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) #define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) @@ -991,6 +995,12 @@ inline void loud_kill(FSTR_P const lcd_msg, const heater_id_t heater_id) { } WRITE(BEEPER_PIN, HIGH); #endif + #if ENABLED(NOZZLE_PARK_FEATURE) + if (!homing_needed_error()) { + nozzle.park(0); + planner.synchronize(); + } + #endif kill(lcd_msg, HEATER_FSTR(heater_id)); }