Merge pull request #2093 from thinkyhead/timeout_default

Tweak to fan kick routine
This commit is contained in:
Scott Lahteine 2015-05-16 19:43:45 -07:00
commit 98c4f22432

View file

@ -429,11 +429,12 @@ void check_axes_activity() {
#ifdef FAN_KICKSTART_TIME #ifdef FAN_KICKSTART_TIME
static millis_t fan_kick_end; static millis_t fan_kick_end;
if (tail_fan_speed) { if (tail_fan_speed) {
millis_t ms = millis();
if (fan_kick_end == 0) { if (fan_kick_end == 0) {
// Just starting up fan - run at full power. // Just starting up fan - run at full power.
fan_kick_end = millis() + FAN_KICKSTART_TIME; fan_kick_end = ms + FAN_KICKSTART_TIME;
tail_fan_speed = 255; tail_fan_speed = 255;
} else if (fan_kick_end > millis()) } else if (fan_kick_end > ms)
// Fan still spinning up. // Fan still spinning up.
tail_fan_speed = 255; tail_fan_speed = 255;
} else { } else {