Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
main_fbw.h File Reference
#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 RC_LOST_FBW_MODE   FBW_MODE_AUTO
 mode to enter when RC is lost while using a mode with RC input switching to AUTO allows a recover with HOME mode More...
 
#define RC_LOST_IN_AUTO_FBW_MODE   FBW_MODE_AUTO
 mode to enter when AP is lost while using autopilot More...
 
#define AP_LOST_FBW_MODE   FBW_MODE_FAILSAFE
 mode to enter when AP is lost while using autopilot More...
 
#define FBW_MODE_AUTO_ONLY   false
 holds whether the aircraft can only be flown with the AP and not RC-Direct/FBW-mode More...
 
#define RADIO_FBW_MODE   RADIO_MODE
 Switching between FBW and autopilot is done with RADIO_FBW_MODE: default is to re-use RADIO_MODE. More...
 
#define FBW_MODE_MANUAL   0
 
#define FBW_MODE_AUTO   1
 
#define FBW_MODE_FAILSAFE   2
 

Functions

void main_fbw_init (void)
 Main initialization. More...
 
void main_fbw_event (void)
 
void main_fbw_periodic (void)
 
void main_fbw_parse_EMERGENCY_CMD (uint8_t *buf)
 

Variables

uint8_t fbw_mode
 Fly by wire modes. More...
 
bool fbw_motors_on
 

Detailed Description

Fly By Wire:

Reads radio_control Reads intermcu Sets actuators Run datalink/telemetry

if no rc but autopilot then RC_LOST_FBW_MODE (define below) if no rc while in auto mode then RC_LOST_IN_AUTO_FBW_MODE (define below) if no ap but rc then AP_LOST_FBW_MODE (define below)

Definition in file main_fbw.h.

Macro Definition Documentation

◆ AP_LOST_FBW_MODE

#define AP_LOST_FBW_MODE   FBW_MODE_FAILSAFE

mode to enter when AP is lost while using autopilot

Definition at line 55 of file main_fbw.h.

◆ FBW_MODE_AUTO

#define FBW_MODE_AUTO   1

Definition at line 69 of file main_fbw.h.

◆ FBW_MODE_AUTO_ONLY

#define FBW_MODE_AUTO_ONLY   false

holds whether the aircraft can only be flown with the AP and not RC-Direct/FBW-mode

Definition at line 60 of file main_fbw.h.

◆ FBW_MODE_FAILSAFE

#define FBW_MODE_FAILSAFE   2

Definition at line 70 of file main_fbw.h.

◆ FBW_MODE_MANUAL

#define FBW_MODE_MANUAL   0

Definition at line 68 of file main_fbw.h.

◆ RADIO_FBW_MODE

#define RADIO_FBW_MODE   RADIO_MODE

Switching between FBW and autopilot is done with RADIO_FBW_MODE: default is to re-use RADIO_MODE.

Definition at line 65 of file main_fbw.h.

◆ RC_LOST_FBW_MODE

#define RC_LOST_FBW_MODE   FBW_MODE_AUTO

mode to enter when RC is lost while using a mode with RC input switching to AUTO allows a recover with HOME mode

Definition at line 45 of file main_fbw.h.

◆ RC_LOST_IN_AUTO_FBW_MODE

#define RC_LOST_IN_AUTO_FBW_MODE   FBW_MODE_AUTO

mode to enter when AP is lost while using autopilot

Definition at line 50 of file main_fbw.h.

Function Documentation

◆ main_fbw_event()

void main_fbw_event ( void  )

Definition at line 263 of file main_fbw.c.

References intermcu_event().

+ Here is the call graph for this function:

◆ main_fbw_init()

void main_fbw_init ( void  )

Main initialization.

Definition at line 78 of file main_fbw.c.

References electrical_tid, fbw_mode, FBW_MODE_FAILSAFE, MAIN_FBW_RC_ID, periodic_tid, radio_control_tid, rc_cb(), rc_ev, sys_time_register_timer(), and telemetry_tid.

+ Here is the call graph for this function:

◆ main_fbw_parse_EMERGENCY_CMD()

void main_fbw_parse_EMERGENCY_CMD ( uint8_t buf)

Definition at line 256 of file main_fbw.c.

References fbw_mode, and FBW_MODE_FAILSAFE.

◆ main_fbw_periodic()

void main_fbw_periodic ( void  )

Definition at line 187 of file main_fbw.c.

References electrical_periodic(), electrical_tid, main_task_periodic(), periodic_tid, radio_control_tid, sys_time_check_and_ack_timer(), and telemetry_tid.

+ Here is the call graph for this function:

Variable Documentation

◆ fbw_mode

◆ fbw_motors_on

bool fbw_motors_on

Definition at line 42 of file main_fbw.c.

Referenced by main_task_periodic(), and rc_cb().