Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
autopilot.c File Reference
+ Include dependency graph for autopilot.c:

Go to the source code of this file.

Macros

#define AUTOPILOT_IN_FLIGHT_TIME   40
 

Functions

static int ahrs_is_aligned (void)
 
void autopilot_init (void)
 
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
 
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
 

Macro Definition Documentation

#define AUTOPILOT_IN_FLIGHT_TIME   40

Definition at line 47 of file autopilot.c.

Referenced by autopilot_check_in_flight().

Function Documentation

static int ahrs_is_aligned ( void  )
inlinestatic

Definition at line 51 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 204 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:

void autopilot_init ( void  )
void autopilot_on_rc_frame ( void  )
void autopilot_periodic ( void  )

Definition at line 87 of file autopilot.c.

References AP_MODE_FAILSAFE, AP_MODE_KILL, autopilot_detect_ground, autopilot_in_flight, autopilot_mode, autopilot_motors_on, autopilot_set_mode(), commands_failsafe, FALSE, guidance_h_run(), guidance_v_run(), nav_periodic_task(), NAV_PRESCALER, SetCommands, and stabilization_cmd.

Referenced by main_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void autopilot_set_motors_on ( bool_t  motors_on)

Definition at line 234 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 45 of file autopilot.c.

Referenced by autopilot_init(), and DetectGroundEvent().

uint16_t autopilot_flight_time

Definition at line 36 of file autopilot.c.

Referenced by autopilot_init(), and main_periodic().

uint32_t autopilot_in_flight_counter

Definition at line 35 of file autopilot.c.

Referenced by autopilot_check_in_flight(), autopilot_init(), and autopilot_set_mode().

uint8_t autopilot_mode_auto2

Definition at line 32 of file autopilot.c.

Referenced by autopilot_init().

bool_t autopilot_power_switch

Definition at line 42 of file autopilot.c.

Referenced by autopilot_init().

bool_t autopilot_rc

Definition at line 41 of file autopilot.c.

Referenced by autopilot_init(), and main_event().