Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Fly By Wire: More...
Go to the source code of this file.
Macros | |
#define | RC_LOST_FBW_MODE FBW_MODE_FAILSAFE |
mode to enter when RC is lost while using a mode with RC input 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... | |
Enumerations | |
enum | fbw_mode_enum { FBW_MODE_MANUAL = 0, FBW_MODE_AUTO = 1, FBW_MODE_FAILSAFE = 2 } |
Functions | |
void | main_init (void) |
Main initialization. More... | |
void | main_event (void) |
void | handle_periodic_tasks (void) |
void | main_periodic (void) |
void | telemetry_periodic (void) |
Fly By Wire:
Reads Radiocontrol Reads Intermcu Sets Actuators
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.
#define AP_LOST_FBW_MODE FBW_MODE_FAILSAFE |
mode to enter when AP is lost while using autopilot
Definition at line 51 of file main_fbw.h.
Referenced by fbw_on_rc_frame(), and fbw_safety_check().
#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 56 of file main_fbw.h.
Referenced by fbw_on_rc_frame().
#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 61 of file main_fbw.h.
Referenced by fbw_on_rc_frame().
#define RC_LOST_FBW_MODE FBW_MODE_FAILSAFE |
mode to enter when RC is lost while using a mode with RC input
Definition at line 41 of file main_fbw.h.
Referenced by fbw_safety_check().
#define RC_LOST_IN_AUTO_FBW_MODE FBW_MODE_AUTO |
mode to enter when AP is lost while using autopilot
Definition at line 46 of file main_fbw.h.
Referenced by fbw_safety_check().
enum fbw_mode_enum |
Enumerator | |
---|---|
FBW_MODE_MANUAL | |
FBW_MODE_AUTO | |
FBW_MODE_FAILSAFE |
Definition at line 64 of file main_fbw.h.
void handle_periodic_tasks | ( | void | ) |
Definition at line 200 of file main_ap.c.
References baro_periodic(), electrical_periodic(), electrical_tid, failsafe_check(), main_periodic(), main_periodic_tid, modules_tid, radio_control_periodic_task(), radio_control_tid, sys_time_check_and_ack_timer(), telemetry_periodic(), and telemetry_tid.
|
inline |
Definition at line 329 of file main_ap.c.
References autopilot, autopilot_event(), autopilot_on_rc_frame(), BaroEvent, fbw_on_ap_command(), fbw_on_rc_frame(), InterMcuEvent(), mcu_event(), RadioControlEvent, and pprz_autopilot::use_rc.
|
inline |
Main initialization.
Definition at line 116 of file main_ap.c.
References ahrs_init(), autopilot_generated_init(), autopilot_init(), autopilot_static_init(), baro_init(), BARO_PERIODIC_FREQUENCY, Imu::body_to_imu, downlink_init(), electrical_init(), failsafe_check(), fbw_mode, FBW_MODE_FAILSAFE, imu, intermcu_init(), mcu_init(), mcu_int_enable, motor_mixing_init(), orientationGetQuat_f(), radio_control_init(), settings_init(), stateInit(), sys_time_register_timer(), TELEMETRY_FREQUENCY, and waypoints_localize_all().
|
inline |
Definition at line 235 of file main_ap.c.
References autopilot, autopilot_get_mode(), autopilot_in_flight(), autopilot_motors_on, autopilot_periodic(), commands, commands_failsafe, datalink_time, fbw_mode, FBW_MODE_AUTO, FBW_MODE_FAILSAFE, FBW_MODE_MANUAL, fbw_motors_on, fbw_safety_check(), pprz_autopilot::flight_time, intermcu, intermcu_periodic(), intermcu_set_actuators(), LED_OFF, LED_ON, LED_PERIODIC, LED_TOGGLE, PPRZ_BAUD, and SetCommands.
Referenced by handle_periodic_tasks().
void telemetry_periodic | ( | void | ) |
Definition at line 263 of file main_ap.c.
References autopilot_send_version(), DefaultChannel, DefaultDevice, DefaultPeriodic, fbw_mode, and intermcu_send_status().
Referenced by handle_periodic_tasks().