forked from Archive/PX4-Autopilot
fw att control: add timestamp dependency in airspeed check
This commit is contained in:
parent
2f06f15240
commit
a977ff2b62
|
@ -632,7 +632,8 @@ FixedwingAttitudeControl::task_main()
|
||||||
|
|
||||||
/* if airspeed is smaller than min, the sensor is not giving good readings */
|
/* if airspeed is smaller than min, the sensor is not giving good readings */
|
||||||
if ((_airspeed.indicated_airspeed_m_s < 0.5f * _parameters.airspeed_min) ||
|
if ((_airspeed.indicated_airspeed_m_s < 0.5f * _parameters.airspeed_min) ||
|
||||||
!isfinite(_airspeed.indicated_airspeed_m_s)) {
|
!isfinite(_airspeed.indicated_airspeed_m_s) ||
|
||||||
|
(float)hrt_elapsed_time(&_airspeed.timestamp) > 1e6f) {
|
||||||
airspeed = _parameters.airspeed_trim;
|
airspeed = _parameters.airspeed_trim;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue