diff --git a/libraries/AP_NavEKF2/AP_NavEKF2.cpp b/libraries/AP_NavEKF2/AP_NavEKF2.cpp index 3e6c4e80af..01ecc7df9b 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2.cpp @@ -1,6 +1,7 @@ -#include - #include "AP_NavEKF2_core.h" + +#include +#include #include #include #include diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_AirDataFusion.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_AirDataFusion.cpp index 3e8476963f..929c0edd37 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_AirDataFusion.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_AirDataFusion.cpp @@ -1,9 +1,8 @@ -#include - -#include "AP_NavEKF2.h" #include "AP_NavEKF2_core.h" -extern const AP_HAL::HAL& hal; +#include + +#include "AP_NavEKF2.h" /******************************************************** * RESET FUNCTIONS * diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp index 459d3de398..ed19bd078f 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp @@ -1,11 +1,9 @@ -#include +#include "AP_NavEKF2_core.h" + +#include +#include #include "AP_NavEKF2.h" -#include "AP_NavEKF2_core.h" -#include - -extern const AP_HAL::HAL& hal; - // Control filter mode transitions void NavEKF2_core::controlFilterModes() diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_VehicleStatus.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_VehicleStatus.cpp index 2336c522db..8653ad4a7e 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_VehicleStatus.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_VehicleStatus.cpp @@ -1,9 +1,6 @@ -#include - #include "AP_NavEKF2_core.h" -extern const AP_HAL::HAL& hal; - +#include /* Monitor GPS data to see if quality is good enough to initialise the EKF Monitor magnetometer innovations to see if the heading is good enough to use GPS diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp index caf78f8745..08d59b42a2 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.cpp @@ -1,8 +1,10 @@ +#include "AP_NavEKF2_core.h" + #include +#include +#include #include "AP_NavEKF2.h" -#include "AP_NavEKF2_core.h" -#include extern const AP_HAL::HAL& hal; diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.h b/libraries/AP_NavEKF2/AP_NavEKF2_core.h index fcb48be5cc..0dc9c68819 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.h @@ -29,7 +29,8 @@ #include #include #include -#include +#include +#include #include "AP_NavEKF/EKFGSF_yaw.h" @@ -341,7 +342,7 @@ public: private: EKFGSF_yaw *yawEstimator; - AP_DAL &dal; + class AP_DAL &dal; // Reference to the global EKF frontend for parameters class NavEKF2 *frontend;