planner.cpp: Add FAN_MIN_PWM for slow fan stopping issue …
@CONSULitAS planner.cpp: Add FAN_MIN_PWM for slow fan stopping issue (V2.1 with macro and linear scaling) @thinkyhead thanks for idea on linear scaling
This commit is contained in:
parent
5239a4e839
commit
e55e65d1e4
1 changed files with 10 additions and 5 deletions
|
@ -441,11 +441,16 @@ void check_axes_activity() {
|
||||||
fan_kick_end = 0;
|
fan_kick_end = 0;
|
||||||
}
|
}
|
||||||
#endif //FAN_KICKSTART_TIME
|
#endif //FAN_KICKSTART_TIME
|
||||||
#ifdef FAN_SOFT_PWM
|
#ifdef FAN_MIN_PWM
|
||||||
fanSpeedSoftPwm = tail_fan_speed;
|
#define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - FAN_MIN_PWM)) / 255 ) : 0)
|
||||||
#else
|
#else
|
||||||
analogWrite(FAN_PIN, tail_fan_speed);
|
#define CALC_FAN_SPEED tail_fan_speed
|
||||||
#endif //!FAN_SOFT_PWM
|
#endif // FAN_MIN_PWM
|
||||||
|
#ifdef FAN_SOFT_PWM
|
||||||
|
fanSpeedSoftPwm = CALC_FAN_SPEED;
|
||||||
|
#else
|
||||||
|
analogWrite(FAN_PIN, CALC_FAN_SPEED);
|
||||||
|
#endif // FAN_SOFT_PWM
|
||||||
#endif // HAS_FAN
|
#endif // HAS_FAN
|
||||||
|
|
||||||
#ifdef AUTOTEMP
|
#ifdef AUTOTEMP
|
||||||
|
|
Reference in a new issue