Browse Source

Plane: fix handling of sensors HIL startup

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
9e0096ddb5
  1. 2
      ArduPlane/config.h
  2. 9
      ArduPlane/system.pde

2
ArduPlane/config.h

@ -147,7 +147,7 @@ @@ -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

9
ArduPlane/system.pde

@ -421,6 +421,15 @@ static void check_short_failsafe() @@ -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);

Loading…
Cancel
Save