Added takeoff state and ground state variable

This commit is contained in:
Jason Short 2012-01-03 10:24:51 -08:00
parent 37cda3c364
commit e7b750074b

View File

@ -65,6 +65,11 @@ static void arm_motors()
static void init_arm_motors()
{
// Flag used to track if we have armed the motors the first time.
// This is used to decide if we should run the ground_start routine
// which calibrates the IMU
static bool did_ground_start = false;
//Serial.printf("\nARM\n");
#if HIL_MODE != HIL_MODE_DISABLED || defined(DESKTOP_BUILD)
gcs_send_text_P(SEVERITY_HIGH, PSTR("ARMING MOTORS"));
@ -116,6 +121,9 @@ static void init_disarm_motors()
motor_armed = false;
compass.save_offsets();
// we are not in the air
takeoff_complete = false;
#if PIEZO_ARMING == 1
piezo_beep();
#endif