Browse Source

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

[1.1.x] Fix Software Fan PWM
Scott Lahteine 6 years ago
parent
commit
f2e222b9e8
No account linked to committer's email address
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/temperature.cpp

+ 3
- 3
Marlin/temperature.cpp View File

@@ -1746,15 +1746,15 @@ void Temperature::isr() {
1746 1746
 
1747 1747
       #if ENABLED(FAN_SOFT_PWM)
1748 1748
         #if HAS_FAN0
1749
-          soft_pwm_count_fan[0] = ((soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0]) >> 1;
1749
+          soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask) + (soft_pwm_amount_fan[0] >> 1);
1750 1750
           WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW);
1751 1751
         #endif
1752 1752
         #if HAS_FAN1
1753
-          soft_pwm_count_fan[1] = ((soft_pwm_count_fan[1] & pwm_mask) + soft_pwm_amount_fan[1]) >> 1;
1753
+          soft_pwm_count_fan[1] = (soft_pwm_count_fan[1] & pwm_mask) + (soft_pwm_amount_fan[1] >> 1);
1754 1754
           WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW);
1755 1755
         #endif
1756 1756
         #if HAS_FAN2
1757
-          soft_pwm_count_fan[2] = ((soft_pwm_count_fan[2] & pwm_mask) + soft_pwm_amount_fan[2]) >> 1;
1757
+          soft_pwm_count_fan[2] = (soft_pwm_count_fan[2] & pwm_mask) + (soft_pwm_amount_fan[2] >> 1);
1758 1758
           WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW);
1759 1759
         #endif
1760 1760
       #endif

Loading…
Cancel
Save