Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_arming_switch.h File Reference

Arm the motors using a switch. More...

+ Include dependency graph for autopilot_arming_switch.h:

Go to the source code of this file.

Enumerations

enum  arming_state {
  STATE_UNINIT , STATE_WAITING , STATE_STARTABLE , STATE_MOTORS_ON ,
  STATUS_INITIALISE_RC , STATUS_MOTORS_RC_KILLED , STATUS_MOTORS_AUTOMATICALLY_OFF , STATUS_MOTORS_AUTOMATICALLY_OFF_SAFETY_WAIT ,
  STATUS_MOTORS_OFF , STATUS_M_OFF_STICK_PUSHED , STATUS_START_MOTORS , STATUS_MOTORS_ON ,
  STATUS_M_ON_STICK_PUSHED , STATUS_STOP_MOTORS
}
 

Functions

static void autopilot_arming_init (void)
 
static void autopilot_arming_set (bool motors_on)
 
static void autopilot_arming_check_motors_on (void)
 State machine to check if motors should be turned ON or OFF using the kill switch. More...
 

Variables

enum arming_state autopilot_arming_state
 
bool autopilot_unarmed_in_auto
 

Detailed Description

Arm the motors using a switch.

Definition in file autopilot_arming_switch.h.

Enumeration Type Documentation

◆ arming_state

Enumerator
STATE_UNINIT 
STATE_WAITING 
STATE_STARTABLE 
STATE_MOTORS_ON 
STATUS_INITIALISE_RC 
STATUS_MOTORS_RC_KILLED 
STATUS_MOTORS_AUTOMATICALLY_OFF 
STATUS_MOTORS_AUTOMATICALLY_OFF_SAFETY_WAIT 
STATUS_MOTORS_OFF 
STATUS_M_OFF_STICK_PUSHED 
STATUS_START_MOTORS 
STATUS_MOTORS_ON 
STATUS_M_ON_STICK_PUSHED 
STATUS_STOP_MOTORS 

Definition at line 38 of file autopilot_arming_switch.h.

Function Documentation

◆ autopilot_arming_check_motors_on()

static void autopilot_arming_check_motors_on ( void  )
inlinestatic

State machine to check if motors should be turned ON or OFF using the kill switch.

If kill switch is off during startup (unkilled), you need to kill again first, then unkill to start. Also to start the motors, throttle needs to be down, other sticks centered, AHRS aligned and you need be in manual mode.

Definition at line 79 of file autopilot_arming_switch.h.

References AP_MODE_FAILSAFE, AP_MODE_KILL, autopilot_arming_motors_on(), autopilot_arming_state, autopilot_get_mode(), autopilot_unarmed_in_auto, kill_switch_is_on(), MODE_MANUAL, rc_attitude_sticks_centered(), STATE_MOTORS_ON, STATE_STARTABLE, STATE_UNINIT, STATE_WAITING, and THROTTLE_STICK_DOWN.

Referenced by autopilot_generated_on_rc_frame(), and autopilot_static_on_rc_frame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autopilot_arming_init()

static void autopilot_arming_init ( void  )
inlinestatic

Definition at line 48 of file autopilot_arming_switch.h.

References autopilot_arming_state, autopilot_unarmed_in_auto, and STATE_UNINIT.

Referenced by autopilot_generated_init(), and autopilot_static_init().

+ Here is the caller graph for this function:

◆ autopilot_arming_set()

static void autopilot_arming_set ( bool  motors_on)
inlinestatic

Definition at line 54 of file autopilot_arming_switch.h.

References AP_MODE_FAILSAFE, AP_MODE_KILL, autopilot_arming_state, autopilot_get_mode(), autopilot_unarmed_in_auto, MODE_MANUAL, STATE_MOTORS_ON, and STATE_STARTABLE.

Referenced by autopilot_generated_set_motors_on(), and autopilot_static_set_motors_on().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ autopilot_arming_state

enum arming_state autopilot_arming_state

◆ autopilot_unarmed_in_auto

bool autopilot_unarmed_in_auto