From 1657b5030a4571687ac46cc32ae548d0e467bf8d Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 15 Jun 2019 18:56:45 -0400 Subject: [PATCH] wind_estimator always copy attitude and local position data --- src/modules/wind_estimator/wind_estimator_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/wind_estimator/wind_estimator_main.cpp b/src/modules/wind_estimator/wind_estimator_main.cpp index f961cd79fa..65cddf1dc2 100644 --- a/src/modules/wind_estimator/wind_estimator_main.cpp +++ b/src/modules/wind_estimator/wind_estimator_main.cpp @@ -174,13 +174,13 @@ WindEstimatorModule::Run() vehicle_attitude_s att{}; - if (_vehicle_attitude_sub.update(&att)) { + if (_vehicle_attitude_sub.copy(&att)) { att_valid = (time_now_usec - att.timestamp < 1_s) && (att.timestamp > 0); } vehicle_local_position_s lpos{}; - if (_vehicle_local_position_sub.update(&lpos)) { + if (_vehicle_local_position_sub.copy(&lpos)) { lpos_valid = (time_now_usec - lpos.timestamp < 1_s) && (lpos.timestamp > 0) && lpos.v_xy_valid; }