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

FBW ( FlyByWire ) process. More...

#include "generated/airframe.h"
#include "firmwares/fixedwing/main_fbw.h"
#include "mcu.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/commands.h"
#include "subsystems/actuators.h"
#include "subsystems/electrical.h"
#include "subsystems/radio_control.h"
#include "firmwares/fixedwing/autopilot.h"
#include "paparazzi.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "inter_mcu.h"
#include "link_mcu.h"
+ Include dependency graph for main_fbw.c:

Go to the source code of this file.

Functions

void init_fbw (void)
 
static void set_failsafe_mode (void)
 
static void handle_rc_frame (void)
 
void event_task_fbw (void)
 
void periodic_task_fbw (void)
 
void handle_periodic_tasks_fbw (void)
 

Variables

uint8_t fbw_mode
 
pprz_t command_roll_trim
 Trim commands for roll, pitch and yaw. More...
 
pprz_t command_pitch_trim
 
pprz_t command_yaw_trim
 
volatile uint8_t fbw_new_actuators = 0
 
tid_t fbw_periodic_tid
 id for periodic_task_fbw() timer More...
 
tid_t electrical_tid
 id for electrical_periodic() timer More...
 
uint8_t ap_has_been_ok = FALSE
 

Detailed Description

FBW ( FlyByWire ) process.

This process is responsible for decoding radio control, generating actuators signals either from the radio control or from the commands provided by the AP (autopilot) process. It also performs a telemetry task and a low level monitoring ( for parameters like the supply )

Definition in file main_fbw.c.

Function Documentation

void handle_periodic_tasks_fbw ( void  )

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

static void handle_rc_frame ( void  )
inlinestatic

Definition at line 177 of file main_fbw.c.

References commands, fbw_mode, FBW_MODE_MANUAL, FBW_MODE_OF_PPRZ, fbw_new_actuators, radio_control, RADIO_MODE, and RadioControl::values.

Referenced by event_task_fbw().

+ Here is the caller graph for this function:

void init_fbw ( void  )
void periodic_task_fbw ( void  )
static void set_failsafe_mode ( void  )
inlinestatic

Definition at line 168 of file main_fbw.c.

References commands_failsafe, fbw_mode, FBW_MODE_FAILSAFE, fbw_new_actuators, and SetCommands.

Referenced by event_task_fbw(), and periodic_task_fbw().

+ Here is the caller graph for this function:

Variable Documentation

uint8_t ap_has_been_ok = FALSE

Definition at line 187 of file main_fbw.c.

pprz_t command_pitch_trim

Definition at line 69 of file main_fbw.c.

Referenced by event_task_fbw().

pprz_t command_roll_trim

Trim commands for roll, pitch and yaw.

These are updated from the trim commands in ap_state via inter_mcu

Definition at line 68 of file main_fbw.c.

Referenced by event_task_fbw().

pprz_t command_yaw_trim

Definition at line 70 of file main_fbw.c.

Referenced by event_task_fbw().

tid_t electrical_tid

id for electrical_periodic() timer

Definition at line 76 of file main_fbw.c.

Referenced by handle_periodic_tasks(), handle_periodic_tasks_fbw(), init_fbw(), and main_init().

volatile uint8_t fbw_new_actuators = 0

Definition at line 73 of file main_fbw.c.

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

tid_t fbw_periodic_tid

id for periodic_task_fbw() timer

Definition at line 75 of file main_fbw.c.

Referenced by handle_periodic_tasks_fbw(), and init_fbw().