Tools: include SITL only for SITL board

Include board-specific files only when the board is used. Since these
should be exceptional cases, let the includer handle the ifdef instead
of putting ifdefs in every platform-specific header.

In the future we should evaluate whether the HAL for the board should
instantiate this.
This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-10-22 13:36:14 -02:00
parent 62d4c05a8e
commit f27f8f2f5d

View File

@ -33,7 +33,6 @@
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_AHRS/AP_AHRS.h>
#include <SITL/SITL.h>
#include <AP_Compass/AP_Compass.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_InertialSensor/AP_InertialSensor.h>
@ -66,6 +65,10 @@
#include "LogReader.h"
#include "DataFlashFileReader.h"
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <SITL/SITL.h>
#endif
#define streq(x, y) (!strcmp(x, y))
const AP_HAL::HAL& hal = AP_HAL::get_HAL();