Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
#include "led.h"
#include "generated/airframe.h"
#include "paparazzi.h"
#include <RADIO_CONTROL_TYPE_H>
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 | RCValue(_x) radio_control.values[_x] |
#define | RadioControlValues(_chan) radio_control.values[_chan] |
For easy access in command_laws. More... | |
Functions | |
void | radio_control_impl_init (void) |
Main Radio initialization. More... | |
void | radio_control_init (void) |
void | radio_control_periodic_task (void) |
Variables | |
struct RadioControl | radio_control |
struct RadioControl |
Definition at line 63 of file radio_control.h.
Data Fields | ||
---|---|---|
uint8_t | frame_cpt | |
uint8_t | frame_rate | |
uint8_t | radio_ok_cpt | |
uint8_t | status | |
uint8_t | time_since_last_frame | |
pprz_t | values[RADIO_CONTROL_NB_CHANNEL] |
#define RadioControlValues | ( | _chan | ) | radio_control.values[_chan] |
For easy access in command_laws.
Definition at line 74 of file radio_control.h.
#define RC_AVG_PERIOD 8 /* TODO remove if IIR filter is used */ |
Definition at line 43 of file radio_control.h.
#define RC_LOST 1 |
Definition at line 57 of file radio_control.h.
Referenced by radio_control_periodic_task().
#define RC_LOST_TIME 30 /* 500ms with a 60Hz timer */ |
Definition at line 46 of file radio_control.h.
Referenced by radio_control_periodic_task().
#define RC_OK 0 |
Definition at line 56 of file radio_control.h.
Referenced by autopilot_static_SetModeHandler(), failsafe_check(), guidance_h_read_rc(), guidance_v_from_nav(), guidance_v_guided_run(), guidance_v_run(), intermcu_parse_msg(), radio_control_impl_event(), radio_control_periodic_task(), rc_mode_switch(), and spektrum_event().
#define RC_OK_CPT 15 |
Definition at line 53 of file radio_control.h.
Referenced by radio_control_periodic_task().
#define RC_REALLY_LOST 2 |
Definition at line 58 of file radio_control.h.
Referenced by failsafe_check(), fbw_safety_check(), radio_control_impl_event(), radio_control_init(), radio_control_periodic_handle(), and radio_control_periodic_task().
#define RC_REALLY_LOST_TIME 60 /* ~1s */ |
Definition at line 49 of file radio_control.h.
Referenced by radio_control_init(), and radio_control_periodic_task().
#define RCValue | ( | _x | ) | radio_control.values[_x] |
Definition at line 61 of file radio_control.h.
void radio_control_impl_init | ( | void | ) |
Main Radio initialization.
Main Radio initialization.
Definition at line 42 of file spektrum_arch.c.
References DefaultPeriodic, gpio_setup_output(), hott, hott_common_init(), ppm_arch_init(), ppm_cur_pulse, ppm_data_valid, ppm_frame_available, ppm_last_pulse_time, RADIO_CONTROL_NB_CHANNEL, RC2_POLARITY_GPIO_PIN, RC2_POLARITY_GPIO_PORT, rc_dl_frame_available, RC_POLARITY_GPIO_PIN, RC_POLARITY_GPIO_PORT, RC_SET_POLARITY, register_periodic_telemetry(), spektrum_t::satellites, sbus, sbus2, sbus_common_init(), send_hott(), send_ppm(), send_sbus(), spektrum_t::signs, spektrum_available, spektrum_init_sat(), and superbitrf_init().
Referenced by radio_control_init().
void radio_control_init | ( | void | ) |
Definition at line 32 of file radio_control.c.
References RadioControl::frame_cpt, RadioControl::frame_rate, radio_control, radio_control_impl_init(), RADIO_CONTROL_NB_CHANNEL, RadioControl::radio_ok_cpt, RC_REALLY_LOST, RC_REALLY_LOST_TIME, RadioControl::status, RadioControl::time_since_last_frame, and RadioControl::values.
Referenced by init_fbw(), and main_init().
void radio_control_periodic_task | ( | void | ) |
Definition at line 46 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.
Referenced by handle_periodic_tasks(), and radio_control_periodic_handle().
struct RadioControl radio_control |
Definition at line 30 of file radio_control.c.
Referenced by ap_mode_of_3way_switch(), autopilot_static_on_rc_frame(), autopilot_static_SetModeHandler(), failsafe_check(), fbw_on_rc_frame(), fbw_safety_check(), get_rc_pitch(), get_rc_pitch_f(), get_rc_roll(), get_rc_roll_f(), get_rc_yaw(), get_rc_yaw_f(), glide_wing_lock_event(), guidance_h_module_read_rc(), guidance_h_read_rc(), guidance_indi_run(), guidance_v_from_nav(), guidance_v_guided_run(), guidance_v_read_rc(), guidance_v_run(), handle_rc_frame(), intermcu_on_rc_frame(), intermcu_parse_msg(), intermcu_send_status(), percent_from_rc(), px4_set_gimbal_angle_periodic(), radio_control_impl_event(), radio_control_init(), radio_control_periodic_handle(), radio_control_periodic_task(), rc_mode_switch(), read_rc_setpoint_speed_i(), send_fbw_status(), send_hott(), send_ppm(), send_rc(), send_rotorcraft_rc(), send_sbus(), send_status(), send_tune_hover(), spektrum_event(), stabilization_indi_calc_cmd(), stabilization_none_read_rc(), stabilization_rate_read_rc(), stabilization_rate_read_rc_switched_sticks(), throttle_curve_run(), and update_rc_channel().