AP_HAL_SITL: 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.
This commit is contained in:
Gustavo Jose de Sousa 2015-08-11 16:28:43 +10:00 committed by Andrew Tridgell
parent 08333f1ffe
commit 27b9d71e2c
24 changed files with 55 additions and 55 deletions

View File

@ -2,7 +2,7 @@
#ifndef __AP_HAL_SITL_H__ #ifndef __AP_HAL_SITL_H__
#define __AP_HAL_SITL_H__ #define __AP_HAL_SITL_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL

View File

@ -1,6 +1,6 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "AP_HAL_SITL.h" #include "AP_HAL_SITL.h"

View File

@ -2,7 +2,7 @@
#ifndef __AP_HAL_SITL_ANALOG_IN_H__ #ifndef __AP_HAL_SITL_ANALOG_IN_H__
#define __AP_HAL_SITL_ANALOG_IN_H__ #define __AP_HAL_SITL_ANALOG_IN_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#define SITL_INPUT_MAX_CHANNELS 12 #define SITL_INPUT_MAX_CHANNELS 12

View File

@ -1,10 +1,10 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include "Scheduler.h" #include "Scheduler.h"
@ -16,8 +16,8 @@
#include "SITL_State.h" #include "SITL_State.h"
#include "Util.h" #include "Util.h"
#include <AP_HAL_Empty.h> #include <AP_HAL_Empty/AP_HAL_Empty.h>
#include <AP_HAL_Empty_Private.h> #include <AP_HAL_Empty/AP_HAL_Empty_Private.h>
using namespace HALSITL; using namespace HALSITL;

View File

@ -2,11 +2,11 @@
#ifndef __AP_HAL_SITL_CLASS_H__ #ifndef __AP_HAL_SITL_CLASS_H__
#define __AP_HAL_SITL_CLASS_H__ #define __AP_HAL_SITL_CLASS_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "SITL_State.h" #include "SITL_State.h"

View File

@ -1,4 +1,4 @@
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "RCInput.h" #include "RCInput.h"

View File

@ -2,9 +2,9 @@
#ifndef __AP_HAL_SITL_RCINPUT_H__ #ifndef __AP_HAL_SITL_RCINPUT_H__
#define __AP_HAL_SITL_RCINPUT_H__ #define __AP_HAL_SITL_RCINPUT_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
class HALSITL::SITLRCInput : public AP_HAL::RCInput { class HALSITL::SITLRCInput : public AP_HAL::RCInput {
public: public:

View File

@ -1,4 +1,4 @@
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "RCOutput.h" #include "RCOutput.h"

View File

@ -2,9 +2,9 @@
#ifndef __AP_HAL_SITL_RCOUTPUT_H__ #ifndef __AP_HAL_SITL_RCOUTPUT_H__
#define __AP_HAL_SITL_RCOUTPUT_H__ #define __AP_HAL_SITL_RCOUTPUT_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
class HALSITL::SITLRCOutput : public AP_HAL::RCOutput { class HALSITL::SITLRCOutput : public AP_HAL::RCOutput {
public: public:

View File

@ -1,10 +1,10 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include "UARTDriver.h" #include "UARTDriver.h"
@ -17,7 +17,7 @@
#include <errno.h> #include <errno.h>
#include <sys/select.h> #include <sys/select.h>
#include <AP_Param.h> #include <AP_Param/AP_Param.h>
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;

View File

@ -2,11 +2,11 @@
#ifndef __AP_HAL_SITL_STATE_H__ #ifndef __AP_HAL_SITL_STATE_H__
#define __AP_HAL_SITL_STATE_H__ #define __AP_HAL_SITL_STATE_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"

View File

@ -1,27 +1,27 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include "UARTDriver.h" #include "UARTDriver.h"
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <utility/getopt_cpp.h> #include <AP_HAL/utility/getopt_cpp.h>
#include <SIM_Multicopter.h> #include <SITL/SIM_Multicopter.h>
#include <SIM_Helicopter.h> #include <SITL/SIM_Helicopter.h>
#include <SIM_Rover.h> #include <SITL/SIM_Rover.h>
#include <SIM_CRRCSim.h> #include <SITL/SIM_CRRCSim.h>
#include <SIM_Gazebo.h> #include <SITL/SIM_Gazebo.h>
#include <SIM_last_letter.h> #include <SITL/SIM_last_letter.h>
#include <SIM_JSBSim.h> #include <SITL/SIM_JSBSim.h>
#include <SIM_Tracker.h> #include <SITL/SIM_Tracker.h>
#include <SIM_Balloon.h> #include <SITL/SIM_Balloon.h>
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;

View File

@ -1,6 +1,6 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "AP_HAL_SITL.h" #include "AP_HAL_SITL.h"

View File

@ -2,7 +2,7 @@
#ifndef __AP_HAL_SITL_SCHEDULER_H__ #ifndef __AP_HAL_SITL_SCHEDULER_H__
#define __AP_HAL_SITL_SCHEDULER_H__ #define __AP_HAL_SITL_SCHEDULER_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include <sys/time.h> #include <sys/time.h>

View File

@ -1,4 +1,4 @@
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <assert.h> #include <assert.h>

View File

@ -3,7 +3,7 @@
#ifndef __AP_HAL_SITL_STORAGE_H__ #ifndef __AP_HAL_SITL_STORAGE_H__
#define __AP_HAL_SITL_STORAGE_H__ #define __AP_HAL_SITL_STORAGE_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
class HALSITL::SITLEEPROMStorage : public AP_HAL::Storage { class HALSITL::SITLEEPROMStorage : public AP_HAL::Storage {

View File

@ -17,7 +17,7 @@
// //
// Copyright (c) 2010 Michael Smith. All rights reserved. // Copyright (c) 2010 Michael Smith. All rights reserved.
// //
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <limits.h> #include <limits.h>
@ -26,7 +26,7 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdarg.h> #include <stdarg.h>
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include <errno.h> #include <errno.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -2,7 +2,7 @@
#ifndef __AP_HAL_SITL_UART_DRIVER_H__ #ifndef __AP_HAL_SITL_UART_DRIVER_H__
#define __AP_HAL_SITL_UART_DRIVER_H__ #define __AP_HAL_SITL_UART_DRIVER_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <stdint.h> #include <stdint.h>

View File

@ -2,7 +2,7 @@
#ifndef __AP_HAL_SITL_UTIL_H__ #ifndef __AP_HAL_SITL_UTIL_H__
#define __AP_HAL_SITL_UTIL_H__ #define __AP_HAL_SITL_UTIL_H__
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
class HALSITL::SITLUtil : public AP_HAL::Util { class HALSITL::SITLUtil : public AP_HAL::Util {

View File

@ -6,8 +6,8 @@
Andrew Tridgell November 2011 Andrew Tridgell November 2011
*/ */
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL

View File

@ -6,14 +6,14 @@
Andrew Tridgell November 2011 Andrew Tridgell November 2011
*/ */
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include "../AP_Compass/AP_Compass.h" #include "../AP_Compass/AP_Compass.h"
#include "../AP_Declination/AP_Declination.h" #include "../AP_Declination/AP_Declination.h"
#include "../SITL/SITL.h" #include "../SITL/SITL.h"

View File

@ -7,14 +7,14 @@
Andrew Tridgell November 2011 Andrew Tridgell November 2011
*/ */
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include "../SITL/SITL.h" #include "../SITL/SITL.h"
#include "Scheduler.h" #include "Scheduler.h"
#include "UARTDriver.h" #include "UARTDriver.h"

View File

@ -6,22 +6,22 @@
Andrew Tridgell November 2011 Andrew Tridgell November 2011
*/ */
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_HAL_SITL.h> #include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h" #include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h" #include "HAL_SITL_Class.h"
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include "../AP_Compass/AP_Compass.h" #include "../AP_Compass/AP_Compass.h"
#include "../AP_Declination/AP_Declination.h" #include "../AP_Declination/AP_Declination.h"
#include "../AP_RangeFinder/AP_RangeFinder.h" #include "../AP_RangeFinder/AP_RangeFinder.h"
#include "../SITL/SITL.h" #include "../SITL/SITL.h"
#include "Scheduler.h" #include "Scheduler.h"
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include "../AP_ADC/AP_ADC.h" #include "../AP_ADC/AP_ADC.h"
#include <SITL_State.h> #include "SITL_State.h"
#include <fenv.h> #include <fenv.h>
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;

View File

@ -6,8 +6,8 @@
Andrew Tridgell November 2011 Andrew Tridgell November 2011
*/ */
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL