diff --git a/usermods/PWM_fan/usermod_PWM_fan.h b/usermods/PWM_fan/usermod_PWM_fan.h index 624534b1..2dbbfe3b 100644 --- a/usermods/PWM_fan/usermod_PWM_fan.h +++ b/usermods/PWM_fan/usermod_PWM_fan.h @@ -81,6 +81,7 @@ class PWMFanUsermod : public Usermod { detachInterrupt(digitalPinToInterrupt(tachoPin)); // calculate rpm last_rpm = counter_rpm * (60 / numberOfInterrupsInOneSingleRotation); + last_rpm /= tachoUpdateSec; // reset counter counter_rpm = 0; // store milliseconds when tacho was measured the last time