Update src/fan_driver.h

This commit is contained in:
2026-04-19 00:40:33 +02:00
parent 9ed9ca0125
commit df654ca53a

View File

@@ -108,6 +108,7 @@ static void fan_driver_compute_rpm(void) {
delta += _fan_driver_delta[i]; delta += _fan_driver_delta[i];
delta /= rpm_buf_size; delta /= rpm_buf_size;
fan_driver_current_rpm = delta ? 30000000 / 2 / delta : 0; fan_driver_current_rpm = delta ? 30000000 / 2 / delta : 0;
// delta is the number of ticks elapsed between tach pin pulses
// each tick is 2us. one minute is 30000000 ticks, each rotation is 2 pulses // each tick is 2us. one minute is 30000000 ticks, each rotation is 2 pulses
} }