29 #define MODULES_DATALINK_C
34 #include "generated/modules.h"
35 #include "generated/settings.h"
37 #include "pprzlink/messages.h"
39 #if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_DATALINK
47 #ifdef RADIO_CONTROL_DATALINK_LED
52 bool datalink_enabled =
true;
76 if (DL_SETTING_ac_id(
dl_buffer) != AC_ID) {
break; }
84 case DL_GET_SETTING : {
85 if (DL_GET_SETTING_ac_id(
dl_buffer) != AC_ID) {
break; }
87 float val = settings_get_value(i);
92 #ifdef RADIO_CONTROL_TYPE_DATALINK
94 #ifdef RADIO_CONTROL_DATALINK_LED
103 if (DL_RC_4CH_ac_id(
dl_buffer) == AC_ID) {
104 #ifdef RADIO_CONTROL_DATALINK_LED
114 #endif // RADIO_CONTROL_TYPE_DATALINK
117 case DL_GPS_INJECT : {
119 if (DL_GPS_INJECT_ac_id(
dl_buffer) != AC_ID) {
break; }
139 modules_parse_datalink(msg_id);
Handling of messages coming from ground and other A/Cs.
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 ...
Device independent GPS code (interface)
#define DefaultChannel
SITL.
#define SenderIdOfPprzMsg(x)
Common code for AP and FBW telemetry.
uint8_t dl_buffer[MSG_SIZE]
arch independent LED (Light Emitting Diodes) API
void gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
Override the default GPS packet injector to inject the data trough UART.
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.
WEAK void firmware_parse_msg(void)
Firmware specfic msg handler.
void dl_parse_msg(void)
Should be called when chars are available in dl_buffer.