Browse Source

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)
mission-4.1.18
Caio Marcelo de Oliveira Filho 9 years ago
parent
commit
288dc2a385
  1. 8
      libraries/SITL/SIM_Aircraft.cpp
  2. 4
      libraries/SITL/SIM_Aircraft.h
  3. 2
      libraries/SITL/SIM_Balloon.cpp
  4. 4
      libraries/SITL/SIM_CRRCSim.cpp
  5. 3
      libraries/SITL/SIM_CRRCSim.h
  6. 4
      libraries/SITL/SIM_Gazebo.cpp
  7. 3
      libraries/SITL/SIM_Gazebo.h
  8. 4
      libraries/SITL/SIM_Gimbal.cpp
  9. 3
      libraries/SITL/SIM_Gimbal.h
  10. 2
      libraries/SITL/SIM_Helicopter.cpp
  11. 13
      libraries/SITL/SIM_JSBSim.cpp
  12. 3
      libraries/SITL/SIM_JSBSim.h
  13. 2
      libraries/SITL/SIM_Multicopter.cpp
  14. 3
      libraries/SITL/SIM_Rover.cpp
  15. 1
      libraries/SITL/SIM_Tracker.cpp
  16. 8
      libraries/SITL/SIM_last_letter.cpp
  17. 3
      libraries/SITL/SIM_last_letter.h
  18. 3
      libraries/SITL/SITL.cpp
  19. 5
      libraries/SITL/SITL.h

8
libraries/SITL/SIM_Aircraft.cpp

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

4
libraries/SITL/SIM_Aircraft.h

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

2
libraries/SITL/SIM_Balloon.cpp

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

4
libraries/SITL/SIM_CRRCSim.cpp

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

3
libraries/SITL/SIM_CRRCSim.h

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

4
libraries/SITL/SIM_Gazebo.cpp

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

3
libraries/SITL/SIM_Gazebo.h

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

4
libraries/SITL/SIM_Gimbal.cpp

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

3
libraries/SITL/SIM_Gimbal.h

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

2
libraries/SITL/SIM_Helicopter.cpp

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

13
libraries/SITL/SIM_JSBSim.cpp

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

3
libraries/SITL/SIM_JSBSim.h

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

2
libraries/SITL/SIM_Multicopter.cpp

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

3
libraries/SITL/SIM_Rover.cpp

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

1
libraries/SITL/SIM_Tracker.cpp

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

8
libraries/SITL/SIM_last_letter.cpp

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

3
libraries/SITL/SIM_last_letter.h

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

3
libraries/SITL/SITL.cpp

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

5
libraries/SITL/SITL.h

@ -3,11 +3,8 @@
#ifndef __SITL_H__ #ifndef __SITL_H__
#define __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 <DataFlash/DataFlash.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
namespace SITL { namespace SITL {

Loading…
Cancel
Save