Plane: don't do accel calibration in HIL mode

this should fix the hang on startup
This commit is contained in:
Andrew Tridgell 2012-11-25 21:53:27 +11:00
parent 399e5d97a8
commit a87394fff2
1 changed files with 2 additions and 0 deletions

View File

@ -435,12 +435,14 @@ static void startup_INS_ground(bool force_accel_level)
mavlink_delay(1000); mavlink_delay(1000);
ins.init(AP_InertialSensor::COLD_START, mavlink_delay, flash_leds, &timer_scheduler); ins.init(AP_InertialSensor::COLD_START, mavlink_delay, flash_leds, &timer_scheduler);
#if HIL_MODE == HIL_MODE_DISABLED
if (force_accel_level || g.manual_level == 0) { if (force_accel_level || g.manual_level == 0) {
// when MANUAL_LEVEL is set to 1 we don't do accelerometer // when MANUAL_LEVEL is set to 1 we don't do accelerometer
// levelling on each boot, and instead rely on the user to do // levelling on each boot, and instead rely on the user to do
// it once via the ground station // it once via the ground station
ins.init_accel(mavlink_delay, flash_leds); ins.init_accel(mavlink_delay, flash_leds);
} }
#endif
ahrs.set_fly_forward(true); ahrs.set_fly_forward(true);
ahrs.reset(); ahrs.reset();