From 04ba5fa0bdd0bc48dc008f5fccacc1aebca39d12 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Jun 2015 16:16:24 +1000 Subject: [PATCH] AP_AHRS: pass EKF into constructor this makes it possible for var_info in vehicle code to be in text segment --- libraries/AP_AHRS/AP_AHRS_NavEKF.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index 011d71e8db..7748abd2ba 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -34,9 +34,9 @@ class AP_AHRS_NavEKF : public AP_AHRS_DCM { public: // Constructor - AP_AHRS_NavEKF(AP_InertialSensor &ins, AP_Baro &baro, AP_GPS &gps, RangeFinder &rng) : +AP_AHRS_NavEKF(AP_InertialSensor &ins, AP_Baro &baro, AP_GPS &gps, RangeFinder &rng, NavEKF &_EKF) : AP_AHRS_DCM(ins, baro, gps), - EKF(this, baro, rng), + EKF(_EKF), ekf_started(false), startup_delay_ms(1000), start_time_ms(0) @@ -127,7 +127,7 @@ public: private: bool using_EKF(void) const; - NavEKF EKF; + NavEKF &EKF; bool ekf_started; Matrix3f _dcm_matrix; Vector3f _dcm_attitude;