AP_RPM: fix reporting of RPM from the harmonic notch

This commit is contained in:
Andy Piper 2022-09-13 18:13:58 +01:00 committed by Randy Mackay
parent 76c0825136
commit 6a60f1a421

View File

@ -35,7 +35,7 @@ void AP_RPM_HarmonicNotch::update(void)
for (auto &notch : 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();