Browse Source

EKF2 fix airspeed orb_copy check

sbg
Daniel Agar 7 years ago
parent
commit
35cb2d0a9e
  1. 2
      src/modules/ekf2/ekf2_main.cpp

2
src/modules/ekf2/ekf2_main.cpp

@ -867,7 +867,7 @@ void Ekf2::run() @@ -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())) {

Loading…
Cancel
Save