Allows user to set (almost) any PWM frequency (#12638)

This commit is contained in:
Reece Kibble authored and Scott Lahteine committed 2019-03-08 02:15:42 -06:00
1 parent afbec5ff7e
commit dbead66988
80 files changed
+2314 -28

No files matched your search

+12
View File
@@ -1273,6 +1273,18 @@ void Planner::check_axes_activity() {
#if HAS_FAN2
thermalManager.soft_pwm_amount_fan[2] = CALC_FAN_SPEED(2);
#endif
#elif ENABLED(FAST_PWM_FAN)
#if HAS_FAN0
thermalManager.set_pwm_duty(FAN_PIN, CALC_FAN_SPEED(0));
#endif
#if HAS_FAN1
thermalManager.set_pwm_duty(FAN1_PIN, CALC_FAN_SPEED(1));
#endif
#if HAS_FAN2
thermalManager.set_pwm_duty(FAN2_PIN, CALC_FAN_SPEED(2));
#endif
#else
#if HAS_FAN0
analogWrite(FAN_PIN, CALC_FAN_SPEED(0));