Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot.c File Reference

Autopilot. More...

+ Include dependency graph for autopilot.c:

Go to the source code of this file.

Macros

#define AUTOPILOT_IN_FLIGHT_TIME   40
 
#define MODE_STARTUP   AP_MODE_KILL
 

Functions

static int ahrs_is_aligned (void)
 
void autopilot_init (void)
 Autopilot inititalization. More...
 
static void autopilot_check_in_flight_no_rc (bool_t motors_on)
 
void autopilot_periodic (void)
 
void autopilot_set_mode (uint8_t new_autopilot_mode)
 
static void autopilot_check_in_flight (bool_t motors_on)
 
void autopilot_set_motors_on (bool_t motors_on)
 
void autopilot_on_rc_frame (void)
 

Variables

uint8_t autopilot_mode
 
uint8_t autopilot_mode_auto2
 
bool_t autopilot_in_flight
 
uint32_t autopilot_in_flight_counter
 
uint16_t autopilot_flight_time
 flight time in seconds. More...
 
bool_t autopilot_motors_on
 
bool_t kill_throttle
 
bool_t autopilot_rc
 
bool_t autopilot_power_switch
 
bool_t autopilot_detect_ground
 
bool_t autopilot_detect_ground_once
 

Detailed Description

Autopilot.

Definition in file autopilot.c.

Macro Definition Documentation

#define AUTOPILOT_IN_FLIGHT_TIME   40

Definition at line 55 of file autopilot.c.

Referenced by autopilot_check_in_flight(), and autopilot_check_in_flight_no_rc().

#define MODE_STARTUP   AP_MODE_KILL

Definition at line 78 of file autopilot.c.

Referenced by autopilot_init().

Function Documentation

static int ahrs_is_aligned ( void  )
inlinestatic

Definition at line 59 of file autopilot.c.

References ahrs, AHRS_RUNNING, and Ahrs::status.

Referenced by autopilot_set_mode(), and autopilot_set_motors_on().

+ Here is the caller graph for this function:

static void autopilot_check_in_flight ( bool_t  motors_on)
inlinestatic

Definition at line 269 of file autopilot.c.

References autopilot_in_flight, autopilot_in_flight_counter, AUTOPILOT_IN_FLIGHT_TIME, FALSE, THROTTLE_STICK_DOWN, and TRUE.

Referenced by autopilot_on_rc_frame().

+ Here is the caller graph for this function:

static void autopilot_check_in_flight_no_rc ( bool_t  motors_on)
inlinestatic

Definition at line 111 of file autopilot.c.

References autopilot_in_flight, autopilot_in_flight_counter, AUTOPILOT_IN_FLIGHT_TIME, FALSE, stabilization_cmd, and TRUE.

Referenced by autopilot_periodic().

+ Here is the caller graph for this function:

void autopilot_set_motors_on ( bool_t  motors_on)

Definition at line 299 of file autopilot.c.

References ahrs_is_aligned(), autopilot_arming_set(), autopilot_motors_on, FALSE, kill_throttle, and TRUE.

Referenced by autopilot_set_mode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool_t autopilot_detect_ground
bool_t autopilot_detect_ground_once

Definition at line 53 of file autopilot.c.

Referenced by autopilot_init(), and DetectGroundEvent().

uint16_t autopilot_flight_time

flight time in seconds.

Definition at line 44 of file autopilot.c.

uint32_t autopilot_in_flight_counter
uint8_t autopilot_mode_auto2

Definition at line 40 of file autopilot.c.

Referenced by autopilot_init().

bool_t autopilot_power_switch

Definition at line 50 of file autopilot.c.

Referenced by autopilot_init().

bool_t autopilot_rc

Definition at line 49 of file autopilot.c.

Referenced by autopilot_init(), and main_event().

bool_t kill_throttle

Definition at line 47 of file autopilot.c.