From aa3ec2fbfda25381eb4effb65471f206511a823d 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 661a10da93..50a296b5ad 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))) @@ -987,6 +991,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)); }