Browse Source

Revert breaking change to _FAN_PWM macro

pull/1/head
Scott Lahteine 5 years ago
parent
commit
ee6003be87
  1. 5
      Marlin/src/module/temperature.cpp

5
Marlin/src/module/temperature.cpp

@ -2592,8 +2592,9 @@ void Temperature::tick() {
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#define _FAN_PWM(N) do{ \ #define _FAN_PWM(N) do{ \
const uint8_t spcf = (soft_pwm_count_fan[N] & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \ uint8_t &spcf = soft_pwm_count_fan[N]; \
WRITE_FAN(N, (spcf > pwm_mask)); \ spcf = (spcf & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
WRITE_FAN(N, spcf > pwm_mask ? HIGH : LOW); \
}while(0) }while(0)
#if HAS_FAN0 #if HAS_FAN0
_FAN_PWM(0); _FAN_PWM(0);

Loading…
Cancel
Save