Add ability to compile sensor hil with sitl

This commit is contained in:
Michael Oborne 2013-03-31 16:35:23 +08:00
parent 39ba406957
commit 59f80410d5
1 changed files with 11 additions and 1 deletions

View File

@ -275,9 +275,13 @@ AP_GPS_HIL g_gps_driver;
AP_InertialSensor_Stub ins;
AP_AHRS_DCM ahrs(&ins, g_gps);
static int32_t gps_base_alt;
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
// When building for SITL we use the HIL barometer and compass drivers
SITL sitl;
#endif
#elif HIL_MODE == HIL_MODE_ATTITUDE
AP_ADC_HIL adc;
AP_InertialSensor_Stub ins;
@ -287,6 +291,12 @@ AP_Compass_HIL compass; // never used
AP_Baro_BMP085_HIL barometer;
static int32_t gps_base_alt;
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
// When building for SITL we use the HIL barometer and compass drivers
SITL sitl;
#endif
#else
#error Unrecognised HIL_MODE setting.
#endif // HIL MODE