From 47cab3dba52520c4c3e9b42529152baf1148f1ee Mon Sep 17 00:00:00 2001 From: kritz Date: Thu, 23 Jan 2020 15:36:08 +0100 Subject: [PATCH] Update external vision interface (#13989) * Update external vision interface * Update ECL Version --- src/lib/ecl | 2 +- src/modules/ekf2/ekf2_main.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/ecl b/src/lib/ecl index ed916c8006..de33885658 160000 --- a/src/lib/ecl +++ b/src/lib/ecl @@ -1 +1 @@ -Subproject commit ed916c8006d603953dd622de9199d6e73d68d5e2 +Subproject commit de33885658b3cdf6eb63ba15ae851a75657f2576 diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 04e87f6ba5..4f443b876e 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -1095,10 +1095,10 @@ void Ekf2::Run() if (_ev_odom_sub.updated()) { new_ev_data_received = true; - // copy both attitude & position, we need both to fill a single ext_vision_message + // copy both attitude & position, we need both to fill a single extVisionSample _ev_odom_sub.copy(&_ev_odom); - ext_vision_message ev_data; + extVisionSample ev_data; // check for valid velocity data if (PX4_ISFINITE(_ev_odom.vx) && PX4_ISFINITE(_ev_odom.vy) && PX4_ISFINITE(_ev_odom.vz)) { @@ -1158,7 +1158,8 @@ void Ekf2::Run() } // use timestamp from external computer, clocks are synchronized when using MAVROS - _ekf.setExtVisionData(_ev_odom.timestamp, &ev_data); + ev_data.time_us = _ev_odom.timestamp; + _ekf.setExtVisionData(ev_data); ekf2_timestamps.visual_odometry_timestamp_rel = (int16_t)((int64_t)_ev_odom.timestamp / 100 - (int64_t)ekf2_timestamps.timestamp / 100);