RPMCapture: add back filter reset on timeout

This commit is contained in:
Matthias Grob 2024-12-10 19:52:04 +01:00
parent d027f8bf39
commit b7b384ab2e

View File

@ -129,6 +129,9 @@ void RPMCapture::Run()
if (_period < RPM_PULSE_TIMEOUT) {
// 1'000'000 / [us] -> pulses per second * 60 -> pulses per minute
rpm_raw = 60.f * 1e6f / static_cast<float>(_param_rpm_puls_per_rev.get() * _period);
} else {
_rpm_filter.reset(rpm_raw);
}
if (rpm_raw < RPM_MAX_VALUE) {