Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_arming_yaw.h File Reference
+ Include dependency graph for autopilot_arming_yaw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MOTOR_ARMING_DELAY   40
 Delay until motors are armed/disarmed. More...
 
#define MOTOR_RE_ARM_TIME   10.0
 
#define YAW_MUST_BE_CENTERED   true
 
#define YAW_MUST_BE_PUSHED   false
 

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
}
 Motors ON check state machine states. More...
 

Functions

static void autopilot_arming_init (void)
 
static void autopilot_arming_set (bool motors_on)
 Update the status of the check_motors state machine. More...
 
static bool autopilot_arming_check_valid (bool yaw_must_be_centered)
 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

uint32_t autopilot_motors_on_counter
 
enum arming_state autopilot_check_motor_status
 
float motor_kill_time
 

Detailed Description

Arm the motors by with max yaw stick.

Definition in file autopilot_arming_yaw.h.

Macro Definition Documentation

◆ MOTOR_ARMING_DELAY

#define MOTOR_ARMING_DELAY   40

Delay until motors are armed/disarmed.

In number of rc frames received. So 40 is usually ~1s.

Definition at line 42 of file autopilot_arming_yaw.h.

◆ MOTOR_RE_ARM_TIME

#define MOTOR_RE_ARM_TIME   10.0

Definition at line 46 of file autopilot_arming_yaw.h.

◆ YAW_MUST_BE_CENTERED

#define YAW_MUST_BE_CENTERED   true

Definition at line 88 of file autopilot_arming_yaw.h.

◆ YAW_MUST_BE_PUSHED

#define YAW_MUST_BE_PUSHED   false

Definition at line 89 of file autopilot_arming_yaw.h.

Enumeration Type Documentation

◆ arming_state

Motors ON check state machine states.

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 49 of file autopilot_arming_yaw.h.

Function Documentation

◆ autopilot_arming_check_motors_on()

static void autopilot_arming_check_motors_on ( void  )
inlinestatic

◆ autopilot_arming_check_valid()

static bool autopilot_arming_check_valid ( bool  yaw_must_be_centered)
inlinestatic

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

Also sets the arming status to provide information to the user

Parameters
[in]yaw_must_be_centeredcheck is vallid of a yaw stick centered (true) or pushed (false)
Returns
true if arming checks are all valid

Definition at line 96 of file autopilot_arming_yaw.h.

References AP_ARMING_STATUS_PITCH_NOT_CENTERED, AP_ARMING_STATUS_ROLL_NOT_CENTERED, AP_ARMING_STATUS_THROTTLE_NOT_DOWN, AP_ARMING_STATUS_YAW_CENTERED, AP_ARMING_STATUS_YAW_NOT_CENTERED, pprz_autopilot::arming_status, autopilot, PITCH_STICK_CENTERED, ROLL_STICK_CENTERED, THROTTLE_STICK_DOWN, and YAW_STICK_CENTERED.

Referenced by autopilot_arming_check_motors_on().

+ 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

Update the status of the check_motors state machine.

Definition at line 76 of file autopilot_arming_yaw.h.

References autopilot_check_motor_status, get_sys_time_float(), kill_switch_is_on(), motor_kill_time, STATUS_MOTORS_AUTOMATICALLY_OFF, STATUS_MOTORS_ON, and STATUS_MOTORS_RC_KILLED.

+ Here is the call graph for this function:

Variable Documentation

◆ autopilot_check_motor_status

enum arming_state autopilot_check_motor_status

◆ autopilot_motors_on_counter

uint32_t autopilot_motors_on_counter

◆ motor_kill_time

float motor_kill_time