From ca5afbfdc97f9b6db487b397bc757c85fa8f55f8 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:43 +1000 Subject: [PATCH] AP_HAL_Empty: 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_HAL_Empty/AP_HAL_Empty.h | 2 +- libraries/AP_HAL_Empty/AnalogIn.h | 2 +- libraries/AP_HAL_Empty/GPIO.h | 2 +- libraries/AP_HAL_Empty/HAL_Empty_Class.cpp | 2 +- libraries/AP_HAL_Empty/HAL_Empty_Class.h | 2 +- libraries/AP_HAL_Empty/I2CDriver.cpp | 2 +- libraries/AP_HAL_Empty/I2CDriver.h | 2 +- libraries/AP_HAL_Empty/RCInput.h | 2 +- libraries/AP_HAL_Empty/RCOutput.h | 2 +- libraries/AP_HAL_Empty/SPIDriver.h | 2 +- libraries/AP_HAL_Empty/Scheduler.h | 2 +- libraries/AP_HAL_Empty/Semaphores.h | 2 +- libraries/AP_HAL_Empty/Storage.h | 2 +- libraries/AP_HAL_Empty/UARTDriver.h | 2 +- libraries/AP_HAL_Empty/Util.h | 2 +- .../examples/empty_example/empty_example.cpp | 18 +++++++++--------- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libraries/AP_HAL_Empty/AP_HAL_Empty.h b/libraries/AP_HAL_Empty/AP_HAL_Empty.h index 42af84855c..d8ab2353f0 100644 --- a/libraries/AP_HAL_Empty/AP_HAL_Empty.h +++ b/libraries/AP_HAL_Empty/AP_HAL_Empty.h @@ -3,7 +3,7 @@ #define __AP_HAL_EMPTY_H__ /* Your layer exports should depend on AP_HAL.h ONLY. */ -#include +#include /** * Umbrella header for AP_HAL_Empty module. diff --git a/libraries/AP_HAL_Empty/AnalogIn.h b/libraries/AP_HAL_Empty/AnalogIn.h index f215cf5b66..ed3ad6eb73 100644 --- a/libraries/AP_HAL_Empty/AnalogIn.h +++ b/libraries/AP_HAL_Empty/AnalogIn.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_ANALOGIN_H__ #define __AP_HAL_EMPTY_ANALOGIN_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyAnalogSource : public AP_HAL::AnalogSource { public: diff --git a/libraries/AP_HAL_Empty/GPIO.h b/libraries/AP_HAL_Empty/GPIO.h index a85014aa49..1bf209f169 100644 --- a/libraries/AP_HAL_Empty/GPIO.h +++ b/libraries/AP_HAL_Empty/GPIO.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_GPIO_H__ #define __AP_HAL_EMPTY_GPIO_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyGPIO : public AP_HAL::GPIO { public: diff --git a/libraries/AP_HAL_Empty/HAL_Empty_Class.cpp b/libraries/AP_HAL_Empty/HAL_Empty_Class.cpp index 560fce2ee6..a5fccd7227 100644 --- a/libraries/AP_HAL_Empty/HAL_Empty_Class.cpp +++ b/libraries/AP_HAL_Empty/HAL_Empty_Class.cpp @@ -1,5 +1,5 @@ -#include +#include #if CONFIG_HAL_BOARD == HAL_BOARD_EMPTY #include "HAL_Empty_Class.h" diff --git a/libraries/AP_HAL_Empty/HAL_Empty_Class.h b/libraries/AP_HAL_Empty/HAL_Empty_Class.h index 9c293120b7..29abb45e61 100644 --- a/libraries/AP_HAL_Empty/HAL_Empty_Class.h +++ b/libraries/AP_HAL_Empty/HAL_Empty_Class.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_CLASS_H__ #define __AP_HAL_EMPTY_CLASS_H__ -#include +#include #include "AP_HAL_Empty_Namespace.h" #include "PrivateMember.h" diff --git a/libraries/AP_HAL_Empty/I2CDriver.cpp b/libraries/AP_HAL_Empty/I2CDriver.cpp index 09cefaa174..c4f6b8fa83 100644 --- a/libraries/AP_HAL_Empty/I2CDriver.cpp +++ b/libraries/AP_HAL_Empty/I2CDriver.cpp @@ -1,5 +1,5 @@ -#include +#include #include "I2CDriver.h" using namespace Empty; diff --git a/libraries/AP_HAL_Empty/I2CDriver.h b/libraries/AP_HAL_Empty/I2CDriver.h index b23b9aa495..404643760e 100644 --- a/libraries/AP_HAL_Empty/I2CDriver.h +++ b/libraries/AP_HAL_Empty/I2CDriver.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_I2CDRIVER_H__ #define __AP_HAL_EMPTY_I2CDRIVER_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyI2CDriver : public AP_HAL::I2CDriver { public: diff --git a/libraries/AP_HAL_Empty/RCInput.h b/libraries/AP_HAL_Empty/RCInput.h index 421c26dd19..2761891e1f 100644 --- a/libraries/AP_HAL_Empty/RCInput.h +++ b/libraries/AP_HAL_Empty/RCInput.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_RCINPUT_H__ #define __AP_HAL_EMPTY_RCINPUT_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyRCInput : public AP_HAL::RCInput { public: diff --git a/libraries/AP_HAL_Empty/RCOutput.h b/libraries/AP_HAL_Empty/RCOutput.h index 77f6ea6b3e..7b6f8558a8 100644 --- a/libraries/AP_HAL_Empty/RCOutput.h +++ b/libraries/AP_HAL_Empty/RCOutput.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_RCOUTPUT_H__ #define __AP_HAL_EMPTY_RCOUTPUT_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyRCOutput : public AP_HAL::RCOutput { void init(void* machtnichts); diff --git a/libraries/AP_HAL_Empty/SPIDriver.h b/libraries/AP_HAL_Empty/SPIDriver.h index dcd0cd6fae..dff86c29df 100644 --- a/libraries/AP_HAL_Empty/SPIDriver.h +++ b/libraries/AP_HAL_Empty/SPIDriver.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_SPIDRIVER_H__ #define __AP_HAL_EMPTY_SPIDRIVER_H__ -#include +#include "AP_HAL_Empty.h" #include "Semaphores.h" class Empty::EmptySPIDeviceDriver : public AP_HAL::SPIDeviceDriver { diff --git a/libraries/AP_HAL_Empty/Scheduler.h b/libraries/AP_HAL_Empty/Scheduler.h index 6f8f272343..42d30faea0 100644 --- a/libraries/AP_HAL_Empty/Scheduler.h +++ b/libraries/AP_HAL_Empty/Scheduler.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_SCHEDULER_H__ #define __AP_HAL_EMPTY_SCHEDULER_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyScheduler : public AP_HAL::Scheduler { public: diff --git a/libraries/AP_HAL_Empty/Semaphores.h b/libraries/AP_HAL_Empty/Semaphores.h index 9cd17004fe..46848b1d3a 100644 --- a/libraries/AP_HAL_Empty/Semaphores.h +++ b/libraries/AP_HAL_Empty/Semaphores.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_SEMAPHORE_H__ #define __AP_HAL_EMPTY_SEMAPHORE_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptySemaphore : public AP_HAL::Semaphore { public: diff --git a/libraries/AP_HAL_Empty/Storage.h b/libraries/AP_HAL_Empty/Storage.h index 075ac87d3e..8e185f7710 100644 --- a/libraries/AP_HAL_Empty/Storage.h +++ b/libraries/AP_HAL_Empty/Storage.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_STORAGE_H__ #define __AP_HAL_EMPTY_STORAGE_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyStorage : public AP_HAL::Storage { public: diff --git a/libraries/AP_HAL_Empty/UARTDriver.h b/libraries/AP_HAL_Empty/UARTDriver.h index 4a2ed7047a..a66b690bbb 100644 --- a/libraries/AP_HAL_Empty/UARTDriver.h +++ b/libraries/AP_HAL_Empty/UARTDriver.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_UARTDRIVER_H__ #define __AP_HAL_EMPTY_UARTDRIVER_H__ -#include +#include "AP_HAL_Empty.h" class Empty::EmptyUARTDriver : public AP_HAL::UARTDriver { public: diff --git a/libraries/AP_HAL_Empty/Util.h b/libraries/AP_HAL_Empty/Util.h index ab40fb6b48..44bae3e34f 100644 --- a/libraries/AP_HAL_Empty/Util.h +++ b/libraries/AP_HAL_Empty/Util.h @@ -2,7 +2,7 @@ #ifndef __AP_HAL_EMPTY_UTIL_H__ #define __AP_HAL_EMPTY_UTIL_H__ -#include +#include #include "AP_HAL_Empty_Namespace.h" class Empty::EmptyUtil : public AP_HAL::Util { diff --git a/libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp b/libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp index 5b978582da..dc4ecf27da 100644 --- a/libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp +++ b/libraries/AP_HAL_Empty/examples/empty_example/empty_example.cpp @@ -1,14 +1,14 @@ -#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;