ADAPTIVE_FAN_SLOWING extension to hotend thermal protection (#12853)

This commit is contained in:
InsanityAutomation
2019-01-12 01:41:48 -05:00
committed by Scott Lahteine
parent 459f4fef60
commit 082f6a27de
88 changed files with 405 additions and 161 deletions

View File

@ -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

View File

@ -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