From 03a7c5b047a8b38e90999d3dbee2a053b65e82e4 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:44 +1000 Subject: [PATCH] AP_Mission: 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. --- libraries/AP_Mission/AP_Mission.cpp | 2 +- libraries/AP_Mission/AP_Mission.h | 16 ++--- .../AP_Mission_test/AP_Mission_test.cpp | 68 +++++++++---------- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/libraries/AP_Mission/AP_Mission.cpp b/libraries/AP_Mission/AP_Mission.cpp index 3e2a5eed82..e50eb809b5 100644 --- a/libraries/AP_Mission/AP_Mission.cpp +++ b/libraries/AP_Mission/AP_Mission.cpp @@ -4,7 +4,7 @@ /// @brief Handles the MAVLINK command mission stack. Reads and writes mission to storage. #include "AP_Mission.h" -#include +#include const AP_Param::GroupInfo AP_Mission::var_info[] PROGMEM = { diff --git a/libraries/AP_Mission/AP_Mission.h b/libraries/AP_Mission/AP_Mission.h index b8e89b9e10..22706d6b3d 100644 --- a/libraries/AP_Mission/AP_Mission.h +++ b/libraries/AP_Mission/AP_Mission.h @@ -15,14 +15,14 @@ #ifndef AP_Mission_h #define AP_Mission_h -#include -#include -#include -#include -#include -#include -#include -#include <../StorageManager/StorageManager.h> +#include +#include +#include +#include +#include +#include +#include +#include // definitions #define AP_MISSION_EEPROM_VERSION 0x65AE // version number stored in first four bytes of eeprom. increment this by one when eeprom format is changed diff --git a/libraries/AP_Mission/examples/AP_Mission_test/AP_Mission_test.cpp b/libraries/AP_Mission/examples/AP_Mission_test/AP_Mission_test.cpp index c3434ea271..523bb19f60 100644 --- a/libraries/AP_Mission/examples/AP_Mission_test/AP_Mission_test.cpp +++ b/libraries/AP_Mission/examples/AP_Mission_test/AP_Mission_test.cpp @@ -3,40 +3,40 @@ * DIYDrones.com */ -#include -#include -#include // ArduPilot Mega Vector/Matrix math Library -#include // Curve used to linearlise throttle pwm to thrust -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // ArduPilot GPS library -#include // ArduPilot Mega Analog to Digital Converter Library -#include -#include // ArduPilot Mega Barometer Library -#include -#include // ArduPilot Mega Magnetometer Library -#include -#include // ArduPilot Mega Inertial Sensor (accel & gyro) Library -#include -#include -#include // ArduPilot general purpose FIFO buffer -#include -#include -#include +#include +#include +#include // ArduPilot Mega Vector/Matrix math Library +#include // Curve used to linearlise throttle pwm to thrust +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // ArduPilot GPS library +#include // ArduPilot Mega Analog to Digital Converter Library +#include +#include // ArduPilot Mega Barometer Library +#include +#include // ArduPilot Mega Magnetometer Library +#include +#include // ArduPilot Mega Inertial Sensor (accel & gyro) Library +#include +#include +#include // ArduPilot general purpose FIFO buffer +#include +#include +#include const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;