Browse Source

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.
master
Gustavo Jose de Sousa 10 years ago committed by Andrew Tridgell
parent
commit
a02e7730ea
  1. 4
      libraries/SITL/SIM_Aircraft.cpp
  2. 4
      libraries/SITL/SIM_Aircraft.h
  3. 2
      libraries/SITL/SIM_Balloon.cpp
  4. 2
      libraries/SITL/SIM_CRRCSim.cpp
  5. 2
      libraries/SITL/SIM_CRRCSim.h
  6. 2
      libraries/SITL/SIM_Gazebo.cpp
  7. 2
      libraries/SITL/SIM_Gazebo.h
  8. 2
      libraries/SITL/SIM_Gimbal.h
  9. 2
      libraries/SITL/SIM_Helicopter.cpp
  10. 2
      libraries/SITL/SIM_JSBSim.cpp
  11. 2
      libraries/SITL/SIM_JSBSim.h
  12. 2
      libraries/SITL/SIM_Multicopter.cpp
  13. 2
      libraries/SITL/SIM_Rover.cpp
  14. 2
      libraries/SITL/SIM_last_letter.cpp
  15. 2
      libraries/SITL/SIM_last_letter.h
  16. 8
      libraries/SITL/SITL.cpp
  17. 10
      libraries/SITL/SITL.h

4
libraries/SITL/SIM_Aircraft.cpp

@ -17,9 +17,9 @@
parent class for aircraft simulators parent class for aircraft simulators
*/ */
#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_Common.h> #include <AP_Common/AP_Common.h>
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>

4
libraries/SITL/SIM_Aircraft.h

@ -21,8 +21,8 @@
#define _SIM_AIRCRAFT_H #define _SIM_AIRCRAFT_H
#include "SITL.h" #include "SITL.h"
#include <AP_Common.h> #include <AP_Common/AP_Common.h>
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
/* /*
parent class for all simulator types parent class for all simulator types

2
libraries/SITL/SIM_Balloon.cpp

@ -17,7 +17,7 @@
balloon simulator class balloon simulator class
*/ */
#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 "SIM_Balloon.h" #include "SIM_Balloon.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_CRRCSim.cpp

@ -17,7 +17,7 @@
simulator connector for ardupilot version of CRRCSim simulator connector for ardupilot version of CRRCSim
*/ */
#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 "SIM_CRRCSim.h" #include "SIM_CRRCSim.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_CRRCSim.h

@ -21,7 +21,7 @@
#define _SIM_CRRCSIM_H #define _SIM_CRRCSIM_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#include <utility/Socket.h> #include <AP_HAL/utility/Socket.h>
/* /*
a CRRCSim simulator a CRRCSim simulator

2
libraries/SITL/SIM_Gazebo.cpp

@ -17,7 +17,7 @@
simulator connector for ardupilot version of Gazebo simulator connector for ardupilot version of Gazebo
*/ */
#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 "SIM_Gazebo.h" #include "SIM_Gazebo.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_Gazebo.h

@ -21,7 +21,7 @@
#define _SIM_GAZEBO_H #define _SIM_GAZEBO_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#include <utility/Socket.h> #include <AP_HAL/utility/Socket.h>
/* /*
Gazebo simulator Gazebo simulator

2
libraries/SITL/SIM_Gimbal.h

@ -22,7 +22,7 @@
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <utility/Socket.h> #include <AP_HAL/utility/Socket.h>
class Gimbal class Gimbal
{ {

2
libraries/SITL/SIM_Helicopter.cpp

@ -17,7 +17,7 @@
helicopter simulator class helicopter simulator class
*/ */
#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 "SIM_Helicopter.h" #include "SIM_Helicopter.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_JSBSim.cpp

@ -17,7 +17,7 @@
simulator connector for ardupilot version of JSBSim simulator connector for ardupilot version of JSBSim
*/ */
#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 "SIM_JSBSim.h" #include "SIM_JSBSim.h"

2
libraries/SITL/SIM_JSBSim.h

@ -21,7 +21,7 @@
#define _SIM_JSBSIM_H #define _SIM_JSBSIM_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#include <utility/Socket.h> #include <AP_HAL/utility/Socket.h>
/* /*
a Jsbsim simulator a Jsbsim simulator

2
libraries/SITL/SIM_Multicopter.cpp

@ -17,7 +17,7 @@
multicopter simulator class multicopter simulator class
*/ */
#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 "SIM_Multicopter.h" #include "SIM_Multicopter.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_Rover.cpp

@ -17,7 +17,7 @@
rover simulator class rover simulator class
*/ */
#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 "SIM_Rover.h" #include "SIM_Rover.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_last_letter.cpp

@ -17,7 +17,7 @@
simulator connector for ardupilot version of last_letter simulator connector for ardupilot version of last_letter
*/ */
#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 "SIM_last_letter.h" #include "SIM_last_letter.h"
#include <stdio.h> #include <stdio.h>

2
libraries/SITL/SIM_last_letter.h

@ -21,7 +21,7 @@
#define _SIM_LAST_LETTER_H #define _SIM_LAST_LETTER_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
#include <utility/Socket.h> #include <AP_HAL/utility/Socket.h>
/* /*
a last_letter simulator a last_letter simulator

8
libraries/SITL/SITL.cpp

@ -18,10 +18,10 @@
SITL.cpp - software in the loop state SITL.cpp - software in the loop state
*/ */
#include <AP_Common.h> #include <AP_Common/AP_Common.h>
#include <AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink.h> #include <GCS_MAVLink/GCS_MAVLink.h>
#include <SITL.h> #include "SITL.h"
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;

10
libraries/SITL/SITL.h

@ -3,11 +3,11 @@
#ifndef __SITL_H__ #ifndef __SITL_H__
#define __SITL_H__ #define __SITL_H__
#include <AP_Param.h> #include <AP_Param/AP_Param.h>
#include <AP_Common.h> #include <AP_Common/AP_Common.h>
#include <AP_Math.h> #include <AP_Math/AP_Math.h>
#include <GCS_MAVLink.h> #include <GCS_MAVLink/GCS_MAVLink.h>
#include <DataFlash.h> #include <DataFlash/DataFlash.h>
struct PACKED sitl_fdm { struct PACKED sitl_fdm {
// this is the packet sent by the simulator // this is the packet sent by the simulator

Loading…
Cancel
Save