Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rc_datalink.c File Reference

Radio control input via datalink. More...

#include "modules/radio_control/rc_datalink.h"
#include "modules/radio_control/radio_control.h"
#include "modules/core/abi.h"
#include "pprzlink/dl_protocol.h"
+ Include dependency graph for rc_datalink.c:

Go to the source code of this file.

Functions

void rc_datalink_init (void)
 RC init function. More...
 
void rc_datalink_parse_RC_UP (uint8_t *buf)
 
void parse_rc_up_datalink (int8_t n, int8_t *channels)
 Decode datalink message to get rc values with RC_UP message. More...
 
static void rc_datalink_normalize (int8_t *in, int16_t *out)
 Normalize rc_dl_values to radio values. More...
 
void rc_datalink_event (void)
 RC event function. More...
 

Variables

int8_t rc_dl_values [RC_DL_NB_CHANNEL]
 
volatile bool rc_dl_frame_available
 

Detailed Description

Radio control input via datalink.

Definition in file rc_datalink.c.

Function Documentation

◆ parse_rc_up_datalink()

void parse_rc_up_datalink ( int8_t  n,
int8_t channels 
)

Decode datalink message to get rc values with RC_UP message.

Definition at line 51 of file rc_datalink.c.

References rc_dl_frame_available, and rc_dl_values.

Referenced by mavlink_common_message_handler(), and rc_datalink_parse_RC_UP().

+ Here is the caller graph for this function:

◆ rc_datalink_event()

void rc_datalink_event ( void  )

◆ rc_datalink_init()

void rc_datalink_init ( void  )

RC init function.

Definition at line 36 of file rc_datalink.c.

References RadioControl::nb_channel, radio_control, rc_dl_frame_available, and RC_DL_NB_CHANNEL.

◆ rc_datalink_normalize()

static void rc_datalink_normalize ( int8_t in,
int16_t out 
)
static

Normalize rc_dl_values to radio values.

Definition at line 64 of file rc_datalink.c.

References MAX_PPRZ, MIN_PPRZ, RADIO_THROTTLE, and RC_DL_NB_CHANNEL.

Referenced by rc_datalink_event().

+ Here is the caller graph for this function:

◆ rc_datalink_parse_RC_UP()

void rc_datalink_parse_RC_UP ( uint8_t buf)

Definition at line 42 of file rc_datalink.c.

References LED_TOGGLE, and parse_rc_up_datalink().

+ Here is the call graph for this function:

Variable Documentation

◆ rc_dl_frame_available

volatile bool rc_dl_frame_available

Definition at line 33 of file rc_datalink.c.

Referenced by parse_rc_up_datalink(), rc_datalink_event(), and rc_datalink_init().

◆ rc_dl_values

int8_t rc_dl_values[RC_DL_NB_CHANNEL]

Definition at line 32 of file rc_datalink.c.

Referenced by parse_rc_up_datalink(), and rc_datalink_event().