Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rc_datalink.c File Reference
+ Include dependency graph for rc_datalink.c:

Go to the source code of this file.

Functions

void radio_control_impl_init (void)
 
void parse_rc_3ch_datalink (uint8_t throttle_mode, int8_t roll, int8_t pitch)
 Decode datalink message to get rc values with RC_3CH message Mode and throttle are merge in the same byte. More...
 
void parse_rc_4ch_datalink (uint8_t mode, uint8_t throttle, int8_t roll, int8_t pitch, int8_t yaw)
 Decode datalink message to get rc values with RC_4CH message. More...
 
static void rc_datalink_normalize (int8_t *in, int16_t *out)
 Normalize rc_dl_values to radio values. More...
 
void radio_control_impl_event (void(*_received_frame_handler)(void))
 RC event function with handler callback. More...
 

Variables

int8_t rc_dl_values [RC_DL_NB_CHANNEL]
 
volatile bool rc_dl_frame_available
 

Function Documentation

void parse_rc_3ch_datalink ( uint8_t  throttle_mode,
int8_t  roll,
int8_t  pitch 
)

Decode datalink message to get rc values with RC_3CH message Mode and throttle are merge in the same byte.

Definition at line 40 of file rc_datalink.c.

References mode, RADIO_MODE, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, rc_dl_frame_available, and rc_dl_values.

Referenced by dl_parse_msg().

+ Here is the caller graph for this function:

void parse_rc_4ch_datalink ( uint8_t  mode,
uint8_t  throttle,
int8_t  roll,
int8_t  pitch,
int8_t  yaw 
)

Decode datalink message to get rc values with RC_4CH message.

Definition at line 56 of file rc_datalink.c.

References RADIO_MODE, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, rc_dl_frame_available, and rc_dl_values.

Referenced by dl_parse_msg(), and mavlink_common_message_handler().

+ Here is the caller graph for this function:

void radio_control_impl_event ( void(*)(void)  _received_frame_handler)

RC event function with handler callback.

PPM frames are normalized using the IIR filter.

Definition at line 89 of file rc_datalink.c.

References RadioControl::frame_cpt, radio_control, RadioControl::radio_ok_cpt, rc_datalink_normalize(), rc_dl_frame_available, rc_dl_values, RC_OK, RadioControl::status, RadioControl::time_since_last_frame, and RadioControl::values.

+ Here is the call graph for this function:

void radio_control_impl_init ( void  )

Definition at line 34 of file rc_datalink.c.

References rc_dl_frame_available.

static void rc_datalink_normalize ( int8_t in,
int16_t out 
)
static

Normalize rc_dl_values to radio values.

Definition at line 75 of file rc_datalink.c.

References MAX_PPRZ, MIN_PPRZ, RADIO_MODE, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, and RADIO_YAW.

Referenced by radio_control_impl_event().

+ Here is the caller graph for this function:

Variable Documentation

volatile bool rc_dl_frame_available