Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_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_t 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_t autopilot_unarmed_in_auto
 

Detailed Description

Arm the motors using a switch.

Definition in file autopilot_arming_switch.h.

Enumeration Type Documentation

Enumerator
STATE_UNINIT 
STATE_WAITING 
STATE_STARTABLE 
STATE_MOTORS_ON 
STATUS_INITIALISE_RC 
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

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_state, autopilot_mode, autopilot_motors_on, autopilot_unarmed_in_auto, FALSE, kill_switch_is_on(), MODE_MANUAL, rc_attitude_sticks_centered(), STATE_MOTORS_ON, STATE_STARTABLE, STATE_UNINIT, STATE_WAITING, THROTTLE_STICK_DOWN, and TRUE.

Referenced by autopilot_on_rc_frame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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, FALSE, and STATE_UNINIT.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void autopilot_arming_set ( bool_t  motors_on)
inlinestatic

Variable Documentation

enum arming_state autopilot_arming_state
bool_t autopilot_unarmed_in_auto