From 82f41d6e465bf4426d83df9dc439688d312ba64c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 23 Nov 2017 21:40:06 -0600 Subject: [PATCH] fix fan kickstart --- Marlin/planner.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index fad401e3e2..fb0fcb3384 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -427,15 +427,15 @@ void Planner::check_axes_activity() { static millis_t fan_kick_end[FAN_COUNT] = { 0 }; - #define KICKSTART_FAN(f) \ - if (tail_fan_speed[f]) { \ // is the fan turned on? - millis_t ms = millis(); \ - if (fan_kick_end[f] == 0) { \ // not yet kickstarted? - fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \ // kickstart until this time - tail_fan_speed[f] = 255; \ // full speed - } else if (PENDING(ms, fan_kick_end[f])) \ // kickstart in progress? - tail_fan_speed[f] = 255; \ // keep full speed going - } else fan_kick_end[f] = 0 // fan off? kick next time + #define KICKSTART_FAN(f) \ + if (tail_fan_speed[f]) { \ + millis_t ms = millis(); \ + if (fan_kick_end[f] == 0) { \ + fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \ + tail_fan_speed[f] = 255; \ + } else if (PENDING(ms, fan_kick_end[f])) \ + tail_fan_speed[f] = 255; \ + } else fan_kick_end[f] = 0 #if HAS_FAN0 KICKSTART_FAN(0);