mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 14:47:44 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user