Fix typos in check_axes_activity

master
Scott Lahteine 9 years ago
parent 83795d3e63
commit 71718d888a

@ -433,23 +433,20 @@ void check_axes_activity() {
#if HAS_FAN #if HAS_FAN
#ifdef FAN_KICKSTART_TIME #ifdef FAN_KICKSTART_TIME
static millis_t fan_kick_end; static millis_t fan_kick_end = 0;
if (tail_fan_speed) { if (tail_fan_speed) {
millis_t ms = millis(); millis_t ms = millis();
if (fan_kick_end == 0) { if (fan_kick_end == 0) {
// Just starting up fan - run at full power.
fan_kick_end = ms + FAN_KICKSTART_TIME; fan_kick_end = ms + FAN_KICKSTART_TIME;
tail_fan_speed = 255; tail_fan_speed = 255; // Starting up.
} }
else if (fan_kick_end > ms) else if (ms < fan_kick_end)
// Fan still spinning up. tail_fan_speed = 255; // Still spinning up.
tail_fan_speed = 255; else
}
else {
fan_kick_end = 0; fan_kick_end = 0;
} }
#endif //FAN_KICKSTART_TIME #endif //FAN_KICKSTART_TIME
#if ENABLED(FAN_MIN_PWM) #if defined(FAN_MIN_PWM)
#define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - FAN_MIN_PWM)) / 255 ) : 0) #define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - FAN_MIN_PWM)) / 255 ) : 0)
#else #else
#define CALC_FAN_SPEED tail_fan_speed #define CALC_FAN_SPEED tail_fan_speed

Loading…
Cancel
Save