Fan kickstart power option

This commit is contained in:
Scott Lahteine
2022-10-17 14:58:45 -05:00
parent 44589a964d
commit 05d51f9c7f
5 changed files with 22 additions and 8 deletions
+8 -4
View File
@@ -552,10 +552,14 @@
#endif
#endif
// When first starting the main fan, run it at full speed for the
// given number of milliseconds. This gets the fan spinning reliably
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
//#define FAN_KICKSTART_TIME 100
/**
* Fan Kickstart
* When part cooling or controller fans first start, run at a speed that
* gets it spinning reliably for a short time before setting the requested speed.
* (Does not work on Sanguinololu with FAN_SOFT_PWM.)
*/
//#define FAN_KICKSTART_TIME 100 // (ms)
//#define FAN_KICKSTART_POWER 180 // 64-255
// Some coolers may require a non-zero "off" state.
//#define FAN_OFF_PWM 1
+2 -2
View File
@@ -85,10 +85,10 @@ void ControllerFan::update() {
if (speed != FAN_OFF_PWM) {
if (!fan_kick_end) {
fan_kick_end = ms + FAN_KICKSTART_TIME; // May be longer based on slow update interval for controller fn check. Sets minimum
speed = 255;
speed = FAN_KICKSTART_POWER;
}
else if (PENDING(ms, fan_kick_end))
speed = 255;
speed = FAN_KICKSTART_POWER;
}
else
fan_kick_end = 0;
+5
View File
@@ -1074,3 +1074,8 @@
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
#define HAS_DISABLE_INACTIVE_AXIS 1
#endif
// Fan Kickstart
#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
#define FAN_KICKSTART_POWER 180
#endif
+5
View File
@@ -1513,6 +1513,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
#endif
// Fan Kickstart
#if FAN_KICKSTART_TIME && defined(FAN_KICKSTART_POWER) && !WITHIN(FAN_KICKSTART_POWER, 64, 255)
#error "FAN_KICKSTART_POWER must be an integer from 64 to 255."
#endif
/**
* Synchronous M106/M107 checks
*/
+2 -2
View File
@@ -1309,10 +1309,10 @@ void Planner::recalculate(TERN_(HINTS_SAFE_EXIT_SPEED, const_float_t safe_exit_s
if (fan_speed[f]) {
if (fan_kick_end[f] == 0) {
fan_kick_end[f] = ms + FAN_KICKSTART_TIME;
fan_speed[f] = 255;
fan_speed[f] = FAN_KICKSTART_POWER;
}
else if (PENDING(ms, fan_kick_end[f]))
fan_speed[f] = 255;
fan_speed[f] = FAN_KICKSTART_POWER;
}
else
fan_kick_end[f] = 0;