From a552390125022df3a62291737209a8d2fb58f0e3 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:41 +1000 Subject: [PATCH] AP_ADC: 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_ADC/AP_ADC.h | 2 +- libraries/AP_ADC/AP_ADC_ADS1115.cpp | 2 +- libraries/AP_ADC/AP_ADC_ADS1115.h | 2 +- libraries/AP_ADC/AP_ADC_ADS7844.cpp | 6 +++--- libraries/AP_ADC/AP_ADC_ADS7844.h | 2 +- .../examples/AP_ADC_test/AP_ADC_test.cpp | 18 +++++++++--------- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libraries/AP_ADC/AP_ADC.h b/libraries/AP_ADC/AP_ADC.h index f9c0ce95da..37cfbc6be3 100644 --- a/libraries/AP_ADC/AP_ADC.h +++ b/libraries/AP_ADC/AP_ADC.h @@ -1,7 +1,7 @@ #ifndef AP_ADC_H #define AP_ADC_H -#include +#include /* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/libraries/AP_ADC/AP_ADC_ADS1115.cpp b/libraries/AP_ADC/AP_ADC_ADS1115.cpp index a31f4af7c7..119712bc4e 100644 --- a/libraries/AP_ADC/AP_ADC_ADS1115.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS1115.cpp @@ -1,4 +1,4 @@ -#include +#include #include "AP_ADC_ADS1115.h" diff --git a/libraries/AP_ADC/AP_ADC_ADS1115.h b/libraries/AP_ADC/AP_ADC_ADS1115.h index 2445566a2b..dc8d2a76e2 100644 --- a/libraries/AP_ADC/AP_ADC_ADS1115.h +++ b/libraries/AP_ADC/AP_ADC_ADS1115.h @@ -5,7 +5,7 @@ #include #include "AP_ADC.h" -#include +#include struct adc_report_s diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.cpp b/libraries/AP_ADC/AP_ADC_ADS7844.cpp index 3dd0e59264..6829725d18 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS7844.cpp @@ -54,9 +54,9 @@ * */ -#include -#include -#include +#include +#include +#include #include "AP_ADC_ADS7844.h" diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.h b/libraries/AP_ADC/AP_ADC_ADS7844.h index e102c0ab6e..c4244f05b5 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.h +++ b/libraries/AP_ADC/AP_ADC_ADS7844.h @@ -5,7 +5,7 @@ #include #include "AP_ADC.h" -#include +#include class AP_ADC_ADS7844 : public AP_ADC { diff --git a/libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp b/libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp index a890ef5b90..f3aa6446eb 100644 --- a/libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp +++ b/libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp @@ -6,17 +6,17 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include -#include -#include +#include +#include +#include -#include +#include uint32_t timer;