Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_arming_throttle.h File Reference
+ Include dependency graph for autopilot_arming_throttle.h:

Go to the source code of this file.

Macros

#define AUTOPILOT_ARMING_DELAY   10
 

Enumerations

enum  arming_throttle_state {
  STATE_UNINIT, STATE_WAITING, STATE_MOTORS_OFF_READY, STATE_ARMING,
  STATE_MOTORS_ON, STATE_UNARMING
}
 

Functions

static void autopilot_arming_init (void)
 
static void autopilot_arming_set (bool motors_on)
 
static bool autopilot_arming_check_valid (void)
 Checks all arm requirements and returns true if OK and false otherwise. More...
 
static void autopilot_arming_check_motors_on (void)
 State machine to check if motors should be turned ON or OFF. More...
 

Variables

enum arming_throttle_state autopilot_arming_state
 
uint8_t autopilot_arming_delay_counter
 
bool autopilot_unarmed_in_auto
 

Detailed Description

Automatically arm the motors when applying throttle.

Definition in file autopilot_arming_throttle.h.

Macro Definition Documentation

◆ AUTOPILOT_ARMING_DELAY

#define AUTOPILOT_ARMING_DELAY   10

Definition at line 35 of file autopilot_arming_throttle.h.

Enumeration Type Documentation

◆ arming_throttle_state

Enumerator
STATE_UNINIT 
STATE_WAITING 
STATE_MOTORS_OFF_READY 
STATE_ARMING 
STATE_MOTORS_ON 
STATE_UNARMING 

Definition at line 37 of file autopilot_arming_throttle.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.

  • automatically unkill when applying throttle
  • if throttle was not down at startup, you need to put throttle down again first
  • other sticks need to be centered to start motors
  • need to be in manual mode to start the motors

Definition at line 98 of file autopilot_arming_throttle.h.

References AP_ARMING_STATUS_ARMED, AP_ARMING_STATUS_ARMING, AP_ARMING_STATUS_DISARMING, AP_ARMING_STATUS_KILLED, AP_ARMING_STATUS_THROTTLE_NOT_DOWN, AP_MODE_KILL, pprz_autopilot::arming_status, autopilot, autopilot_arming_check_valid(), AUTOPILOT_ARMING_DELAY, autopilot_arming_delay_counter, autopilot_arming_state, autopilot_get_mode(), autopilot_unarmed_in_auto, MODE_MANUAL, pprz_autopilot::motors_on, STATE_ARMING, STATE_MOTORS_OFF_READY, STATE_MOTORS_ON, STATE_UNARMING, STATE_UNINIT, STATE_WAITING, and THROTTLE_STICK_DOWN.

+ Here is the call graph for this function:

◆ autopilot_arming_check_valid()

static bool autopilot_arming_check_valid ( void  )
inlinestatic

Checks all arm requirements and returns true if OK and false otherwise.

Also sets the arming status to provide information to the user

Returns
true if arming checks are all valid

Definition at line 73 of file autopilot_arming_throttle.h.

References AP_ARMING_STATUS_NOT_MODE_MANUAL, AP_ARMING_STATUS_PITCH_NOT_CENTERED, AP_ARMING_STATUS_ROLL_NOT_CENTERED, AP_ARMING_STATUS_THROTTLE_DOWN, AP_ARMING_STATUS_YAW_NOT_CENTERED, pprz_autopilot::arming_status, autopilot, autopilot_get_mode(), autopilot_unarmed_in_auto, MODE_MANUAL, PITCH_STICK_CENTERED, ROLL_STICK_CENTERED, THROTTLE_STICK_DOWN, and YAW_STICK_CENTERED.

Referenced by autopilot_arming_check_motors_on().

+ 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

◆ autopilot_arming_set()

static void autopilot_arming_set ( bool  motors_on)
inlinestatic

Variable Documentation

◆ autopilot_arming_delay_counter

uint8_t autopilot_arming_delay_counter

◆ autopilot_arming_state

◆ autopilot_unarmed_in_auto

bool autopilot_unarmed_in_auto