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

Stop including AP_AHRS.h in header files #27964

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libraries/AP_ADSB/AP_ADSB_uAvionix_UCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <ctype.h>
#include <AP_Notify/AP_Notify.h>

#include <AP_GPS/AP_GPS.h>

extern const AP_HAL::HAL &hal;

#define AP_ADSB_UAVIONIX_HEALTH_TIMEOUT_MS (5000UL)
Expand Down
5 changes: 0 additions & 5 deletions libraries/AP_ADSB/AP_ADSB_uAvionix_UCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@

#define AP_ADSB_UAVIONIX_UCP_CAPTURE_ALL_RX_PACKETS 1


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

#include "GDL90_protocol/GDL90_Message_Structs.h"
#include "GDL90_protocol/hostGDL90Support.h"

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Compass/AP_Compass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <AP_ExternalAHRS/AP_ExternalAHRS.h>
#include <AP_CustomRotations/AP_CustomRotations.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_AHRS/AP_AHRS.h>

#include "AP_Compass_config.h"

Expand Down
4 changes: 1 addition & 3 deletions libraries/AP_Compass/Compass_learn.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#pragma once

#include <AP_AHRS/AP_AHRS.h>

/*
compass learning using magnetic field tables from AP_Declination and GSF
*/

class CompassLearn {
public:
CompassLearn(Compass &compass);
CompassLearn(class Compass &compass);

// called on each compass read
void update(void);
Expand Down
1 change: 0 additions & 1 deletion libraries/AP_DDS/AP_DDS_Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/Scheduler.h>
#include <AP_HAL/Semaphores.h>
#include <AP_AHRS/AP_AHRS.h>

#include "fcntl.h"

Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_InertialNav/AP_InertialNav.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_Baro/AP_Baro.h>
#include "AP_InertialNav.h"

#include <AP_AHRS/AP_AHRS.h>

/*
A wrapper around the AP_InertialNav class which uses the NavEKF
filter if available, and falls back to the AP_InertialNav filter
Expand Down
3 changes: 1 addition & 2 deletions libraries/AP_InertialNav/AP_InertialNav.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
*/
#pragma once

#include <AP_AHRS/AP_AHRS.h>
#include <AP_NavEKF/AP_Nav_Common.h> // definitions shared by inertial and ekf nav filters

class AP_InertialNav
{
public:
// Constructor
AP_InertialNav(AP_AHRS &ahrs) :
AP_InertialNav(class AP_AHRS &ahrs) :
_ahrs_ekf(ahrs)
{}

Expand Down
1 change: 0 additions & 1 deletion libraries/AP_L1_Control/AP_L1_Control.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/

#include <AP_Math/AP_Math.h>
#include <AP_AHRS/AP_AHRS.h>
#include <AP_Param/AP_Param.h>
#include <AP_Navigation/AP_Navigation.h>
#include <AP_TECS/AP_TECS.h>
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_Module/AP_Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#if AP_MODULE_SUPPORTED

#include <AP_AHRS/AP_AHRS.h>

/*
support for external modules
*/
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_Module/AP_Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#if AP_MODULE_SUPPORTED

#include <AP_AHRS/AP_AHRS.h>
#include <AP_Math/vector3.h>

#ifndef AP_MODULE_DEFAULT_DIRECTORY
#define AP_MODULE_DEFAULT_DIRECTORY "/usr/lib/ardupilot/modules"
Expand All @@ -48,7 +48,7 @@ class AP_Module {
static void call_hook_setup_complete(void);

// call any AHRS_update hooks
static void call_hook_AHRS_update(const AP_AHRS &ahrs);
static void call_hook_AHRS_update(const class AP_AHRS &ahrs);

// call any gyro_sample hooks
static void call_hook_gyro_sample(uint8_t instance, float dt, const Vector3f &gyro);
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Soaring/AP_Soaring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#if HAL_SOARING_ENABLED

#include <AP_AHRS/AP_AHRS.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_TECS/AP_TECS.h>
#include <GCS_MAVLink/GCS.h>
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Soaring/Variometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Manages the estimation of aircraft total energy, drag and vertical air velocity.
*/
#include "Variometer.h"

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

Variometer::Variometer(const AP_FixedWing &parms, const PolarParams &polarParams) :
Expand Down
3 changes: 2 additions & 1 deletion libraries/AP_Soaring/Variometer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Manages the estimation of aircraft total energy, drag and vertical air velocity.
*/
#pragma once

#include <AP_AHRS/AP_AHRS.h>
#include <AP_Param/AP_Param.h>
#include <Filter/AverageFilter.h>
#include <Filter/LowPassFilter.h>
#include <AP_Vehicle/AP_FixedWing.h>
#include <AP_Common/Location.h>

class Variometer {

Expand Down
Loading