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