EKF2 fix airspeed orb_copy check

This commit is contained in:
Daniel Agar
2018-04-18 09:04:13 -04:00
parent 477a42e6f6
commit 35cb2d0a9e
+1 -1
View File
@@ -867,7 +867,7 @@ void Ekf2::run()
if (airspeed_updated) {
airspeed_s airspeed;
if (orb_copy(ORB_ID(airspeed), _airspeed_sub, &airspeed)) {
if (orb_copy(ORB_ID(airspeed), _airspeed_sub, &airspeed) == PX4_OK) {
// only set airspeed data if condition for airspeed fusion are met
if ((_arspFusionThreshold.get() > FLT_EPSILON) && (airspeed.true_airspeed_m_s > _arspFusionThreshold.get())) {