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
main_fbw.c File Reference

Rotorcraft FBW main loop. More...

+ Include dependency graph for main_fbw.c:

Go to the source code of this file.

Enumerations

enum  fbw_mode_enum { FBW_MODE_MANUAL = 0, FBW_MODE_AUTO = 1, FBW_MODE_FAILSAFE = 2 }
 Fly by wire modes. More...
 

Functions

int main (void)
 
STATIC_INLINE void main_init (void)
 
STATIC_INLINE void handle_periodic_tasks (void)
 
STATIC_INLINE void telemetry_periodic (void)
 
STATIC_INLINE void main_periodic (void)
 
static void autopilot_on_rc_frame (void)
 
static void autopilot_on_ap_command (void)
 
STATIC_INLINE void main_event (void)
 

Variables

fbw_mode_enum fbw_mode
 
tid_t main_periodic_tid
 id for main_periodic() timer More...
 
tid_t radio_control_tid
 id for radio_control_periodic_task() timer More...
 
tid_t electrical_tid
 id for electrical_periodic() timer More...
 
tid_t telemetry_tid
 id for telemetry_periodic() timer More...
 

Detailed Description

Rotorcraft FBW main loop.

Definition in file main_fbw.c.

Enumeration Type Documentation

Fly by wire modes.

Enumerator
FBW_MODE_MANUAL 
FBW_MODE_AUTO 
FBW_MODE_FAILSAFE 

Definition at line 53 of file main_fbw.c.

Function Documentation

static void autopilot_on_ap_command ( void  )
static

Definition at line 222 of file main_fbw.c.

References fbw_mode, FBW_MODE_MANUAL, intermcu_commands, and SetCommands.

Referenced by main_event().

+ Here is the caller graph for this function:

static void autopilot_on_rc_frame ( void  )
static

Definition at line 194 of file main_fbw.c.

References AP_LOST_FBW_MODE, commands, fbw_mode, FBW_MODE_AUTO, FBW_MODE_MANUAL, inter_mcu, INTERMCU_LOST, intermcu_on_rc_frame(), MIN_PPRZ, radio_control, RADIO_FBW_MODE, intermcu_t::status, and RadioControl::values.

Referenced by main_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_INLINE void handle_periodic_tasks ( void  )

Definition at line 116 of file main_fbw.c.

References baro_periodic(), electrical_periodic(), electrical_tid, failsafe_check(), main_periodic(), main_periodic_tid, radio_control_periodic_task(), radio_control_tid, sys_time_check_and_ack_timer(), telemetry_periodic(), and telemetry_tid.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( void  )

Definition at line 68 of file main_fbw.c.

References handle_periodic_tasks(), main_event(), and main_init().

+ Here is the call graph for this function:

STATIC_INLINE void main_event ( void  )
inline

Definition at line 229 of file main_fbw.c.

References autopilot_on_ap_command(), autopilot_on_rc_frame(), autopilot_rc, BaroEvent, DatalinkEvent, DetectGroundEvent(), GpsEvent, ImuEvent, InsEvent, InterMcuEvent(), mcu_event(), and RadioControlEvent.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_INLINE void telemetry_periodic ( void  )

Definition at line 136 of file main_fbw.c.

References DefaultChannel, DefaultDevice, DefaultPeriodic, FALSE, fbw_mode, intermcu_send_status(), send_autopilot_version(), and TRUE.

Referenced by handle_periodic_tasks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

tid_t electrical_tid

id for electrical_periodic() timer

Definition at line 64 of file main_fbw.c.

fbw_mode_enum fbw_mode

Definition at line 54 of file main_fbw.c.

tid_t main_periodic_tid

id for main_periodic() timer

Definition at line 61 of file main_fbw.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t radio_control_tid

id for radio_control_periodic_task() timer

Definition at line 63 of file main_fbw.c.

Referenced by handle_periodic_tasks(), and main_init().

tid_t telemetry_tid

id for telemetry_periodic() timer

Definition at line 65 of file main_fbw.c.

Referenced by handle_periodic_tasks(), and main_init().