Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rc_datalink.h File Reference

Radio control input via datalink. More...

#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_CONTROL_NB_CHANNEL   RC_DL_NB_CHANNEL
 
#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
 
#define RadioControlEvent(_received_frame_handler)   radio_control_impl_event(_received_frame_handler)
 Event macro with handler callback. More...
 

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 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
 

Detailed Description

Radio control input via datalink.

Definition in file rc_datalink.h.

Macro Definition Documentation

#define RADIO_CONTROL_NB_CHANNEL   RC_DL_NB_CHANNEL

Definition at line 33 of file rc_datalink.h.

#define RADIO_MODE   4

Definition at line 43 of file rc_datalink.h.

#define RADIO_PITCH   1

Definition at line 40 of file rc_datalink.h.

#define RADIO_ROLL   0

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

Definition at line 39 of file rc_datalink.h.

#define RADIO_THROTTLE   3

Definition at line 42 of file rc_datalink.h.

#define RADIO_YAW   2

Definition at line 41 of file rc_datalink.h.

#define RadioControlEvent (   _received_frame_handler)    radio_control_impl_event(_received_frame_handler)

Event macro with handler callback.

Definition at line 75 of file rc_datalink.h.

#define RC_DL_NB_CHANNEL   5

Definition at line 32 of file rc_datalink.h.

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 66 of file hott.c.

Variable Documentation

volatile bool rc_dl_frame_available