mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 14:08:45 -04:00
Added takeoff state and ground state variable
This commit is contained in:
parent
37cda3c364
commit
e7b750074b
@ -65,6 +65,11 @@ static void arm_motors()
|
|||||||
|
|
||||||
static void init_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");
|
//Serial.printf("\nARM\n");
|
||||||
#if HIL_MODE != HIL_MODE_DISABLED || defined(DESKTOP_BUILD)
|
#if HIL_MODE != HIL_MODE_DISABLED || defined(DESKTOP_BUILD)
|
||||||
gcs_send_text_P(SEVERITY_HIGH, PSTR("ARMING MOTORS"));
|
gcs_send_text_P(SEVERITY_HIGH, PSTR("ARMING MOTORS"));
|
||||||
@ -116,6 +121,9 @@ static void init_disarm_motors()
|
|||||||
motor_armed = false;
|
motor_armed = false;
|
||||||
compass.save_offsets();
|
compass.save_offsets();
|
||||||
|
|
||||||
|
// we are not in the air
|
||||||
|
takeoff_complete = false;
|
||||||
|
|
||||||
#if PIEZO_ARMING == 1
|
#if PIEZO_ARMING == 1
|
||||||
piezo_beep();
|
piezo_beep();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user