mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-28 06:21:31 +00:00
fix fan kickstart
This commit is contained in:
parent
b8c65078fc
commit
82f41d6e46
@ -428,14 +428,14 @@ void Planner::check_axes_activity() {
|
|||||||
static millis_t fan_kick_end[FAN_COUNT] = { 0 };
|
static millis_t fan_kick_end[FAN_COUNT] = { 0 };
|
||||||
|
|
||||||
#define KICKSTART_FAN(f) \
|
#define KICKSTART_FAN(f) \
|
||||||
if (tail_fan_speed[f]) { \ // is the fan turned on?
|
if (tail_fan_speed[f]) { \
|
||||||
millis_t ms = millis(); \
|
millis_t ms = millis(); \
|
||||||
if (fan_kick_end[f] == 0) { \ // not yet kickstarted?
|
if (fan_kick_end[f] == 0) { \
|
||||||
fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \ // kickstart until this time
|
fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \
|
||||||
tail_fan_speed[f] = 255; \ // full speed
|
tail_fan_speed[f] = 255; \
|
||||||
} else if (PENDING(ms, fan_kick_end[f])) \ // kickstart in progress?
|
} else if (PENDING(ms, fan_kick_end[f])) \
|
||||||
tail_fan_speed[f] = 255; \ // keep full speed going
|
tail_fan_speed[f] = 255; \
|
||||||
} else fan_kick_end[f] = 0 // fan off? kick next time
|
} else fan_kick_end[f] = 0
|
||||||
|
|
||||||
#if HAS_FAN0
|
#if HAS_FAN0
|
||||||
KICKSTART_FAN(0);
|
KICKSTART_FAN(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user