SITL: clean up includes

Remove unnecessary includes, reorder them in blocks separated by a blank
line

   - Corresponding header file (if exists)
   - System headers
   - Other ArduPilot library headers
   - "Local" headers (from the same library)
This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-10-22 11:58:33 -02:00
parent 8a55b26443
commit 288dc2a385
19 changed files with 46 additions and 34 deletions

View File

@ -17,12 +17,12 @@
parent class for aircraft simulators
*/
#include <AP_HAL/AP_HAL.h>
#include <AP_Common/AP_Common.h>
#include "SIM_Aircraft.h"
#include <unistd.h>
#include <sys/time.h>
#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
#ifdef __CYGWIN__
#include <windows.h>
#include <time.h>

View File

@ -20,10 +20,10 @@
#ifndef _SIM_AIRCRAFT_H
#define _SIM_AIRCRAFT_H
#include "SITL.h"
#include <AP_Common/AP_Common.h>
#include <AP_Math/AP_Math.h>
#include "SITL.h"
namespace SITL {
/*

View File

@ -17,8 +17,8 @@
balloon simulator class
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_Balloon.h"
#include <stdio.h>
namespace SITL {

View File

@ -17,10 +17,12 @@
simulator connector for ardupilot version of CRRCSim
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_CRRCSim.h"
#include <stdio.h>
#include <AP_HAL/AP_HAL.h>
extern const AP_HAL::HAL& hal;
namespace SITL {

View File

@ -20,9 +20,10 @@
#ifndef _SIM_CRRCSIM_H
#define _SIM_CRRCSIM_H
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
namespace SITL {
/*

View File

@ -17,10 +17,12 @@
simulator connector for ardupilot version of Gazebo
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_Gazebo.h"
#include <stdio.h>
#include <AP_HAL/AP_HAL.h>
extern const AP_HAL::HAL& hal;
namespace SITL {

View File

@ -20,9 +20,10 @@
#ifndef _SIM_GAZEBO_H
#define _SIM_GAZEBO_H
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
namespace SITL {
/*

View File

@ -17,10 +17,12 @@
gimbal simulator class for MAVLink gimbal
*/
#include "SIM_Aircraft.h"
#include "SIM_Gimbal.h"
#include <stdio.h>
#include "SIM_Aircraft.h"
extern const AP_HAL::HAL& hal;
namespace SITL {

View File

@ -20,9 +20,10 @@
#ifndef _SIM_GIMBAL_H
#define _SIM_GIMBAL_H
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
namespace SITL {
class Gimbal {

View File

@ -17,8 +17,8 @@
helicopter simulator class
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_Helicopter.h"
#include <stdio.h>
namespace SITL {

View File

@ -17,15 +17,16 @@
simulator connector for ardupilot version of JSBSim
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_JSBSim.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <AP_HAL/AP_HAL.h>
extern const AP_HAL::HAL& hal;

View File

@ -20,9 +20,10 @@
#ifndef _SIM_JSBSIM_H
#define _SIM_JSBSIM_H
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
namespace SITL {
/*

View File

@ -17,8 +17,8 @@
multicopter simulator class
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_Multicopter.h"
#include <stdio.h>
namespace SITL {

View File

@ -17,9 +17,8 @@
rover simulator class
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_Rover.h"
#include <stdio.h>
#include <string.h>
namespace SITL {

View File

@ -18,6 +18,7 @@
*/
#include "SIM_Tracker.h"
#include <stdio.h>
namespace SITL {

View File

@ -17,12 +17,14 @@
simulator connector for ardupilot version of last_letter
*/
#include <AP_HAL/AP_HAL.h>
#include "SIM_last_letter.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <AP_HAL/AP_HAL.h>
extern const AP_HAL::HAL& hal;

View File

@ -20,9 +20,10 @@
#ifndef _SIM_LAST_LETTER_H
#define _SIM_LAST_LETTER_H
#include "SIM_Aircraft.h"
#include <AP_HAL/utility/Socket.h>
#include "SIM_Aircraft.h"
namespace SITL {
/*

View File

@ -18,10 +18,11 @@
SITL.cpp - software in the loop state
*/
#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,8 @@
#ifndef __SITL_H__
#define __SITL_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>
#include <GCS_MAVLink/GCS_MAVLink.h>
namespace SITL {