mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 06:00:35 +08:00
EKF2 fix airspeed orb_copy check
This commit is contained in:
@@ -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())) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user