From e925820d902464f50240357148f8e760d173416c Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:46 +1000 Subject: [PATCH] PID: 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/PID/PID.cpp | 4 ++-- libraries/PID/PID.h | 4 ++-- libraries/PID/examples/pid/pid.cpp | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libraries/PID/PID.cpp b/libraries/PID/PID.cpp index c6a8e7841b..1991ae026a 100644 --- a/libraries/PID/PID.cpp +++ b/libraries/PID/PID.cpp @@ -6,8 +6,8 @@ #include #include "PID.h" -#include -#include +#include +#include extern const AP_HAL::HAL& hal; diff --git a/libraries/PID/PID.h b/libraries/PID/PID.h index 7a859cf896..47a5bc01b3 100644 --- a/libraries/PID/PID.h +++ b/libraries/PID/PID.h @@ -6,8 +6,8 @@ #ifndef __PID_H__ #define __PID_H__ -#include -#include +#include +#include #include #include // for fabs() diff --git a/libraries/PID/examples/pid/pid.cpp b/libraries/PID/examples/pid/pid.cpp index d91411c360..e25cb06b8f 100644 --- a/libraries/PID/examples/pid/pid.cpp +++ b/libraries/PID/examples/pid/pid.cpp @@ -3,17 +3,17 @@ * 2010 Code by Jason Short. DIYDrones.com */ -#include -#include -#include -#include -#include -#include -#include // ArduPilot Mega RC Library +#include +#include +#include +#include +#include +#include +#include // ArduPilot Mega RC Library -#include -#include -#include +#include +#include +#include const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;