wind_estimator always copy attitude and local position data

This commit is contained in:
Daniel Agar 2019-06-15 18:56:45 -04:00
parent a175c4407d
commit 1657b5030a
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}