From d2ebb0c7a28f3c0331b49831489047026be409a7 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 14 Mar 2018 15:01:20 +0100 Subject: [PATCH] ekf2: advertise wind topic early to make sure ekf2 get the first instance Signed-off-by: Roman --- src/modules/ekf2/ekf2_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 4ba9ad0e3a..86539273d6 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -479,6 +479,9 @@ Ekf2::Ekf2(): _bcoef_x(_params->bcoef_x), _bcoef_y(_params->bcoef_y) { + // advertise the wind topic early to make sure we get the first instance (before the standalone wind estimator) + wind_estimate_s wind_estimate = {}; + _wind_pub = orb_advertise(ORB_ID(wind_estimate), &wind_estimate); } int Ekf2::print_status()