From 35cb2d0a9e56428e5ea9c7116e9356d86aadede7 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 18 Apr 2018 09:04:13 -0400 Subject: [PATCH] EKF2 fix airspeed orb_copy check --- src/modules/ekf2/ekf2_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index fb630bfd32..23821ca85c 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -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())) {