airspeed_selector: fix timeout check

I think this check was the wrong way round which meant that we would end
up with an unsigned int overflow and trigger a reset.
This commit is contained in:
Julian Oes
2021-02-10 11:51:19 +01:00
committed by Lorenz Meier
parent 236975c56c
commit c524e61b97
@@ -357,7 +357,7 @@ AirspeedModule::Run()
_time_last_airspeed_update[i] = _time_now_usec;
} else if (_time_last_airspeed_update[i] - _time_now_usec > 1_s) {
} else if (_time_now_usec - _time_last_airspeed_update[i] > 1_s) {
// declare airspeed invalid if more then 1s since last raw airspeed update
_airspeed_validator[i].reset_airspeed_to_invalid(_time_now_usec);