From 06c2d14903468e120cc80a351724ecd85982b651 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 18 Aug 2021 15:53:33 -0400 Subject: [PATCH] ekf2: multi-mode allow first instance to save EKF2_MAG_DECL --- src/modules/ekf2/EKF2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index 398266df86..178f065488 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -1768,7 +1768,7 @@ void EKF2::UpdateMagCalibration(const hrt_abstime ×tamp) _param_ekf2_mag_decl.set(declination_deg); _mag_decl_saved = true; - if (!_multi_mode) { + if (!_multi_mode || (_multi_mode && _instance == 0)) { _param_ekf2_mag_decl.commit_no_notification(); } }