From 23f634835d5928faf4fc079f9b14352e4558c1de Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Tue, 11 Aug 2015 16:28:42 +1000 Subject: [PATCH] AP_Declination: 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_Declination/AP_Declination.cpp | 10 +++++----- .../AP_Declination_test.cpp | 20 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libraries/AP_Declination/AP_Declination.cpp b/libraries/AP_Declination/AP_Declination.cpp index 65b26b1214..52e4576507 100644 --- a/libraries/AP_Declination/AP_Declination.cpp +++ b/libraries/AP_Declination/AP_Declination.cpp @@ -24,11 +24,11 @@ * */ -#include -#include -#include -#include -#include +#include +#include +#include +#include "AP_Declination.h" +#include #include // 1 byte - 4 bits for value + 1 bit for sign + 3 bits for repeats => 8 bits diff --git a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.cpp b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.cpp index c71cbb1965..16cd246c87 100644 --- a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.cpp +++ b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.cpp @@ -1,16 +1,16 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- -#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;