Browse Source

SITL: split AP_HAL_SITL and AP_SIM_ENABLED

apm_2208
Peter Barker 3 years ago committed by Peter Barker
parent
commit
2e809282e7
  1. 2
      libraries/SITL/SIM_GPS.h
  2. 6
      libraries/SITL/SITL.cpp
  3. 4
      libraries/SITL/SITL.h

2
libraries/SITL/SIM_GPS.h

@ -26,7 +26,7 @@ param set SERIAL5_PROTOCOL 5 @@ -26,7 +26,7 @@ param set SERIAL5_PROTOCOL 5
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_SIM_GPS_ENABLED
#define HAL_SIM_GPS_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL && !defined(HAL_BUILD_AP_PERIPH))
#define HAL_SIM_GPS_ENABLED (AP_SIM_ENABLED && !defined(HAL_BUILD_AP_PERIPH))
#endif
#if HAL_SIM_GPS_ENABLED

6
libraries/SITL/SITL.cpp

@ -19,11 +19,11 @@ @@ -19,11 +19,11 @@
#include "SITL.h"
#if AP_SIM_ENABLED
#include <AP_Common/AP_Common.h>
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
@ -659,4 +659,4 @@ SITL::SIM *sitl() @@ -659,4 +659,4 @@ SITL::SIM *sitl()
};
#endif // CONFIG_HAL_BOARD
#endif // AP_SIM_ENABLED

4
libraries/SITL/SITL.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#include <AP_HAL/AP_HAL_Boards.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#if AP_SIM_ENABLED
#include <AP_Math/AP_Math.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
@ -486,4 +486,4 @@ namespace AP { @@ -486,4 +486,4 @@ namespace AP {
SITL::SIM *sitl();
};
#endif // CONFIG_HAL_BOARD
#endif // AP_SIM_ENABLED

Loading…
Cancel
Save