From 15b0baf555e14280378b46be9ea98d4a2fc6e77a Mon Sep 17 00:00:00 2001 From: Roman Date: Sun, 14 Feb 2016 22:00:13 +0100 Subject: [PATCH] ekf2: fixed call to save parameter --- src/modules/ekf2/ekf2_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 8b4075cd24..6f3af7882a 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -569,7 +569,7 @@ void Ekf2::task_main() if ((_params->mag_declination_source & (1 << 1)) && _prev_motors_armed && !vehicle_control_mode.flag_armed) { float decl_deg; _ekf->copy_mag_decl_deg(&decl_deg); - param_set(param_find("EKF2_MAG_DECL"), &decl_deg); + _mag_declination_deg->set(decl_deg); } _prev_motors_armed = vehicle_control_mode.flag_armed;