Plane: fix handling of sensors HIL startup

This commit is contained in:
Andrew Tridgell 2013-01-04 11:29:19 +11:00
parent bc3b6fcb9f
commit 9e0096ddb5
2 changed files with 10 additions and 1 deletions

View File

@ -147,7 +147,7 @@
# define MAGNETOMETER ENABLED
// force HIL mode until we have the drivers done
# define HIL_MODE HIL_MODE_ATTITUDE
# define HIL_MODE HIL_MODE_SENSORS
#endif

View File

@ -421,6 +421,15 @@ static void check_short_failsafe()
static void startup_INS_ground(bool force_accel_level)
{
#if HIL_MODE != HIL_MODE_DISABLED
while (!barometer.healthy) {
// the barometer becomes healthy when we get the first
// HIL_STATE message
gcs_send_text_P(SEVERITY_LOW, PSTR("Waiting for first HIL_STATE message"));
delay(1000);
}
#endif
gcs_send_text_P(SEVERITY_MEDIUM, PSTR("Warming up ADC..."));
mavlink_delay(500);