Merge pull request #8419 from RowanMeara/rm-dithering-1.1.x

[1.1.x] Fix Software Fan PWM
master
Scott Lahteine 7 years ago committed by GitHub
commit f2e222b9e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1746,15 +1746,15 @@ void Temperature::isr() {
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0 #if HAS_FAN0
soft_pwm_count_fan[0] = ((soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0]) >> 1; soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask) + (soft_pwm_amount_fan[0] >> 1);
WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW); WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
soft_pwm_count_fan[1] = ((soft_pwm_count_fan[1] & pwm_mask) + soft_pwm_amount_fan[1]) >> 1; soft_pwm_count_fan[1] = (soft_pwm_count_fan[1] & pwm_mask) + (soft_pwm_amount_fan[1] >> 1);
WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW); WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
soft_pwm_count_fan[2] = ((soft_pwm_count_fan[2] & pwm_mask) + soft_pwm_amount_fan[2]) >> 1; soft_pwm_count_fan[2] = (soft_pwm_count_fan[2] & pwm_mask) + (soft_pwm_amount_fan[2] >> 1);
WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW); WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW);
#endif #endif
#endif #endif

Loading…
Cancel
Save