Browse Source

Copter: int gyros on arm, not on first boot

this makes first boot much faster
master
Andrew Tridgell 12 years ago
parent
commit
f6f6caafc8
  1. 2
      ArduCopter/motors.pde
  2. 6
      ArduCopter/system.pde

2
ArduCopter/motors.pde

@ -162,7 +162,7 @@ static void init_arm_motors()
if(did_ground_start == false) { if(did_ground_start == false) {
did_ground_start = true; did_ground_start = true;
startup_ground(); startup_ground(true);
} }
#if HIL_MODE != HIL_MODE_ATTITUDE #if HIL_MODE != HIL_MODE_ATTITUDE

6
ArduCopter/system.pde

@ -253,7 +253,7 @@ static void init_ardupilot()
reset_control_switch(); reset_control_switch();
init_aux_switches(); init_aux_switches();
startup_ground(); startup_ground(false);
#if LOGGING_ENABLED == ENABLED #if LOGGING_ENABLED == ENABLED
Log_Write_Startup(); Log_Write_Startup();
@ -266,7 +266,7 @@ static void init_ardupilot()
//****************************************************************************** //******************************************************************************
//This function does all the calibrations, etc. that we need during a ground start //This function does all the calibrations, etc. that we need during a ground start
//****************************************************************************** //******************************************************************************
static void startup_ground(void) static void startup_ground(bool force_gyro_cal)
{ {
gcs_send_text_P(SEVERITY_LOW,PSTR("GROUND START")); gcs_send_text_P(SEVERITY_LOW,PSTR("GROUND START"));
@ -275,7 +275,7 @@ static void startup_ground(void)
// Warm up and read Gyro offsets // Warm up and read Gyro offsets
// ----------------------------- // -----------------------------
ins.init(AP_InertialSensor::COLD_START, ins.init(force_gyro_cal?AP_InertialSensor::COLD_START:AP_InertialSensor::WARM_START,
ins_sample_rate); ins_sample_rate);
#if CLI_ENABLED == ENABLED #if CLI_ENABLED == ENABLED
report_ins(); report_ins();

Loading…
Cancel
Save