Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Recovery mode: run manual mode in case of hardfault Based on legacy FBW. More...
#include "firmwares/fixedwing/main_recovery.h"
#include "generated/airframe.h"
#include "generated/modules.h"
#include "modules/core/abi.h"
#include "modules/radio_control/radio_control.h"
#include "modules/core/commands.h"
#include "modules/energy/electrical.h"
#include "autopilot_utils.h"
#include "modules/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | RECOVERY_RC_ID ABI_BROADCAST |
#define | RECOVERY_MODE_OF_PPRZ(mode) ((mode) < THRESHOLD_MANUAL_PPRZ ? RECOVERY_MODE_MANUAL : RECOVERY_MODE_FAILSAFE) |
Functions | |
static void | rc_cb (uint8_t sender_id, struct RadioControl *rc) |
static void | send_fbw_status (struct transport_tx *trans, struct link_device *dev) |
void | main_recovery_init (void) |
void | main_recovery_event (void) |
void | main_recovery_periodic (void) |
Variables | |
uint8_t | recovery_mode |
tid_t | periodic_tid |
id for periodic task timer More... | |
tid_t | electrical_tid |
id for electrical_periodic() timer More... | |
tid_t | telemetry_tid |
id for periodic telemetry More... | |
static abi_event | rc_ev |
Recovery mode: run manual mode in case of hardfault Based on legacy FBW.
Definition in file main_recovery.c.
#define RECOVERY_MODE_OF_PPRZ | ( | mode | ) | ((mode) < THRESHOLD_MANUAL_PPRZ ? RECOVERY_MODE_MANUAL : RECOVERY_MODE_FAILSAFE) |
Definition at line 56 of file main_recovery.c.
#define RECOVERY_RC_ID ABI_BROADCAST |
Definition at line 51 of file main_recovery.c.
void main_recovery_event | ( | void | ) |
Definition at line 126 of file main_recovery.c.
void main_recovery_init | ( | void | ) |
Definition at line 89 of file main_recovery.c.
References AP_MODE_MANUAL, autopilot, commands_init(), DefaultPeriodic, electrical_init(), electrical_tid, pprz_autopilot::mode, periodic_tid, rc_cb(), rc_ev, recovery_mode, RECOVERY_MODE_FAILSAFE, RECOVERY_RC_ID, register_periodic_telemetry(), send_fbw_status(), sys_time_register_timer(), and telemetry_tid.
Referenced by main().
void main_recovery_periodic | ( | void | ) |
Definition at line 136 of file main_recovery.c.
References commands_failsafe, DefaultChannel, DefaultDevice, DefaultPeriodic, electrical_periodic(), electrical_tid, periodic_tid, radio_control, RC_REALLY_LOST, recovery_mode, RECOVERY_MODE_FAILSAFE, RadioControl::status, sys_time_check_and_ack_timer(), and telemetry_tid.
|
static |
Definition at line 58 of file main_recovery.c.
References commands, RADIO_MODE, RC_OK, recovery_mode, RECOVERY_MODE_MANUAL, RECOVERY_MODE_OF_PPRZ, RadioControl::status, and RadioControl::values.
Referenced by main_recovery_init().
|
static |
Definition at line 72 of file main_recovery.c.
References Electrical::current, dev, electrical, RadioControl::frame_rate, radio_control, recovery_mode, RadioControl::status, and Electrical::vsupply.
Referenced by main_recovery_init().
tid_t electrical_tid |
id for electrical_periodic() timer
Definition at line 45 of file main_recovery.c.
Referenced by main_recovery_init(), and main_recovery_periodic().
tid_t periodic_tid |
id for periodic task timer
Definition at line 44 of file main_recovery.c.
Referenced by main_recovery_init(), and main_recovery_periodic().
|
static |
Definition at line 54 of file main_recovery.c.
Referenced by main_recovery_init().
uint8_t recovery_mode |
Definition at line 42 of file main_recovery.c.
Referenced by main_recovery_init(), main_recovery_periodic(), rc_cb(), and send_fbw_status().
tid_t telemetry_tid |
id for periodic telemetry
Definition at line 47 of file main_recovery.c.
Referenced by main_recovery_init(), and main_recovery_periodic().