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:46 +10:00 committed by Randy Mackay
parent 703b27bde7
commit 12d9f2b765
17 changed files with 26 additions and 26 deletions

View File

@ -17,9 +17,9 @@
parent class for aircraft simulators
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <AP_Common.h>
#include <AP_Common/AP_Common.h>
#include "SIM_Aircraft.h"
#include <unistd.h>
#include <sys/time.h>

View File

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

View File

@ -17,7 +17,7 @@
balloon simulator class
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_Balloon.h"
#include <stdio.h>

View File

@ -17,7 +17,7 @@
simulator connector for ardupilot version of CRRCSim
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_CRRCSim.h"
#include <stdio.h>

View File

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

View File

@ -17,7 +17,7 @@
simulator connector for ardupilot version of Gazebo
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_Gazebo.h"
#include <stdio.h>

View File

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

View File

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

View File

@ -17,7 +17,7 @@
helicopter simulator class
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_Helicopter.h"
#include <stdio.h>

View File

@ -17,7 +17,7 @@
simulator connector for ardupilot version of JSBSim
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_JSBSim.h"

View File

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

View File

@ -17,7 +17,7 @@
multicopter simulator class
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_Multicopter.h"
#include <stdio.h>

View File

@ -17,7 +17,7 @@
rover simulator class
*/
#include <AP_HAL.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include "SIM_Rover.h"
#include <stdio.h>

View File

@ -17,7 +17,7 @@
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
#include "SIM_last_letter.h"
#include <stdio.h>

View File

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

View File

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

View File

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