From 4d4b85673574643352e1e4dc54efa0af9dc58218 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:40 +1000 Subject: [PATCH] ArduCopter: standardize inclusion of libaries headers This commit changes the way libraries headers are included in source files: - If the header is in the same directory the source belongs to, so the notation '#include ""' is used with the path relative to the directory containing the source. - If the header is outside the directory containing the source, then we use the notation '#include <>' with the path relative to libraries folder. Some of the advantages of such approach: - Only one search path for libraries headers. - OSs like Windows may have a better lookup time. --- ArduCopter/Copter.h | 130 ++++++++++++++++++++-------------------- ArduCopter/Parameters.h | 2 +- ArduCopter/defines.h | 2 +- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 49e692815d..bc25cb7654 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -28,80 +28,80 @@ #include // Common dependencies -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // AP_HAL -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // Application dependencies -#include -#include // MAVLink GCS definitions -#include // Serial manager library -#include // ArduPilot GPS library -#include // ArduPilot Mega Flash Memory Library -#include // ArduPilot Mega Analog to Digital Converter Library -#include -#include -#include // ArduPilot Mega Magnetometer Library -#include // ArduPilot Mega Vector/Matrix math Library -#include // Curve used to linearlise throttle pwm to thrust -#include // ArduPilot Mega Inertial Sensor (accel & gyro) Library -#include -#include -#include // Mission command library -#include // Rally point library -#include // PID library -#include // PID library (2-axis) -#include // Heli specific Rate PID library -#include // P library -#include // Attitude control library -#include // Attitude control library for traditional helicopter -#include // Position control library -#include // RC Channel Library -#include // AP Motors library -#include // Range finder library -#include // Optical Flow library -#include // Filter library -#include // APM FIFO Buffer -#include // APM relay -#include -#include // Photo or video camera -#include // Camera/Antenna mount -#include // needed for AHRS build -#include // needed for AHRS build -#include // ArduPilot Mega inertial navigation library -#include // ArduCopter waypoint navigation library -#include // circle navigation library -#include // ArduPilot Mega Declination Helper Library -#include // Arducopter Fence library -#include // software in the loop support -#include // main loop scheduler -#include // RC input mapping library -#include // Notify library -#include // Battery monitor library -#include // board configuration library -#include +#include +#include // MAVLink GCS definitions +#include // Serial manager library +#include // ArduPilot GPS library +#include // ArduPilot Mega Flash Memory Library +#include // ArduPilot Mega Analog to Digital Converter Library +#include +#include +#include // ArduPilot Mega Magnetometer Library +#include // ArduPilot Mega Vector/Matrix math Library +#include // Curve used to linearlise throttle pwm to thrust +#include // ArduPilot Mega Inertial Sensor (accel & gyro) Library +#include +#include +#include // Mission command library +#include // Rally point library +#include // PID library +#include // PID library (2-axis) +#include // Heli specific Rate PID library +#include // P library +#include // Attitude control library +#include // Attitude control library for traditional helicopter +#include // Position control library +#include // RC Channel Library +#include // AP Motors library +#include // Range finder library +#include // Optical Flow library +#include // Filter library +#include // APM FIFO Buffer +#include // APM relay +#include +#include // Photo or video camera +#include // Camera/Antenna mount +#include // needed for AHRS build +#include // needed for AHRS build +#include // ArduPilot Mega inertial navigation library +#include // ArduCopter waypoint navigation library +#include // circle navigation library +#include // ArduPilot Mega Declination Helper Library +#include // Arducopter Fence library +#include // software in the loop support +#include // main loop scheduler +#include // RC input mapping library +#include // Notify library +#include // Battery monitor library +#include // board configuration library +#include #if SPRAYER == ENABLED -#include // crop sprayer library +#include // crop sprayer library #endif #if EPM_ENABLED == ENABLED -#include // EPM cargo gripper stuff +#include // EPM cargo gripper stuff #endif #if PARACHUTE == ENABLED -#include // Parachute release library +#include // Parachute release library #endif -#include // Landing Gear library -#include +#include // Landing Gear library +#include // AP_HAL to Arduino compatibility layer // Configuration diff --git a/ArduCopter/Parameters.h b/ArduCopter/Parameters.h index e30b41d4a8..40e2d0c77c 100644 --- a/ArduCopter/Parameters.h +++ b/ArduCopter/Parameters.h @@ -3,7 +3,7 @@ #ifndef PARAMETERS_H #define PARAMETERS_H -#include +#include // Global parameter class. // diff --git a/ArduCopter/defines.h b/ArduCopter/defines.h index 0eab81337b..25fb9d9850 100644 --- a/ArduCopter/defines.h +++ b/ArduCopter/defines.h @@ -3,7 +3,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -#include +#include // Just so that it's completely clear... #define ENABLED 1