mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 16:23:56 -04:00
AP fix sitl hil attitude mode.
This commit is contained in:
parent
9cd98e79dd
commit
39ad8b5eec
@ -16,7 +16,7 @@
|
|||||||
// The following are the recommended settings for Xplane
|
// The following are the recommended settings for Xplane
|
||||||
// simulation. Remove the leading "/* and trailing "*/" to enable:
|
// simulation. Remove the leading "/* and trailing "*/" to enable:
|
||||||
|
|
||||||
#define HIL_MODE HIL_MODE_DISABLED
|
//#define HIL_MODE HIL_MODE_DISABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// HIL_MODE SELECTION
|
// HIL_MODE SELECTION
|
||||||
|
@ -224,6 +224,11 @@ AP_AHRS_HIL ahrs(&imu, g_gps);
|
|||||||
AP_GPS_HIL g_gps_driver(NULL);
|
AP_GPS_HIL g_gps_driver(NULL);
|
||||||
AP_Compass_HIL compass; // never used
|
AP_Compass_HIL compass; // never used
|
||||||
AP_Baro_BMP085_HIL barometer;
|
AP_Baro_BMP085_HIL barometer;
|
||||||
|
#ifdef DESKTOP_BUILD
|
||||||
|
#include <SITL.h>
|
||||||
|
SITL sitl;
|
||||||
|
AP_InertialSensor_Oilpan ins( &adc );
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error Unrecognised HIL_MODE setting.
|
#error Unrecognised HIL_MODE setting.
|
||||||
@ -705,7 +710,9 @@ static void fast_loop()
|
|||||||
// Read Airspeed
|
// Read Airspeed
|
||||||
// -------------
|
// -------------
|
||||||
if (airspeed.enabled()) {
|
if (airspeed.enabled()) {
|
||||||
|
#if HIL_MODE != HIL_MODE_ATTITUDE
|
||||||
read_airspeed();
|
read_airspeed();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HIL_MODE == HIL_MODE_SENSORS
|
#if HIL_MODE == HIL_MODE_SENSORS
|
||||||
|
Loading…
Reference in New Issue
Block a user