Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Generic interface for radio control modules. More...
Go to the source code of this file.
Data Structures | |
struct | RadioControl |
Macros | |
#define | RC_AVG_PERIOD 8 /* TODO remove if IIR filter is used */ |
#define | RC_LOST_TIME 30 /* 500ms with a 60Hz timer */ |
#define | RC_REALLY_LOST_TIME 60 /* ~1s */ |
#define | RC_OK_CPT 15 |
#define | RC_OK 0 |
#define | RC_LOST 1 |
#define | RC_REALLY_LOST 2 |
#define | RADIO_CONTROL_NB_CHANNEL 32 |
#define | RadioControlValues(_chan) radio_control.values[_chan] |
#define | RadioControlIsLost() (radio_control.status == RC_REALLY_LOST) |
Functions | |
static void | radio_control_set (uint8_t idx, pprz_t value) |
Set a radio control channel value. More... | |
static pprz_t | radio_control_get (uint8_t idx) |
Get a radio control channel value. More... | |
void | radio_control_init (void) |
void | radio_control_periodic_task (void) |
Variables | |
struct RadioControl | radio_control |
Generic interface for radio control modules.
Definition in file radio_control.h.
struct RadioControl |
Definition at line 60 of file radio_control.h.
Data Fields | ||
---|---|---|
uint8_t | frame_cpt | |
uint8_t | frame_rate | |
uint8_t | nb_channel | |
uint8_t | radio_ok_cpt | |
uint8_t | status | |
uint8_t | time_since_last_frame | |
pprz_t | values[RADIO_CONTROL_NB_CHANNEL] |
#define RADIO_CONTROL_NB_CHANNEL 32 |
Definition at line 56 of file radio_control.h.
#define RadioControlIsLost | ( | ) | (radio_control.status == RC_REALLY_LOST) |
Definition at line 76 of file radio_control.h.
#define RadioControlValues | ( | _chan | ) | radio_control.values[_chan] |
Definition at line 73 of file radio_control.h.
#define RC_AVG_PERIOD 8 /* TODO remove if IIR filter is used */ |
Definition at line 36 of file radio_control.h.
#define RC_LOST 1 |
Definition at line 50 of file radio_control.h.
#define RC_LOST_TIME 30 /* 500ms with a 60Hz timer */ |
Definition at line 39 of file radio_control.h.
#define RC_OK 0 |
Definition at line 49 of file radio_control.h.
#define RC_OK_CPT 15 |
Definition at line 46 of file radio_control.h.
#define RC_REALLY_LOST 2 |
Definition at line 51 of file radio_control.h.
#define RC_REALLY_LOST_TIME 60 /* ~1s */ |
Definition at line 42 of file radio_control.h.
Get a radio control channel value.
idx | rc channel index |
Definition at line 94 of file radio_control.h.
References idx, RadioControl::nb_channel, radio_control, and RadioControl::values.
Referenced by autopilot_failsafe_checks(), autopilot_generated_on_rc_frame(), autopilot_static_on_rc_frame(), dc_shoot_rc_periodic(), oneloop_andi_RM(), periodic_auto1_commands(), periodic_gas_engine_idle_trim(), pprz_mode_update(), stabilization_direct_read_rc(), and vPoint().
void radio_control_init | ( | void | ) |
Definition at line 44 of file radio_control.c.
References DefaultPeriodic, RadioControl::frame_cpt, RadioControl::frame_rate, RadioControl::nb_channel, radio_control, RADIO_CONTROL_NB_CHANNEL, RadioControl::radio_ok_cpt, RC_REALLY_LOST, RC_REALLY_LOST_TIME, register_periodic_telemetry(), send_rc(), RadioControl::status, RadioControl::time_since_last_frame, and RadioControl::values.
void radio_control_periodic_task | ( | void | ) |
Definition at line 62 of file radio_control.c.
References RadioControl::frame_cpt, RadioControl::frame_rate, LED_OFF, LED_ON, radio_control, RadioControl::radio_ok_cpt, RC_LOST, RC_LOST_TIME, RC_OK, RC_OK_CPT, RC_REALLY_LOST, RC_REALLY_LOST_TIME, RadioControl::status, and RadioControl::time_since_last_frame.
Set a radio control channel value.
idx | rc channel index |
value | new value |
Definition at line 82 of file radio_control.h.
References idx, RadioControl::nb_channel, radio_control, and RadioControl::values.
|
extern |
Definition at line 1 of file radio_control.c.
Referenced by ap_mode_of_3way_switch(), autopilot_failsafe_checks(), autopilot_generated_on_rc_frame(), autopilot_static_on_rc_frame(), autopilot_static_SetModeHandler(), eff_scheduling_cyfoam_periodic(), eff_scheduling_rotwing_update_hover_motor_effectiveness(), fbw_safety_check(), glide_wing_lock_event(), guidance_h_run(), guidance_module_enter(), guidance_module_run(), hott_event(), hott_init(), intermcu_send_status(), main_recovery_periodic(), oneloop_andi_run(), percent_from_rc(), ppm_event(), ppm_init(), px4_set_gimbal_angle_periodic(), radio_control_cc2500_event(), radio_control_cc2500_init(), radio_control_feed(), radio_control_get(), radio_control_init(), radio_control_periodic_task(), radio_control_set(), rc_cb(), rc_datalink_event(), rc_datalink_init(), rc_intermcu_init(), rc_intermcu_parse_fbw_status(), rc_intermcu_parse_msg(), rc_mode_switch(), sbus_dual_event(), sbus_dual_init(), sbus_event(), sbus_init(), schdule_control_effectiveness(), send_cc2500_ppm(), send_fbw_status(), send_hott(), send_mode(), send_ppm(), send_rc(), send_rotorcraft_rc(), send_sbus(), send_status(), send_tune_hover(), spektrum_event(), spektrum_init(), superbitrf_rc_event(), superbitrf_rc_init(), sys_id_chirp_activate_handler(), sys_id_chirp_run(), sys_id_doublet_activate_handler(), sys_id_doublet_run(), and throttle_curve_run().