AP_RPM: Move filter step outside of min/max rpm check

This commit is contained in:
Robert Lefebvre 2015-11-20 17:13:33 -05:00 committed by Andrew Tridgell
parent f04668307d
commit 1f8b90e876

View File

@ -92,8 +92,8 @@ void AP_RPM_PX4_PWM::update(void)
}
float rpm = scaling * (1.0e6f * 60) / pwm.period;
float filter_value = signal_quality_filter.get();
state.rate_rpm = signal_quality_filter.apply(rpm);
if ((maximum <= 0 || rpm <= maximum) && (rpm >= minimum)) {
state.rate_rpm = signal_quality_filter.apply(rpm);
if (is_zero(filter_value)){
quality = 0;
} else {