AP_Mount: tidy header includes

our pattern is to include the config file and then use the relevant define, with nothing in between
This commit is contained in:
Peter Barker 2024-11-09 10:29:06 +11:00 committed by Andrew Tridgell
parent 1e7cd71ad6
commit 99e314f49a
26 changed files with 95 additions and 29 deletions

View File

@ -1,9 +1,11 @@
#include "AP_Mount_config.h"
#if HAL_MOUNT_ENABLED
#include <AP_Common/AP_Common.h>
#include <AP_Param/AP_Param.h>
#include "AP_Mount.h"
#if HAL_MOUNT_ENABLED
#include "AP_Mount_Backend.h"
#include "AP_Mount_Servo.h"
#include "AP_Mount_SoloGimbal.h"

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Alexmos.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_ALEXMOS_ENABLED
#include "AP_Mount_Alexmos.h"
#include <AP_SerialManager/AP_SerialManager.h>
//definition of the commands id for the Alexmos Serial Protocol

View File

@ -3,9 +3,12 @@
*/
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_ALEXMOS_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Param/AP_Param.h>
#include <AP_Math/AP_Math.h>

View File

@ -1,5 +1,9 @@
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_Logger/AP_Logger.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Backend_Serial.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_ENABLED
#include "AP_Mount_Backend_Serial.h"
#include <AP_SerialManager/AP_SerialManager.h>
// Default init function for every mount

View File

@ -1,7 +1,9 @@
#include "AP_Mount_Gremsy.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_GREMSY_ENABLED
#include "AP_Mount_Gremsy.h"
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -3,10 +3,12 @@
*/
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_GREMSY_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>
#include <GCS_MAVLink/GCS_MAVLink.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_SToRM32.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_STORM32MAVLINK_ENABLED
#include "AP_Mount_SToRM32.h"
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -3,10 +3,12 @@
*/
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_STORM32MAVLINK_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_SToRM32_serial.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_STORM32SERIAL_ENABLED
#include "AP_Mount_SToRM32_serial.h"
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <GCS_MAVLink/include/mavlink/v2.0/checksum.h>

View File

@ -3,10 +3,12 @@
*/
#pragma once
#include "AP_Mount_Backend_Serial.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_STORM32SERIAL_ENABLED
#include "AP_Mount_Backend_Serial.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Scripting.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SCRIPTING_ENABLED
#include "AP_Mount_Scripting.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -4,10 +4,12 @@
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SCRIPTING_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>
@ -50,4 +52,4 @@ private:
bool target_loc_valid; // true if target_loc holds a valid target location
};
#endif // HAL_MOUNT_SIYISERIAL_ENABLED
#endif // HAL_MOUNT_SCRIPTING_ENABLED

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Servo.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SERVO_ENABLED
#include "AP_Mount_Servo.h"
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS_MAVLink.h>

View File

@ -3,10 +3,12 @@
*/
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SERVO_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>
#include <SRV_Channel/SRV_Channel.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Siyi.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SIYI_ENABLED
#include "AP_Mount_Siyi.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -19,10 +19,12 @@
#pragma once
#include "AP_Mount_Backend_Serial.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_SIYI_ENABLED
#include "AP_Mount_Backend_Serial.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>
@ -381,4 +383,4 @@ private:
uint8_t sent_time_count;
};
#endif // HAL_MOUNT_SIYISERIAL_ENABLED
#endif // HAL_MOUNT_SIYI_ENABLED

View File

@ -1,7 +1,9 @@
#include "AP_Mount_Topotek.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_TOPOTEK_ENABLED
#include "AP_Mount_Topotek.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Viewpro.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_VIEWPRO_ENABLED
#include "AP_Mount_Viewpro.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include <AP_GPS/AP_GPS.h>

View File

@ -16,10 +16,12 @@
#pragma once
#include "AP_Mount_Backend_Serial.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_VIEWPRO_ENABLED
#include "AP_Mount_Backend_Serial.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>

View File

@ -1,6 +1,9 @@
#include "AP_Mount_Xacti.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_XACTI_ENABLED
#include "AP_Mount_Xacti.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include <GCS_MAVLink/GCS.h>

View File

@ -8,10 +8,12 @@
#pragma once
#include "AP_Mount_Backend.h"
#include "AP_Mount_config.h"
#if HAL_MOUNT_XACTI_ENABLED
#include "AP_Mount_Backend.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/AP_Common.h>

View File

@ -2,6 +2,8 @@
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_Terrain/AP_Terrain_config.h>
#include <GCS_MAVLink/GCS_config.h>
#include <AP_Scripting/AP_Scripting_config.h>
#ifndef HAL_MOUNT_ENABLED
#define HAL_MOUNT_ENABLED 1

View File

@ -1,9 +1,11 @@
#include "AP_Mount_config.h"
#if HAL_SOLO_GIMBAL_ENABLED
#include <AP_HAL/AP_HAL.h>
#include <AP_AHRS/AP_AHRS.h>
#include "SoloGimbal.h"
#if HAL_SOLO_GIMBAL_ENABLED
#include <stdio.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_Logger/AP_Logger.h>

View File

@ -1,3 +1,7 @@
#include "AP_Mount_config.h"
#if HAL_SOLO_GIMBAL_ENABLED
#include <AP_HAL/AP_HAL.h>
// uncomment this to force the optimisation of this code, note that
@ -9,7 +13,6 @@
#endif
#include "SoloGimbalEKF.h"
#if HAL_SOLO_GIMBAL_ENABLED
#include <AP_Param/AP_Param.h>
#include <AP_NavEKF/AP_Nav_Common.h>
#include <AP_AHRS/AP_AHRS.h>

View File

@ -1,5 +1,8 @@
#include "SoloGimbal_Parameters.h"
#include "AP_Mount_config.h"
#if HAL_SOLO_GIMBAL_ENABLED
#include "SoloGimbal_Parameters.h"
#include <AP_HAL/AP_HAL.h>
#include <AP_Logger/AP_Logger.h>
#include <GCS_MAVLink/GCS.h>