Fix kill => disable_all_heaters => print_job_timer.stop (#12146)
- Remove `print_job_timer.stop()` from `disable_all_heaters` - Call `print_job_timer.stop()` for relevant `disable_all_heaters()`. - Split up `kill()` for watchdog interrupt safety
This commit is contained in:
committed by
Scott Lahteine
parent
4cc1c2627e
commit
71e19baf69
@ -36,6 +36,10 @@
|
||||
#include HAL_PATH(../HAL, endstop_interrupts.h)
|
||||
#endif
|
||||
|
||||
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
|
||||
#include "../module/printcounter.h" // for print_job_timer
|
||||
#endif
|
||||
|
||||
Endstops endstops;
|
||||
|
||||
// public:
|
||||
@ -359,7 +363,8 @@ void Endstops::event_handler() {
|
||||
card.sdprinting = false;
|
||||
card.closefile();
|
||||
quickstop_stepper();
|
||||
thermalManager.disable_all_heaters(); // switch off all heaters.
|
||||
thermalManager.disable_all_heaters();
|
||||
print_job_timer.stop();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
|
||||
|
||||
SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START);
|
||||
|
||||
disable_all_heaters(); // switch off all heaters.
|
||||
disable_all_heaters();
|
||||
|
||||
SHV(soft_pwm_amount, bias = d = (MAX_BED_POWER) >> 1, bias = d = (PID_MAX) >> 1);
|
||||
|
||||
@ -779,7 +779,7 @@ void Temperature::manage_heater() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
if (emergency_parser.killed_by_M112) kill(PSTR(MSG_KILLED));
|
||||
if (emergency_parser.killed_by_M112) kill();
|
||||
#endif
|
||||
|
||||
if (!temp_meas_ready) return;
|
||||
@ -949,7 +949,7 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERROR((int)e);
|
||||
SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER_NUM);
|
||||
kill(PSTR(MSG_KILLED));
|
||||
kill();
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@ -1551,9 +1551,6 @@ void Temperature::disable_all_heaters() {
|
||||
pause(false);
|
||||
#endif
|
||||
|
||||
// If all heaters go down then for sure our print job has stopped
|
||||
print_job_timer.stop();
|
||||
|
||||
#define DISABLE_HEATER(NR) { \
|
||||
setTargetHotend(0, NR); \
|
||||
soft_pwm_amount[NR] = 0; \
|
||||
|
Reference in New Issue
Block a user