ADAPTIVE_FAN_SLOWING extension to hotend thermal protection (#12853)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							459f4fef60
						
					
				
				
					commit
					082f6a27de
				
			@@ -24,6 +24,10 @@
 | 
			
		||||
#include "../../Marlin.h" // for pin_is_protected
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
#if FAN_COUNT > 0
 | 
			
		||||
  #include "../../module/temperature.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * M42: Change pin status via GCode
 | 
			
		||||
 *
 | 
			
		||||
@@ -52,13 +56,13 @@ void GcodeSuite::M42() {
 | 
			
		||||
  #if FAN_COUNT > 0
 | 
			
		||||
    switch (pin) {
 | 
			
		||||
      #if HAS_FAN0
 | 
			
		||||
        case FAN_PIN: fan_speed[0] = pin_status; break;
 | 
			
		||||
        case FAN_PIN: thermalManager.fan_speed[0] = pin_status; break;
 | 
			
		||||
      #endif
 | 
			
		||||
      #if HAS_FAN1
 | 
			
		||||
        case FAN1_PIN: fan_speed[1] = pin_status; break;
 | 
			
		||||
        case FAN1_PIN: thermalManager.fan_speed[1] = pin_status; break;
 | 
			
		||||
      #endif
 | 
			
		||||
      #if HAS_FAN2
 | 
			
		||||
        case FAN2_PIN: fan_speed[2] = pin_status; break;
 | 
			
		||||
        case FAN2_PIN: thermalManager.fan_speed[2] = pin_status; break;
 | 
			
		||||
      #endif
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -100,10 +100,10 @@ void GcodeSuite::M81() {
 | 
			
		||||
  planner.finish_and_disable();
 | 
			
		||||
 | 
			
		||||
  #if FAN_COUNT > 0
 | 
			
		||||
    zero_fan_speeds();
 | 
			
		||||
    thermalManager.zero_fan_speeds();
 | 
			
		||||
    #if ENABLED(PROBING_FANS_OFF)
 | 
			
		||||
      fans_paused = false;
 | 
			
		||||
      ZERO(paused_fan_speed);
 | 
			
		||||
      thermalManager.fans_paused = false;
 | 
			
		||||
      ZERO(thermalManager.paused_fan_speed);
 | 
			
		||||
    #endif
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user