From d2780623f78187d0cc6d3a0a0943edfbde5149e6 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:46 +1000 Subject: [PATCH] RC_Channel: 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/RC_Channel/RC_Channel.cpp | 4 +- libraries/RC_Channel/RC_Channel.h | 4 +- libraries/RC_Channel/RC_Channel_aux.cpp | 4 +- libraries/RC_Channel/RC_Channel_aux.h | 2 +- .../examples/RC_Channel/RC_Channel.cpp | 66 +++++++++---------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 2ec7b2e285..050f809cd2 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -23,10 +23,10 @@ #include #include -#include +#include extern const AP_HAL::HAL& hal; -#include +#include #include "RC_Channel.h" diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 1224603a1e..e82fa2043a 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -6,8 +6,8 @@ #ifndef __RC_CHANNEL_H__ #define __RC_CHANNEL_H__ -#include -#include +#include +#include #define RC_CHANNEL_TYPE_ANGLE 0 #define RC_CHANNEL_TYPE_RANGE 1 diff --git a/libraries/RC_Channel/RC_Channel_aux.cpp b/libraries/RC_Channel/RC_Channel_aux.cpp index 76e739dc04..d6d24f5815 100644 --- a/libraries/RC_Channel/RC_Channel_aux.cpp +++ b/libraries/RC_Channel/RC_Channel_aux.cpp @@ -2,8 +2,8 @@ #include "RC_Channel_aux.h" -#include -#include +#include +#include extern const AP_HAL::HAL& hal; const AP_Param::GroupInfo RC_Channel_aux::var_info[] PROGMEM = { diff --git a/libraries/RC_Channel/RC_Channel_aux.h b/libraries/RC_Channel/RC_Channel_aux.h index a2fbc0057e..d5fa35ba5c 100644 --- a/libraries/RC_Channel/RC_Channel_aux.h +++ b/libraries/RC_Channel/RC_Channel_aux.h @@ -7,7 +7,7 @@ #ifndef __RC_CHANNEL_AUX_H__ #define __RC_CHANNEL_AUX_H__ -#include +#include #include "RC_Channel.h" #if HAL_CPU_CLASS > HAL_CPU_CLASS_16 diff --git a/libraries/RC_Channel/examples/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/examples/RC_Channel/RC_Channel.cpp index 976248d69d..1b11202af9 100644 --- a/libraries/RC_Channel/examples/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/examples/RC_Channel/RC_Channel.cpp @@ -11,40 +11,40 @@ #define CH_7 6 #define CH_8 7 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;