Skip to content

Commit

Permalink
馃毟 Park nozzle on "loud kill" (#23172)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbycandra authored and thinkyhead committed Dec 25, 2021
1 parent 4468516 commit aa3ec2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit aa3ec2f

Please sign in to comment.