From 19b7421f865d6e32cdc64a1f78264385712cfb55 Mon Sep 17 00:00:00 2001 From: kamilritz Date: Tue, 21 Jan 2020 14:38:53 +0100 Subject: [PATCH] Update EKF baro interface --- src/modules/ekf2/ekf2_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 0018f00d44..60c40ec063 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -911,7 +911,8 @@ void Ekf2::Run() if (_airdata_sub.copy(&airdata)) { _ekf.set_air_density(airdata.rho); - _ekf.setBaroData((uint64_t)airdata.timestamp, airdata.baro_alt_meter); + const baroSample baro_sample {airdata.baro_alt_meter, airdata.timestamp}; + _ekf.setBaroData(baro_sample); ekf2_timestamps.vehicle_air_data_timestamp_rel = (int16_t)((int64_t)airdata.timestamp / 100 - (int64_t)ekf2_timestamps.timestamp / 100); }