Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
rc_datalink.h File Reference
#include "std.h"
+ Include dependency graph for rc_datalink.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RC_DL_NB_CHANNEL   5
 
#define RADIO_ROLL   0
 Redefining RADIO_* Do not use with radio.h (ppm rc) More...
 
#define RADIO_PITCH   1
 
#define RADIO_YAW   2
 
#define RADIO_THROTTLE   3
 
#define RADIO_MODE   4
 

Functions

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...
 
void rc_datalink_parse_RC_3CH (uint8_t *buf)
 
void rc_datalink_parse_RC_4CH (uint8_t *buf)
 
void rc_datalink_init (void)
 RC init function. 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.h.

Macro Definition Documentation

◆ RADIO_MODE

#define RADIO_MODE   4

Definition at line 42 of file rc_datalink.h.

◆ RADIO_PITCH

#define RADIO_PITCH   1

Definition at line 39 of file rc_datalink.h.

◆ RADIO_ROLL

#define RADIO_ROLL   0

Redefining RADIO_* Do not use with radio.h (ppm rc)

Definition at line 38 of file rc_datalink.h.

◆ RADIO_THROTTLE

#define RADIO_THROTTLE   3

Definition at line 41 of file rc_datalink.h.

◆ RADIO_YAW

#define RADIO_YAW   2

Definition at line 40 of file rc_datalink.h.

◆ RC_DL_NB_CHANNEL

#define RC_DL_NB_CHANNEL   5

Definition at line 32 of file rc_datalink.h.

Function Documentation

◆ parse_rc_3ch_datalink()

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 65 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 rc_datalink_parse_RC_3CH().

+ Here is the caller graph for this function:

◆ parse_rc_4ch_datalink()

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 81 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 mavlink_common_message_handler(), and rc_datalink_parse_RC_4CH().

+ 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_parse_RC_3CH()

void rc_datalink_parse_RC_3CH ( uint8_t buf)

Definition at line 42 of file rc_datalink.c.

References LED_TOGGLE, and parse_rc_3ch_datalink().

+ Here is the call graph for this function:

◆ rc_datalink_parse_RC_4CH()

void rc_datalink_parse_RC_4CH ( uint8_t buf)

Definition at line 53 of file rc_datalink.c.

References LED_TOGGLE, and parse_rc_4ch_datalink().

+ Here is the call graph for this function:

Variable Documentation

◆ rc_dl_frame_available

volatile bool rc_dl_frame_available

◆ 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_3ch_datalink(), parse_rc_4ch_datalink(), and rc_datalink_event().