Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_NavEKF2: stop including AP_DAL.h in header #27961

Merged
merged 9 commits into from
Sep 5, 2024
1 change: 1 addition & 0 deletions .github/workflows/test_chibios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
build-options-defaults-test,
signing,
CubeOrange-PPP,
CubeOrange-EKF2,
SOHW,
Pixhawk6X-PPPGW,
new-check,
Expand Down
8 changes: 8 additions & 0 deletions Tools/scripts/build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ for t in $CI_BUILD_TARGET; do
continue
fi

if [ "$t" == "CubeOrange-EKF2" ]; then
echo "Building CubeOrange with EKF2 enabled"
$waf configure --board CubeOrange --enable-ekf2
$waf clean
$waf copter
continue
fi

if [ "$t" == "SOHW" ]; then
echo "Building CubeOrange-SOHW"
Tools/scripts/sitl-on-hardware/sitl-on-hw.py --board CubeOrange --vehicle copter --simclass MultiCopter
Expand Down
1 change: 1 addition & 0 deletions libraries/APM_Control/AP_AutoTune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <AC_PID/AC_PID.h>
#include <AP_Scheduler/AP_Scheduler.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_InertialSensor/AP_InertialSensor.h>

extern const AP_HAL::HAL& hal;

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Camera/AP_Camera_Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <AP_Logger/AP_Logger.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_AHRS/AP_AHRS.h>

// Write a Camera packet. Also writes a Mount packet if available
void AP_Camera_Backend::Write_CameraInfo(enum LogMessages msg, uint64_t timestamp_us)
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_DAL/examples/AP_DAL_Standalone/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//

#include <AP_DAL/AP_DAL.h>
#include <AP_NavEKF2/AP_NavEKF2.h>
#include <AP_NavEKF3/AP_NavEKF3.h>
#include <AP_Logger/AP_Logger.h>

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_HAL/examples/DSP_test/DSP_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <GCS_MAVLink/GCS_Dummy.h>
#include <AP_SerialManager/AP_SerialManager.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
#include "GyroFrame.h"

#if HAL_WITH_DSP
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_InertialSensor/AP_InertialSensor_Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "AP_InertialSensor.h"
#include "AP_InertialSensor_Backend.h"

#include <AP_AHRS/AP_AHRS.h>
#include <AP_Logger/AP_Logger.h>

// Write ACC data packet: raw accel data
Expand Down
5 changes: 4 additions & 1 deletion libraries/AP_NavEKF2/AP_NavEKF2.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include <AP_HAL/AP_HAL.h>
#include "AP_NavEKF2.h"

#include "AP_NavEKF2_core.h"

#include <AP_DAL/AP_DAL.h>
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_Vehicle/AP_Vehicle_Type.h>
Expand Down
7 changes: 3 additions & 4 deletions libraries/AP_NavEKF2/AP_NavEKF2_AirDataFusion.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF2.h"
#include "AP_NavEKF2_core.h"

extern const AP_HAL::HAL& hal;
#include <AP_DAL/AP_DAL.h>

#include "AP_NavEKF2.h"

/********************************************************
* RESET FUNCTIONS *
Expand Down
8 changes: 3 additions & 5 deletions libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF2.h"
#include "AP_NavEKF2_core.h"
#include <GCS_MAVLink/GCS.h>

extern const AP_HAL::HAL& hal;
#include <GCS_MAVLink/GCS.h>
#include <AP_DAL/AP_DAL.h>

#include "AP_NavEKF2.h"

// Control filter mode transitions
void NavEKF2_core::controlFilterModes()
Expand Down
7 changes: 3 additions & 4 deletions libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF2_core.h"

#include "AP_NavEKF2.h"

#include <GCS_MAVLink/GCS.h>
#include <AP_DAL/AP_DAL.h>
#include <AP_InternalError/AP_InternalError.h>

#if AP_RANGEFINDER_ENABLED

extern const AP_HAL::HAL& hal;


/********************************************************
* OPT FLOW AND RANGE FINDER *
Expand Down
5 changes: 2 additions & 3 deletions libraries/AP_NavEKF2/AP_NavEKF2_VehicleStatus.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF2_core.h"

extern const AP_HAL::HAL& hal;
#include "AP_NavEKF2.h"

#include <AP_DAL/AP_DAL.h>

/* 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
Expand Down
6 changes: 4 additions & 2 deletions libraries/AP_NavEKF2/AP_NavEKF2_core.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "AP_NavEKF2_core.h"

#include <AP_HAL/AP_HAL.h>
#include <AP_DAL/AP_DAL.h>
#include <GCS_MAVLink/GCS.h>

#include "AP_NavEKF2.h"
#include "AP_NavEKF2_core.h"
#include <GCS_MAVLink/GCS.h>

extern const AP_HAL::HAL& hal;

Expand Down
5 changes: 3 additions & 2 deletions libraries/AP_NavEKF2/AP_NavEKF2_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#include <AP_Math/vectorN.h>
#include <AP_NavEKF/AP_NavEKF_core_common.h>
#include <AP_NavEKF/EKF_Buffer.h>
#include <AP_DAL/AP_DAL.h>
#include <AP_RangeFinder/AP_RangeFinder.h>
#include <AP_Beacon/AP_Beacon_config.h>

#include "AP_NavEKF/EKFGSF_yaw.h"

Expand Down Expand Up @@ -341,7 +342,7 @@ class NavEKF2_core : public NavEKF_core_common

private:
EKFGSF_yaw *yawEstimator;
AP_DAL &dal;
class AP_DAL &dal;

// Reference to the global EKF frontend for parameters
class NavEKF2 *frontend;
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_NavEKF2/LogStructure.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <AP_Logger/LogStructure.h>
#include <AP_AHRS/AP_AHRS.h>
#include <AP_AHRS/AP_AHRS_config.h>

#define LOG_IDS_FROM_NAVEKF2 \
LOG_NKF0_MSG, \
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_NavEKF3/AP_NavEKF3.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "AP_NavEKF3.h"

#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF3_core.h"
Expand Down
5 changes: 3 additions & 2 deletions libraries/AP_NavEKF3/AP_NavEKF3_Measurements.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF3_core.h"

#include "AP_NavEKF3.h"

#include <GCS_MAVLink/GCS.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_DAL/AP_DAL.h>
Expand Down
5 changes: 3 additions & 2 deletions libraries/AP_NavEKF3/AP_NavEKF3_VehicleStatus.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <AP_HAL/AP_HAL.h>

#include "AP_NavEKF3_core.h"

#include "AP_NavEKF3.h"

#include <AP_DAL/AP_DAL.h>

/* Monitor GPS data to see if quality is good enough to initialise the EKF
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_NavEKF3/AP_NavEKF3_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class NavEKF3_core : public NavEKF_core_common
{
public:
// Constructor
NavEKF3_core(class NavEKF3 *_frontend, AP_DAL &dal);
NavEKF3_core(class NavEKF3 *_frontend, class AP_DAL &dal);

// setup this core backend
bool setup_core(uint8_t _imu_index, uint8_t _core_index);
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_NavEKF3/LogStructure.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <AP_Logger/LogStructure.h>
#include <AP_AHRS/AP_AHRS_config.h>

#define LOG_IDS_FROM_NAVEKF3 \
LOG_XKF0_MSG, \
Expand Down
Loading