Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
main_fbw.h File Reference

FBW ( FlyByWire ) process API. More...

#include "std.h"
+ Include dependency graph for main_fbw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FBW_MODE_MANUAL   0
 Fly by wire modes. More...
 
#define FBW_MODE_AUTO   1
 
#define FBW_MODE_FAILSAFE   2
 
#define FBW_MODE_OF_PPRZ(mode)   ((mode) < THRESHOLD_MANUAL_PPRZ ? FBW_MODE_MANUAL : FBW_MODE_AUTO)
 

Functions

void init_fbw (void)
 
void handle_periodic_tasks_fbw (void)
 
void periodic_task_fbw (void)
 
void event_task_fbw (void)
 

Variables

uint8_t fbw_mode
 
bool_t failsafe_mode
 

Detailed Description

FBW ( FlyByWire ) process API.

Definition in file main_fbw.h.

Macro Definition Documentation

#define FBW_MODE_AUTO   1

Definition at line 35 of file main_fbw.h.

Referenced by event_task_fbw(), and periodic_task_fbw().

#define FBW_MODE_FAILSAFE   2

Definition at line 36 of file main_fbw.h.

Referenced by event_task_fbw(), init_fbw(), and set_failsafe_mode().

#define FBW_MODE_MANUAL   0

Fly by wire modes.

Definition at line 34 of file main_fbw.h.

Referenced by periodic_task_fbw().

#define FBW_MODE_OF_PPRZ (   mode)    ((mode) < THRESHOLD_MANUAL_PPRZ ? FBW_MODE_MANUAL : FBW_MODE_AUTO)

Definition at line 37 of file main_fbw.h.

Function Documentation

void event_task_fbw ( void  )

Definition at line 118 of file main_fbw.c.

References ap_state, command_pitch_trim, command_roll_trim, commands, DatalinkEvent, FALSE, fbw_mode, FBW_MODE_AUTO, FBW_MODE_FAILSAFE, fbw_new_actuators, i2c_event(), inter_mcu_received_ap, link_mcu_event_task(), link_mcu_received, MAX_PPRZ, RadioControlEvent, and SetCommands.

Referenced by sim_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void handle_periodic_tasks_fbw ( void  )

Definition at line 211 of file main_fbw.c.

References electrical_periodic(), electrical_tid, fbw_periodic_tid, periodic_task_fbw(), and sys_time_check_and_ack_timer().

+ Here is the call graph for this function:

void init_fbw ( void  )

Definition at line 63 of file main_fbw.c.

References actuators_init(), commands_failsafe, electrical_init(), electrical_tid, fbw_mode, FBW_MODE_FAILSAFE, fbw_new_actuators, fbw_periodic_tid, mcu_init(), mcu_int_enable, PERIODIC_FREQUENCY, SetCommands, SetServo, and sys_time_register_timer().

Referenced by sim_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void periodic_task_fbw ( void  )

Definition at line 188 of file main_fbw.c.

References actuators, DefaultChannel, DefaultDevice, fbw_downlink_periodic_task(), fbw_mode, FBW_MODE_AUTO, FBW_MODE_MANUAL, radio_control, and set_failsafe_mode().

Referenced by handle_periodic_tasks_fbw(), and sim_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool_t failsafe_mode
uint8_t fbw_mode

Definition at line 52 of file main_fbw.c.

Referenced by event_task_fbw(), init_fbw(), periodic_task_fbw(), and set_failsafe_mode().