Browse Source

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.
mission-4.1.18
Gustavo Jose de Sousa 10 years ago committed by Andrew Tridgell
parent
commit
27b9d71e2c
  1. 2
      libraries/AP_HAL_SITL/AP_HAL_SITL.h
  2. 2
      libraries/AP_HAL_SITL/AnalogIn.cpp
  3. 2
      libraries/AP_HAL_SITL/AnalogIn.h
  4. 8
      libraries/AP_HAL_SITL/HAL_SITL_Class.cpp
  5. 4
      libraries/AP_HAL_SITL/HAL_SITL_Class.h
  6. 2
      libraries/AP_HAL_SITL/RCInput.cpp
  7. 4
      libraries/AP_HAL_SITL/RCInput.h
  8. 2
      libraries/AP_HAL_SITL/RCOutput.cpp
  9. 4
      libraries/AP_HAL_SITL/RCOutput.h
  10. 6
      libraries/AP_HAL_SITL/SITL_State.cpp
  11. 4
      libraries/AP_HAL_SITL/SITL_State.h
  12. 26
      libraries/AP_HAL_SITL/SITL_cmdline.cpp
  13. 2
      libraries/AP_HAL_SITL/Scheduler.cpp
  14. 2
      libraries/AP_HAL_SITL/Scheduler.h
  15. 2
      libraries/AP_HAL_SITL/Storage.cpp
  16. 2
      libraries/AP_HAL_SITL/Storage.h
  17. 4
      libraries/AP_HAL_SITL/UARTDriver.cpp
  18. 2
      libraries/AP_HAL_SITL/UARTDriver.h
  19. 2
      libraries/AP_HAL_SITL/Util.h
  20. 4
      libraries/AP_HAL_SITL/sitl_barometer.cpp
  21. 6
      libraries/AP_HAL_SITL/sitl_compass.cpp
  22. 6
      libraries/AP_HAL_SITL/sitl_gps.cpp
  23. 10
      libraries/AP_HAL_SITL/sitl_ins.cpp
  24. 4
      libraries/AP_HAL_SITL/sitl_optical_flow.cpp

2
libraries/AP_HAL_SITL/AP_HAL_SITL.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __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

2
libraries/AP_HAL_SITL/AnalogIn.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/// -*- 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
#include "AP_HAL_SITL.h"

2
libraries/AP_HAL_SITL/AnalogIn.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __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"
#define SITL_INPUT_MAX_CHANNELS 12

8
libraries/AP_HAL_SITL/HAL_SITL_Class.cpp

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
/// -*- 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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h"
#include "Scheduler.h"
@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
#include "SITL_State.h"
#include "Util.h"
#include <AP_HAL_Empty.h>
#include <AP_HAL_Empty_Private.h>
#include <AP_HAL_Empty/AP_HAL_Empty.h>
#include <AP_HAL_Empty/AP_HAL_Empty_Private.h>
using namespace HALSITL;

4
libraries/AP_HAL_SITL/HAL_SITL_Class.h

@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
#ifndef __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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "SITL_State.h"

2
libraries/AP_HAL_SITL/RCInput.cpp

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

4
libraries/AP_HAL_SITL/RCInput.h

@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
#ifndef __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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
class HALSITL::SITLRCInput : public AP_HAL::RCInput {
public:

2
libraries/AP_HAL_SITL/RCOutput.cpp

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

4
libraries/AP_HAL_SITL/RCOutput.h

@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
#ifndef __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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
class HALSITL::SITLRCOutput : public AP_HAL::RCOutput {
public:

6
libraries/AP_HAL_SITL/SITL_State.cpp

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
/// -*- 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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h"
#include "UARTDriver.h"
@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
#include <errno.h>
#include <sys/select.h>
#include <AP_Param.h>
#include <AP_Param/AP_Param.h>
extern const AP_HAL::HAL& hal;

4
libraries/AP_HAL_SITL/SITL_State.h

@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
#ifndef __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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h"

26
libraries/AP_HAL_SITL/SITL_cmdline.cpp

@ -1,27 +1,27 @@ @@ -1,27 +1,27 @@
/// -*- 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
#include <AP_HAL_SITL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h"
#include "UARTDriver.h"
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <utility/getopt_cpp.h>
#include <SIM_Multicopter.h>
#include <SIM_Helicopter.h>
#include <SIM_Rover.h>
#include <SIM_CRRCSim.h>
#include <SIM_Gazebo.h>
#include <SIM_last_letter.h>
#include <SIM_JSBSim.h>
#include <SIM_Tracker.h>
#include <SIM_Balloon.h>
#include <AP_HAL/utility/getopt_cpp.h>
#include <SITL/SIM_Multicopter.h>
#include <SITL/SIM_Helicopter.h>
#include <SITL/SIM_Rover.h>
#include <SITL/SIM_CRRCSim.h>
#include <SITL/SIM_Gazebo.h>
#include <SITL/SIM_last_letter.h>
#include <SITL/SIM_JSBSim.h>
#include <SITL/SIM_Tracker.h>
#include <SITL/SIM_Balloon.h>
extern const AP_HAL::HAL& hal;

2
libraries/AP_HAL_SITL/Scheduler.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/// -*- 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
#include "AP_HAL_SITL.h"

2
libraries/AP_HAL_SITL/Scheduler.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __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
#include "AP_HAL_SITL_Namespace.h"
#include <sys/time.h>

2
libraries/AP_HAL_SITL/Storage.cpp

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

2
libraries/AP_HAL_SITL/Storage.h

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
#ifndef __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"
class HALSITL::SITLEEPROMStorage : public AP_HAL::Storage {

4
libraries/AP_HAL_SITL/UARTDriver.cpp

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
//
// 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
#include <limits.h>
@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdarg.h>
#include <AP_Math.h>
#include <AP_Math/AP_Math.h>
#include <errno.h>
#include <sys/ioctl.h>

2
libraries/AP_HAL_SITL/UARTDriver.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __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
#include <stdint.h>

2
libraries/AP_HAL_SITL/Util.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef __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"
class HALSITL::SITLUtil : public AP_HAL::Util {

4
libraries/AP_HAL_SITL/sitl_barometer.cpp

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

6
libraries/AP_HAL_SITL/sitl_compass.cpp

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

6
libraries/AP_HAL_SITL/sitl_gps.cpp

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

10
libraries/AP_HAL_SITL/sitl_ins.cpp

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

4
libraries/AP_HAL_SITL/sitl_optical_flow.cpp

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

Loading…
Cancel
Save