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
				
			@@ -41,7 +41,7 @@ void GcodeSuite::M108() {
 | 
			
		||||
 * M112: Emergency Stop
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M112() {
 | 
			
		||||
  kill(PSTR(MSG_KILLED));
 | 
			
		||||
  kill();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,7 @@
 | 
			
		||||
#include "../gcode.h"
 | 
			
		||||
#include "../../module/temperature.h"
 | 
			
		||||
#include "../../module/stepper.h"
 | 
			
		||||
#include "../../module/printcounter.h" // for print_job_timer
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
@@ -95,10 +96,11 @@
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M81() {
 | 
			
		||||
  thermalManager.disable_all_heaters();
 | 
			
		||||
  print_job_timer.stop();
 | 
			
		||||
  planner.finish_and_disable();
 | 
			
		||||
 | 
			
		||||
  #if FAN_COUNT > 0
 | 
			
		||||
    for (uint8_t i = 0; i < FAN_COUNT; i++) fan_speed[i] = 0;
 | 
			
		||||
    zero_fan_speeds();
 | 
			
		||||
    #if ENABLED(PROBING_FANS_OFF)
 | 
			
		||||
      fans_paused = false;
 | 
			
		||||
      ZERO(paused_fan_speed);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user