From 9d3f4d190694d953275b6bfc73f0a313cf7f031e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Tue, 13 Sep 2022 18:13:58 +0100 Subject: [PATCH] AP_RPM: fix reporting of RPM from the harmonic notch --- libraries/AP_RPM/RPM_HarmonicNotch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_RPM/RPM_HarmonicNotch.cpp b/libraries/AP_RPM/RPM_HarmonicNotch.cpp index eae7178f35..6846355f03 100644 --- a/libraries/AP_RPM/RPM_HarmonicNotch.cpp +++ b/libraries/AP_RPM/RPM_HarmonicNotch.cpp @@ -35,7 +35,7 @@ void AP_RPM_HarmonicNotch::update(void) for (auto ¬ch : ins.harmonic_notches) { if (notch.params.enabled() && notch.params.tracking_mode() != HarmonicNotchDynamicMode::Fixed) { - state.rate_rpm = notch.params.center_freq_hz() * 60; + state.rate_rpm = notch.calculated_notch_freq_hz[0] * 60; state.rate_rpm *= ap_rpm._params[state.instance].scaling; state.signal_quality = 0.5f; state.last_reading_ms = AP_HAL::millis();