AP fix sitl hil attitude mode.

This commit is contained in:
Michael Oborne 2012-07-24 07:16:09 +08:00
parent 21f0ed00b3
commit 7dd58227a6
2 changed files with 8 additions and 1 deletions

View File

@ -16,7 +16,7 @@
// The following are the recommended settings for Xplane
// simulation. Remove the leading "/* and trailing "*/" to enable:
#define HIL_MODE HIL_MODE_DISABLED
//#define HIL_MODE HIL_MODE_DISABLED
/*
// HIL_MODE SELECTION

View File

@ -224,6 +224,11 @@ AP_AHRS_HIL ahrs(&imu, g_gps);
AP_GPS_HIL g_gps_driver(NULL);
AP_Compass_HIL compass; // never used
AP_Baro_BMP085_HIL barometer;
#ifdef DESKTOP_BUILD
#include <SITL.h>
SITL sitl;
AP_InertialSensor_Oilpan ins( &adc );
#endif
#else
#error Unrecognised HIL_MODE setting.
@ -705,7 +710,9 @@ static void fast_loop()
// Read Airspeed
// -------------
if (airspeed.enabled()) {
#if HIL_MODE != HIL_MODE_ATTITUDE
read_airspeed();
#endif
}
#if HIL_MODE == HIL_MODE_SENSORS