GCS_MAVLink: merge in changes from upstream mavlink repo

This commit is contained in:
Andrew Tridgell 2013-07-14 16:02:29 +10:00
parent b1202ccbff
commit d9f13b6b8c
124 changed files with 7195 additions and 1579 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_ahrs_t
#define MAVLINK_MSG_ID_AHRS_LEN 28
#define MAVLINK_MSG_ID_163_LEN 28
#define MAVLINK_MSG_ID_AHRS_CRC 127
#define MAVLINK_MSG_ID_163_CRC 127
#define MAVLINK_MESSAGE_INFO_AHRS { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
float omegaIx, float omegaIy, float omegaIz, float accel_weight, float renorm_val, float error_rp, float error_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_AHRS_LEN];
_mav_put_float(buf, 0, omegaIx);
_mav_put_float(buf, 4, omegaIy);
_mav_put_float(buf, 8, omegaIz);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
_mav_put_float(buf, 20, error_rp);
_mav_put_float(buf, 24, error_yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS_LEN);
#else
mavlink_ahrs_t packet;
packet.omegaIx = omegaIx;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
packet.error_rp = error_rp;
packet.error_yaw = error_yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AHRS;
return mavlink_finalize_message(msg, system_id, component_id, 28, 127);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
float omegaIx,float omegaIy,float omegaIz,float accel_weight,float renorm_val,float error_rp,float error_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_AHRS_LEN];
_mav_put_float(buf, 0, omegaIx);
_mav_put_float(buf, 4, omegaIy);
_mav_put_float(buf, 8, omegaIz);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
_mav_put_float(buf, 20, error_rp);
_mav_put_float(buf, 24, error_yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS_LEN);
#else
mavlink_ahrs_t packet;
packet.omegaIx = omegaIx;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
packet.error_rp = error_rp;
packet.error_yaw = error_yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AHRS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 127);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AHRS_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_ahrs_encode(uint8_t system_id, uint8_t compon
static inline void mavlink_msg_ahrs_send(mavlink_channel_t chan, float omegaIx, float omegaIy, float omegaIz, float accel_weight, float renorm_val, float error_rp, float error_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_AHRS_LEN];
_mav_put_float(buf, 0, omegaIx);
_mav_put_float(buf, 4, omegaIy);
_mav_put_float(buf, 8, omegaIz);
@ -164,7 +175,11 @@ static inline void mavlink_msg_ahrs_send(mavlink_channel_t chan, float omegaIx,
_mav_put_float(buf, 20, error_rp);
_mav_put_float(buf, 24, error_yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, buf, 28, 127);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, buf, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, buf, MAVLINK_MSG_ID_AHRS_LEN);
#endif
#else
mavlink_ahrs_t packet;
packet.omegaIx = omegaIx;
@ -175,7 +190,11 @@ static inline void mavlink_msg_ahrs_send(mavlink_channel_t chan, float omegaIx,
packet.error_rp = error_rp;
packet.error_yaw = error_yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, (const char *)&packet, 28, 127);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, (const char *)&packet, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS, (const char *)&packet, MAVLINK_MSG_ID_AHRS_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_ahrs_decode(const mavlink_message_t* msg, mavlink
ahrs->error_rp = mavlink_msg_ahrs_get_error_rp(msg);
ahrs->error_yaw = mavlink_msg_ahrs_get_error_yaw(msg);
#else
memcpy(ahrs, _MAV_PAYLOAD(msg), 28);
memcpy(ahrs, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AHRS_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_ap_adc_t
#define MAVLINK_MSG_ID_AP_ADC_LEN 12
#define MAVLINK_MSG_ID_153_LEN 12
#define MAVLINK_MSG_ID_AP_ADC_CRC 188
#define MAVLINK_MSG_ID_153_CRC 188
#define MAVLINK_MESSAGE_INFO_AP_ADC { \
@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_AP_ADC_LEN];
_mav_put_uint16_t(buf, 0, adc1);
_mav_put_uint16_t(buf, 2, adc2);
_mav_put_uint16_t(buf, 4, adc3);
@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
_mav_put_uint16_t(buf, 8, adc5);
_mav_put_uint16_t(buf, 10, adc6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AP_ADC_LEN);
#else
mavlink_ap_adc_t packet;
packet.adc1 = adc1;
@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
packet.adc5 = adc5;
packet.adc6 = adc6;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AP_ADC;
return mavlink_finalize_message(msg, system_id, component_id, 12, 188);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
}
/**
@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
uint16_t adc1,uint16_t adc2,uint16_t adc3,uint16_t adc4,uint16_t adc5,uint16_t adc6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_AP_ADC_LEN];
_mav_put_uint16_t(buf, 0, adc1);
_mav_put_uint16_t(buf, 2, adc2);
_mav_put_uint16_t(buf, 4, adc3);
@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
_mav_put_uint16_t(buf, 8, adc5);
_mav_put_uint16_t(buf, 10, adc6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AP_ADC_LEN);
#else
mavlink_ap_adc_t packet;
packet.adc1 = adc1;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
packet.adc5 = adc5;
packet.adc6 = adc6;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AP_ADC;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 188);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
}
/**
@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_ap_adc_encode(uint8_t system_id, uint8_t comp
static inline void mavlink_msg_ap_adc_send(mavlink_channel_t chan, uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_AP_ADC_LEN];
_mav_put_uint16_t(buf, 0, adc1);
_mav_put_uint16_t(buf, 2, adc2);
_mav_put_uint16_t(buf, 4, adc3);
@ -154,7 +165,11 @@ static inline void mavlink_msg_ap_adc_send(mavlink_channel_t chan, uint16_t adc1
_mav_put_uint16_t(buf, 8, adc5);
_mav_put_uint16_t(buf, 10, adc6);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, buf, 12, 188);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, buf, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, buf, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
#else
mavlink_ap_adc_t packet;
packet.adc1 = adc1;
@ -164,7 +179,11 @@ static inline void mavlink_msg_ap_adc_send(mavlink_channel_t chan, uint16_t adc1
packet.adc5 = adc5;
packet.adc6 = adc6;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, (const char *)&packet, 12, 188);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, (const char *)&packet, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AP_ADC, (const char *)&packet, MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
#endif
}
@ -249,6 +268,6 @@ static inline void mavlink_msg_ap_adc_decode(const mavlink_message_t* msg, mavli
ap_adc->adc5 = mavlink_msg_ap_adc_get_adc5(msg);
ap_adc->adc6 = mavlink_msg_ap_adc_get_adc6(msg);
#else
memcpy(ap_adc, _MAV_PAYLOAD(msg), 12);
memcpy(ap_adc, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AP_ADC_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_data16_t
#define MAVLINK_MSG_ID_DATA16_LEN 18
#define MAVLINK_MSG_ID_169_LEN 18
#define MAVLINK_MSG_ID_DATA16_CRC 234
#define MAVLINK_MSG_ID_169_CRC 234
#define MAVLINK_MSG_DATA16_FIELD_DATA_LEN 16
#define MAVLINK_MESSAGE_INFO_DATA16 { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data16_pack(uint8_t system_id, uint8_t compon
uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_DATA16_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA16_LEN);
#else
mavlink_data16_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA16_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA16;
return mavlink_finalize_message(msg, system_id, component_id, 18, 234);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA16_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data16_pack_chan(uint8_t system_id, uint8_t c
uint8_t type,uint8_t len,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_DATA16_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA16_LEN);
#else
mavlink_data16_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA16_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA16;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 234);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA16_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data16_encode(uint8_t system_id, uint8_t comp
static inline void mavlink_msg_data16_send(mavlink_channel_t chan, uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_DATA16_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, buf, 18, 234);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, buf, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, buf, MAVLINK_MSG_ID_DATA16_LEN);
#endif
#else
mavlink_data16_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, (const char *)&packet, 18, 234);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, (const char *)&packet, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA16, (const char *)&packet, MAVLINK_MSG_ID_DATA16_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_data16_decode(const mavlink_message_t* msg, mavli
data16->len = mavlink_msg_data16_get_len(msg);
mavlink_msg_data16_get_data(msg, data16->data);
#else
memcpy(data16, _MAV_PAYLOAD(msg), 18);
memcpy(data16, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DATA16_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_data32_t
#define MAVLINK_MSG_ID_DATA32_LEN 34
#define MAVLINK_MSG_ID_170_LEN 34
#define MAVLINK_MSG_ID_DATA32_CRC 73
#define MAVLINK_MSG_ID_170_CRC 73
#define MAVLINK_MSG_DATA32_FIELD_DATA_LEN 32
#define MAVLINK_MESSAGE_INFO_DATA32 { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data32_pack(uint8_t system_id, uint8_t compon
uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[34];
char buf[MAVLINK_MSG_ID_DATA32_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 34);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA32_LEN);
#else
mavlink_data32_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 34);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA32_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA32;
return mavlink_finalize_message(msg, system_id, component_id, 34, 73);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA32_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data32_pack_chan(uint8_t system_id, uint8_t c
uint8_t type,uint8_t len,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[34];
char buf[MAVLINK_MSG_ID_DATA32_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 34);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA32_LEN);
#else
mavlink_data32_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 34);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA32_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA32;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 34, 73);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA32_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data32_encode(uint8_t system_id, uint8_t comp
static inline void mavlink_msg_data32_send(mavlink_channel_t chan, uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[34];
char buf[MAVLINK_MSG_ID_DATA32_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, buf, 34, 73);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, buf, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, buf, MAVLINK_MSG_ID_DATA32_LEN);
#endif
#else
mavlink_data32_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, (const char *)&packet, 34, 73);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, (const char *)&packet, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA32, (const char *)&packet, MAVLINK_MSG_ID_DATA32_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_data32_decode(const mavlink_message_t* msg, mavli
data32->len = mavlink_msg_data32_get_len(msg);
mavlink_msg_data32_get_data(msg, data32->data);
#else
memcpy(data32, _MAV_PAYLOAD(msg), 34);
memcpy(data32, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DATA32_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_data64_t
#define MAVLINK_MSG_ID_DATA64_LEN 66
#define MAVLINK_MSG_ID_171_LEN 66
#define MAVLINK_MSG_ID_DATA64_CRC 181
#define MAVLINK_MSG_ID_171_CRC 181
#define MAVLINK_MSG_DATA64_FIELD_DATA_LEN 64
#define MAVLINK_MESSAGE_INFO_DATA64 { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data64_pack(uint8_t system_id, uint8_t compon
uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[66];
char buf[MAVLINK_MSG_ID_DATA64_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 64);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 66);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA64_LEN);
#else
mavlink_data64_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*64);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 66);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA64_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA64;
return mavlink_finalize_message(msg, system_id, component_id, 66, 181);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA64_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data64_pack_chan(uint8_t system_id, uint8_t c
uint8_t type,uint8_t len,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[66];
char buf[MAVLINK_MSG_ID_DATA64_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 64);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 66);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA64_LEN);
#else
mavlink_data64_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*64);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 66);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA64_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA64;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 66, 181);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA64_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data64_encode(uint8_t system_id, uint8_t comp
static inline void mavlink_msg_data64_send(mavlink_channel_t chan, uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[66];
char buf[MAVLINK_MSG_ID_DATA64_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 64);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, buf, 66, 181);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, buf, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, buf, MAVLINK_MSG_ID_DATA64_LEN);
#endif
#else
mavlink_data64_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*64);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, (const char *)&packet, 66, 181);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, (const char *)&packet, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA64, (const char *)&packet, MAVLINK_MSG_ID_DATA64_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_data64_decode(const mavlink_message_t* msg, mavli
data64->len = mavlink_msg_data64_get_len(msg);
mavlink_msg_data64_get_data(msg, data64->data);
#else
memcpy(data64, _MAV_PAYLOAD(msg), 66);
memcpy(data64, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DATA64_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_data96_t
#define MAVLINK_MSG_ID_DATA96_LEN 98
#define MAVLINK_MSG_ID_172_LEN 98
#define MAVLINK_MSG_ID_DATA96_CRC 22
#define MAVLINK_MSG_ID_172_CRC 22
#define MAVLINK_MSG_DATA96_FIELD_DATA_LEN 96
#define MAVLINK_MESSAGE_INFO_DATA96 { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data96_pack(uint8_t system_id, uint8_t compon
uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[98];
char buf[MAVLINK_MSG_ID_DATA96_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 96);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 98);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA96_LEN);
#else
mavlink_data96_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*96);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 98);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA96_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA96;
return mavlink_finalize_message(msg, system_id, component_id, 98, 22);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA96_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data96_pack_chan(uint8_t system_id, uint8_t c
uint8_t type,uint8_t len,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[98];
char buf[MAVLINK_MSG_ID_DATA96_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 96);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 98);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA96_LEN);
#else
mavlink_data96_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*96);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 98);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA96_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA96;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 98, 22);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA96_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data96_encode(uint8_t system_id, uint8_t comp
static inline void mavlink_msg_data96_send(mavlink_channel_t chan, uint8_t type, uint8_t len, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[98];
char buf[MAVLINK_MSG_ID_DATA96_LEN];
_mav_put_uint8_t(buf, 0, type);
_mav_put_uint8_t(buf, 1, len);
_mav_put_uint8_t_array(buf, 2, data, 96);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, buf, 98, 22);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, buf, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, buf, MAVLINK_MSG_ID_DATA96_LEN);
#endif
#else
mavlink_data96_t packet;
packet.type = type;
packet.len = len;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*96);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, (const char *)&packet, 98, 22);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, (const char *)&packet, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA96, (const char *)&packet, MAVLINK_MSG_ID_DATA96_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_data96_decode(const mavlink_message_t* msg, mavli
data96->len = mavlink_msg_data96_get_len(msg);
mavlink_msg_data96_get_data(msg, data96->data);
#else
memcpy(data96, _MAV_PAYLOAD(msg), 98);
memcpy(data96, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DATA96_LEN);
#endif
}

View File

@ -20,6 +20,9 @@ typedef struct __mavlink_digicam_configure_t
#define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN 15
#define MAVLINK_MSG_ID_154_LEN 15
#define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC 84
#define MAVLINK_MSG_ID_154_CRC 84
#define MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE { \
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint16_t(buf, 4, shutter_speed);
_mav_put_uint8_t(buf, 6, target_system);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
_mav_put_uint8_t(buf, 13, engine_cut_off);
_mav_put_uint8_t(buf, 14, extra_param);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#else
mavlink_digicam_configure_t packet;
packet.extra_value = extra_value;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
packet.engine_cut_off = engine_cut_off;
packet.extra_param = extra_param;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONFIGURE;
return mavlink_finalize_message(msg, system_id, component_id, 15, 84);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
}
/**
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
uint8_t target_system,uint8_t target_component,uint8_t mode,uint16_t shutter_speed,uint8_t aperture,uint8_t iso,uint8_t exposure_type,uint8_t command_id,uint8_t engine_cut_off,uint8_t extra_param,float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint16_t(buf, 4, shutter_speed);
_mav_put_uint8_t(buf, 6, target_system);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
_mav_put_uint8_t(buf, 13, engine_cut_off);
_mav_put_uint8_t(buf, 14, extra_param);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#else
mavlink_digicam_configure_t packet;
packet.extra_value = extra_value;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
packet.engine_cut_off = engine_cut_off;
packet.extra_param = extra_param;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONFIGURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 84);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
}
/**
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_digicam_configure_encode(uint8_t system_id, u
static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint16_t(buf, 4, shutter_speed);
_mav_put_uint8_t(buf, 6, target_system);
@ -204,7 +215,11 @@ static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, ui
_mav_put_uint8_t(buf, 13, engine_cut_off);
_mav_put_uint8_t(buf, 14, extra_param);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, buf, 15, 84);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
#else
mavlink_digicam_configure_t packet;
packet.extra_value = extra_value;
@ -219,7 +234,11 @@ static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, ui
packet.engine_cut_off = engine_cut_off;
packet.extra_param = extra_param;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)&packet, 15, 84);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)&packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)&packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
#endif
}
@ -359,6 +378,6 @@ static inline void mavlink_msg_digicam_configure_decode(const mavlink_message_t*
digicam_configure->engine_cut_off = mavlink_msg_digicam_configure_get_engine_cut_off(msg);
digicam_configure->extra_param = mavlink_msg_digicam_configure_get_extra_param(msg);
#else
memcpy(digicam_configure, _MAV_PAYLOAD(msg), 15);
memcpy(digicam_configure, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
#endif
}

View File

@ -19,6 +19,9 @@ typedef struct __mavlink_digicam_control_t
#define MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN 13
#define MAVLINK_MSG_ID_155_LEN 13
#define MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC 22
#define MAVLINK_MSG_ID_155_CRC 22
#define MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL { \
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
uint8_t target_system, uint8_t target_component, uint8_t session, uint8_t zoom_pos, int8_t zoom_step, uint8_t focus_lock, uint8_t shot, uint8_t command_id, uint8_t extra_param, float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
_mav_put_uint8_t(buf, 11, command_id);
_mav_put_uint8_t(buf, 12, extra_param);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#else
mavlink_digicam_control_t packet;
packet.extra_value = extra_value;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
packet.command_id = command_id;
packet.extra_param = extra_param;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 13, 22);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
}
/**
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
uint8_t target_system,uint8_t target_component,uint8_t session,uint8_t zoom_pos,int8_t zoom_step,uint8_t focus_lock,uint8_t shot,uint8_t command_id,uint8_t extra_param,float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
_mav_put_uint8_t(buf, 11, command_id);
_mav_put_uint8_t(buf, 12, extra_param);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#else
mavlink_digicam_control_t packet;
packet.extra_value = extra_value;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
packet.command_id = command_id;
packet.extra_param = extra_param;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 13, 22);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
}
/**
@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_digicam_control_encode(uint8_t system_id, uin
static inline void mavlink_msg_digicam_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t session, uint8_t zoom_pos, int8_t zoom_step, uint8_t focus_lock, uint8_t shot, uint8_t command_id, uint8_t extra_param, float extra_value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN];
_mav_put_float(buf, 0, extra_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
@ -194,7 +205,11 @@ static inline void mavlink_msg_digicam_control_send(mavlink_channel_t chan, uint
_mav_put_uint8_t(buf, 11, command_id);
_mav_put_uint8_t(buf, 12, extra_param);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, buf, 13, 22);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, buf, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, buf, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
#else
mavlink_digicam_control_t packet;
packet.extra_value = extra_value;
@ -208,7 +223,11 @@ static inline void mavlink_msg_digicam_control_send(mavlink_channel_t chan, uint
packet.command_id = command_id;
packet.extra_param = extra_param;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, (const char *)&packet, 13, 22);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
#endif
}
@ -337,6 +356,6 @@ static inline void mavlink_msg_digicam_control_decode(const mavlink_message_t* m
digicam_control->command_id = mavlink_msg_digicam_control_get_command_id(msg);
digicam_control->extra_param = mavlink_msg_digicam_control_get_extra_param(msg);
#else
memcpy(digicam_control, _MAV_PAYLOAD(msg), 13);
memcpy(digicam_control, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_fence_fetch_point_t
#define MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN 3
#define MAVLINK_MSG_ID_161_LEN 3
#define MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC 68
#define MAVLINK_MSG_ID_161_CRC 68
#define MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack(uint8_t system_id, uin
uint8_t target_system, uint8_t target_component, uint8_t idx)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, idx);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#else
mavlink_fence_fetch_point_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.idx = idx;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_FETCH_POINT;
return mavlink_finalize_message(msg, system_id, component_id, 3, 68);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack_chan(uint8_t system_id
uint8_t target_system,uint8_t target_component,uint8_t idx)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, idx);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#else
mavlink_fence_fetch_point_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.idx = idx;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_FETCH_POINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 68);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_encode(uint8_t system_id, u
static inline void mavlink_msg_fence_fetch_point_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t idx)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, idx);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, buf, 3, 68);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, buf, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, buf, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
#else
mavlink_fence_fetch_point_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.idx = idx;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, (const char *)&packet, 3, 68);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, (const char *)&packet, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_FETCH_POINT, (const char *)&packet, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_fence_fetch_point_decode(const mavlink_message_t*
fence_fetch_point->target_component = mavlink_msg_fence_fetch_point_get_target_component(msg);
fence_fetch_point->idx = mavlink_msg_fence_fetch_point_get_idx(msg);
#else
memcpy(fence_fetch_point, _MAV_PAYLOAD(msg), 3);
memcpy(fence_fetch_point, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_fence_point_t
#define MAVLINK_MSG_ID_FENCE_POINT_LEN 12
#define MAVLINK_MSG_ID_160_LEN 12
#define MAVLINK_MSG_ID_FENCE_POINT_CRC 78
#define MAVLINK_MSG_ID_160_CRC 78
#define MAVLINK_MESSAGE_INFO_FENCE_POINT { \
@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
_mav_put_float(buf, 0, lat);
_mav_put_float(buf, 4, lng);
_mav_put_uint8_t(buf, 8, target_system);
@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
_mav_put_uint8_t(buf, 10, idx);
_mav_put_uint8_t(buf, 11, count);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#else
mavlink_fence_point_t packet;
packet.lat = lat;
@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
packet.idx = idx;
packet.count = count;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_POINT;
return mavlink_finalize_message(msg, system_id, component_id, 12, 78);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
}
/**
@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
uint8_t target_system,uint8_t target_component,uint8_t idx,uint8_t count,float lat,float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
_mav_put_float(buf, 0, lat);
_mav_put_float(buf, 4, lng);
_mav_put_uint8_t(buf, 8, target_system);
@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
_mav_put_uint8_t(buf, 10, idx);
_mav_put_uint8_t(buf, 11, count);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#else
mavlink_fence_point_t packet;
packet.lat = lat;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
packet.idx = idx;
packet.count = count;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_POINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 78);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
}
/**
@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_fence_point_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
_mav_put_float(buf, 0, lat);
_mav_put_float(buf, 4, lng);
_mav_put_uint8_t(buf, 8, target_system);
@ -154,7 +165,11 @@ static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t
_mav_put_uint8_t(buf, 10, idx);
_mav_put_uint8_t(buf, 11, count);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, buf, 12, 78);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, buf, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
#else
mavlink_fence_point_t packet;
packet.lat = lat;
@ -164,7 +179,11 @@ static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t
packet.idx = idx;
packet.count = count;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, (const char *)&packet, 12, 78);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, (const char *)&packet, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_POINT, (const char *)&packet, MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
#endif
}
@ -249,6 +268,6 @@ static inline void mavlink_msg_fence_point_decode(const mavlink_message_t* msg,
fence_point->idx = mavlink_msg_fence_point_get_idx(msg);
fence_point->count = mavlink_msg_fence_point_get_count(msg);
#else
memcpy(fence_point, _MAV_PAYLOAD(msg), 12);
memcpy(fence_point, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FENCE_POINT_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_fence_status_t
#define MAVLINK_MSG_ID_FENCE_STATUS_LEN 8
#define MAVLINK_MSG_ID_162_LEN 8
#define MAVLINK_MSG_ID_FENCE_STATUS_CRC 189
#define MAVLINK_MSG_ID_162_CRC 189
#define MAVLINK_MESSAGE_INFO_FENCE_STATUS { \
@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
uint8_t breach_status, uint16_t breach_count, uint8_t breach_type, uint32_t breach_time)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_FENCE_STATUS_LEN];
_mav_put_uint32_t(buf, 0, breach_time);
_mav_put_uint16_t(buf, 4, breach_count);
_mav_put_uint8_t(buf, 6, breach_status);
_mav_put_uint8_t(buf, 7, breach_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#else
mavlink_fence_status_t packet;
packet.breach_time = breach_time;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
packet.breach_status = breach_status;
packet.breach_type = breach_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 8, 189);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_STATUS_LEN, MAVLINK_MSG_ID_FENCE_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
}
/**
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
uint8_t breach_status,uint16_t breach_count,uint8_t breach_type,uint32_t breach_time)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_FENCE_STATUS_LEN];
_mav_put_uint32_t(buf, 0, breach_time);
_mav_put_uint16_t(buf, 4, breach_count);
_mav_put_uint8_t(buf, 6, breach_status);
_mav_put_uint8_t(buf, 7, breach_type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#else
mavlink_fence_status_t packet;
packet.breach_time = breach_time;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
packet.breach_status = breach_status;
packet.breach_type = breach_type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FENCE_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 8, 189);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_STATUS_LEN, MAVLINK_MSG_ID_FENCE_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
}
/**
@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_fence_status_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_fence_status_send(mavlink_channel_t chan, uint8_t breach_status, uint16_t breach_count, uint8_t breach_type, uint32_t breach_time)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_FENCE_STATUS_LEN];
_mav_put_uint32_t(buf, 0, breach_time);
_mav_put_uint16_t(buf, 4, breach_count);
_mav_put_uint8_t(buf, 6, breach_status);
_mav_put_uint8_t(buf, 7, breach_type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, buf, 8, 189);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, buf, MAVLINK_MSG_ID_FENCE_STATUS_LEN, MAVLINK_MSG_ID_FENCE_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, buf, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
#else
mavlink_fence_status_t packet;
packet.breach_time = breach_time;
@ -142,7 +157,11 @@ static inline void mavlink_msg_fence_status_send(mavlink_channel_t chan, uint8_t
packet.breach_status = breach_status;
packet.breach_type = breach_type;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, (const char *)&packet, 8, 189);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, (const char *)&packet, MAVLINK_MSG_ID_FENCE_STATUS_LEN, MAVLINK_MSG_ID_FENCE_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCE_STATUS, (const char *)&packet, MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
#endif
}
@ -205,6 +224,6 @@ static inline void mavlink_msg_fence_status_decode(const mavlink_message_t* msg,
fence_status->breach_status = mavlink_msg_fence_status_get_breach_status(msg);
fence_status->breach_type = mavlink_msg_fence_status_get_breach_type(msg);
#else
memcpy(fence_status, _MAV_PAYLOAD(msg), 8);
memcpy(fence_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FENCE_STATUS_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_hwstatus_t
#define MAVLINK_MSG_ID_HWSTATUS_LEN 3
#define MAVLINK_MSG_ID_165_LEN 3
#define MAVLINK_MSG_ID_HWSTATUS_CRC 21
#define MAVLINK_MSG_ID_165_CRC 21
#define MAVLINK_MESSAGE_INFO_HWSTATUS { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_hwstatus_pack(uint8_t system_id, uint8_t comp
uint16_t Vcc, uint8_t I2Cerr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_HWSTATUS_LEN];
_mav_put_uint16_t(buf, 0, Vcc);
_mav_put_uint8_t(buf, 2, I2Cerr);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HWSTATUS_LEN);
#else
mavlink_hwstatus_t packet;
packet.Vcc = Vcc;
packet.I2Cerr = I2Cerr;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HWSTATUS;
return mavlink_finalize_message(msg, system_id, component_id, 3, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_hwstatus_pack_chan(uint8_t system_id, uint8_t
uint16_t Vcc,uint8_t I2Cerr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_HWSTATUS_LEN];
_mav_put_uint16_t(buf, 0, Vcc);
_mav_put_uint8_t(buf, 2, I2Cerr);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HWSTATUS_LEN);
#else
mavlink_hwstatus_t packet;
packet.Vcc = Vcc;
packet.I2Cerr = I2Cerr;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HWSTATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_hwstatus_encode(uint8_t system_id, uint8_t co
static inline void mavlink_msg_hwstatus_send(mavlink_channel_t chan, uint16_t Vcc, uint8_t I2Cerr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_HWSTATUS_LEN];
_mav_put_uint16_t(buf, 0, Vcc);
_mav_put_uint8_t(buf, 2, I2Cerr);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, buf, 3, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, buf, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, buf, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
#else
mavlink_hwstatus_t packet;
packet.Vcc = Vcc;
packet.I2Cerr = I2Cerr;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, (const char *)&packet, 3, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, (const char *)&packet, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HWSTATUS, (const char *)&packet, MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_hwstatus_decode(const mavlink_message_t* msg, mav
hwstatus->Vcc = mavlink_msg_hwstatus_get_Vcc(msg);
hwstatus->I2Cerr = mavlink_msg_hwstatus_get_I2Cerr(msg);
#else
memcpy(hwstatus, _MAV_PAYLOAD(msg), 3);
memcpy(hwstatus, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HWSTATUS_LEN);
#endif
}

View File

@ -18,6 +18,9 @@ typedef struct __mavlink_limits_status_t
#define MAVLINK_MSG_ID_LIMITS_STATUS_LEN 22
#define MAVLINK_MSG_ID_167_LEN 22
#define MAVLINK_MSG_ID_LIMITS_STATUS_CRC 144
#define MAVLINK_MSG_ID_167_CRC 144
#define MAVLINK_MESSAGE_INFO_LIMITS_STATUS { \
@ -57,7 +60,7 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
uint8_t limits_state, uint32_t last_trigger, uint32_t last_action, uint32_t last_recovery, uint32_t last_clear, uint16_t breach_count, uint8_t mods_enabled, uint8_t mods_required, uint8_t mods_triggered)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_LIMITS_STATUS_LEN];
_mav_put_uint32_t(buf, 0, last_trigger);
_mav_put_uint32_t(buf, 4, last_action);
_mav_put_uint32_t(buf, 8, last_recovery);
@ -68,7 +71,7 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 20, mods_required);
_mav_put_uint8_t(buf, 21, mods_triggered);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#else
mavlink_limits_status_t packet;
packet.last_trigger = last_trigger;
@ -81,11 +84,15 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
packet.mods_required = mods_required;
packet.mods_triggered = mods_triggered;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LIMITS_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 22, 144);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
}
/**
@ -110,7 +117,7 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
uint8_t limits_state,uint32_t last_trigger,uint32_t last_action,uint32_t last_recovery,uint32_t last_clear,uint16_t breach_count,uint8_t mods_enabled,uint8_t mods_required,uint8_t mods_triggered)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_LIMITS_STATUS_LEN];
_mav_put_uint32_t(buf, 0, last_trigger);
_mav_put_uint32_t(buf, 4, last_action);
_mav_put_uint32_t(buf, 8, last_recovery);
@ -121,7 +128,7 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
_mav_put_uint8_t(buf, 20, mods_required);
_mav_put_uint8_t(buf, 21, mods_triggered);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#else
mavlink_limits_status_t packet;
packet.last_trigger = last_trigger;
@ -134,11 +141,15 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
packet.mods_required = mods_required;
packet.mods_triggered = mods_triggered;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LIMITS_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 144);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
}
/**
@ -173,7 +184,7 @@ static inline uint16_t mavlink_msg_limits_status_encode(uint8_t system_id, uint8
static inline void mavlink_msg_limits_status_send(mavlink_channel_t chan, uint8_t limits_state, uint32_t last_trigger, uint32_t last_action, uint32_t last_recovery, uint32_t last_clear, uint16_t breach_count, uint8_t mods_enabled, uint8_t mods_required, uint8_t mods_triggered)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_LIMITS_STATUS_LEN];
_mav_put_uint32_t(buf, 0, last_trigger);
_mav_put_uint32_t(buf, 4, last_action);
_mav_put_uint32_t(buf, 8, last_recovery);
@ -184,7 +195,11 @@ static inline void mavlink_msg_limits_status_send(mavlink_channel_t chan, uint8_
_mav_put_uint8_t(buf, 20, mods_required);
_mav_put_uint8_t(buf, 21, mods_triggered);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, buf, 22, 144);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, buf, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, buf, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
#else
mavlink_limits_status_t packet;
packet.last_trigger = last_trigger;
@ -197,7 +212,11 @@ static inline void mavlink_msg_limits_status_send(mavlink_channel_t chan, uint8_
packet.mods_required = mods_required;
packet.mods_triggered = mods_triggered;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, (const char *)&packet, 22, 144);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LIMITS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
#endif
}
@ -315,6 +334,6 @@ static inline void mavlink_msg_limits_status_decode(const mavlink_message_t* msg
limits_status->mods_required = mavlink_msg_limits_status_get_mods_required(msg);
limits_status->mods_triggered = mavlink_msg_limits_status_get_mods_triggered(msg);
#else
memcpy(limits_status, _MAV_PAYLOAD(msg), 22);
memcpy(limits_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_meminfo_t
#define MAVLINK_MSG_ID_MEMINFO_LEN 4
#define MAVLINK_MSG_ID_152_LEN 4
#define MAVLINK_MSG_ID_MEMINFO_CRC 208
#define MAVLINK_MSG_ID_152_CRC 208
#define MAVLINK_MESSAGE_INFO_MEMINFO { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t compo
uint16_t brkval, uint16_t freemem)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MEMINFO_LEN];
_mav_put_uint16_t(buf, 0, brkval);
_mav_put_uint16_t(buf, 2, freemem);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMINFO_LEN);
#else
mavlink_meminfo_t packet;
packet.brkval = brkval;
packet.freemem = freemem;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMINFO;
return mavlink_finalize_message(msg, system_id, component_id, 4, 208);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_meminfo_pack_chan(uint8_t system_id, uint8_t
uint16_t brkval,uint16_t freemem)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MEMINFO_LEN];
_mav_put_uint16_t(buf, 0, brkval);
_mav_put_uint16_t(buf, 2, freemem);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMINFO_LEN);
#else
mavlink_meminfo_t packet;
packet.brkval = brkval;
packet.freemem = freemem;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMINFO;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 208);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_meminfo_encode(uint8_t system_id, uint8_t com
static inline void mavlink_msg_meminfo_send(mavlink_channel_t chan, uint16_t brkval, uint16_t freemem)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MEMINFO_LEN];
_mav_put_uint16_t(buf, 0, brkval);
_mav_put_uint16_t(buf, 2, freemem);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, buf, 4, 208);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, buf, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, buf, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
#else
mavlink_meminfo_t packet;
packet.brkval = brkval;
packet.freemem = freemem;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, (const char *)&packet, 4, 208);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, (const char *)&packet, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMINFO, (const char *)&packet, MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_meminfo_decode(const mavlink_message_t* msg, mavl
meminfo->brkval = mavlink_msg_meminfo_get_brkval(msg);
meminfo->freemem = mavlink_msg_meminfo_get_freemem(msg);
#else
memcpy(meminfo, _MAV_PAYLOAD(msg), 4);
memcpy(meminfo, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MEMINFO_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_mount_configure_t
#define MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN 6
#define MAVLINK_MSG_ID_156_LEN 6
#define MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC 19
#define MAVLINK_MSG_ID_156_CRC 19
#define MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE { \
@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
uint8_t target_system, uint8_t target_component, uint8_t mount_mode, uint8_t stab_roll, uint8_t stab_pitch, uint8_t stab_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, mount_mode);
@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
_mav_put_uint8_t(buf, 4, stab_pitch);
_mav_put_uint8_t(buf, 5, stab_yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#else
mavlink_mount_configure_t packet;
packet.target_system = target_system;
@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
packet.stab_pitch = stab_pitch;
packet.stab_yaw = stab_yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONFIGURE;
return mavlink_finalize_message(msg, system_id, component_id, 6, 19);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
}
/**
@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
uint8_t target_system,uint8_t target_component,uint8_t mount_mode,uint8_t stab_roll,uint8_t stab_pitch,uint8_t stab_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, mount_mode);
@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
_mav_put_uint8_t(buf, 4, stab_pitch);
_mav_put_uint8_t(buf, 5, stab_yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#else
mavlink_mount_configure_t packet;
packet.target_system = target_system;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
packet.stab_pitch = stab_pitch;
packet.stab_yaw = stab_yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONFIGURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 19);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
}
/**
@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_mount_configure_encode(uint8_t system_id, uin
static inline void mavlink_msg_mount_configure_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t mount_mode, uint8_t stab_roll, uint8_t stab_pitch, uint8_t stab_yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, mount_mode);
@ -154,7 +165,11 @@ static inline void mavlink_msg_mount_configure_send(mavlink_channel_t chan, uint
_mav_put_uint8_t(buf, 4, stab_pitch);
_mav_put_uint8_t(buf, 5, stab_yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, buf, 6, 19);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, buf, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, buf, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
#else
mavlink_mount_configure_t packet;
packet.target_system = target_system;
@ -164,7 +179,11 @@ static inline void mavlink_msg_mount_configure_send(mavlink_channel_t chan, uint
packet.stab_pitch = stab_pitch;
packet.stab_yaw = stab_yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, (const char *)&packet, 6, 19);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONFIGURE, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
#endif
}
@ -249,6 +268,6 @@ static inline void mavlink_msg_mount_configure_decode(const mavlink_message_t* m
mount_configure->stab_pitch = mavlink_msg_mount_configure_get_stab_pitch(msg);
mount_configure->stab_yaw = mavlink_msg_mount_configure_get_stab_yaw(msg);
#else
memcpy(mount_configure, _MAV_PAYLOAD(msg), 6);
memcpy(mount_configure, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_mount_control_t
#define MAVLINK_MSG_ID_MOUNT_CONTROL_LEN 15
#define MAVLINK_MSG_ID_157_LEN 15
#define MAVLINK_MSG_ID_MOUNT_CONTROL_CRC 21
#define MAVLINK_MSG_ID_157_CRC 21
#define MAVLINK_MESSAGE_INFO_MOUNT_CONTROL { \
@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_mount_control_pack(uint8_t system_id, uint8_t
uint8_t target_system, uint8_t target_component, int32_t input_a, int32_t input_b, int32_t input_c, uint8_t save_position)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_MOUNT_CONTROL_LEN];
_mav_put_int32_t(buf, 0, input_a);
_mav_put_int32_t(buf, 4, input_b);
_mav_put_int32_t(buf, 8, input_c);
@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_mount_control_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 13, target_component);
_mav_put_uint8_t(buf, 14, save_position);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#else
mavlink_mount_control_t packet;
packet.input_a = input_a;
@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_mount_control_pack(uint8_t system_id, uint8_t
packet.target_component = target_component;
packet.save_position = save_position;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 15, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
}
/**
@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_mount_control_pack_chan(uint8_t system_id, ui
uint8_t target_system,uint8_t target_component,int32_t input_a,int32_t input_b,int32_t input_c,uint8_t save_position)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_MOUNT_CONTROL_LEN];
_mav_put_int32_t(buf, 0, input_a);
_mav_put_int32_t(buf, 4, input_b);
_mav_put_int32_t(buf, 8, input_c);
@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_mount_control_pack_chan(uint8_t system_id, ui
_mav_put_uint8_t(buf, 13, target_component);
_mav_put_uint8_t(buf, 14, save_position);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#else
mavlink_mount_control_t packet;
packet.input_a = input_a;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_mount_control_pack_chan(uint8_t system_id, ui
packet.target_component = target_component;
packet.save_position = save_position;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
}
/**
@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_mount_control_encode(uint8_t system_id, uint8
static inline void mavlink_msg_mount_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int32_t input_a, int32_t input_b, int32_t input_c, uint8_t save_position)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_MOUNT_CONTROL_LEN];
_mav_put_int32_t(buf, 0, input_a);
_mav_put_int32_t(buf, 4, input_b);
_mav_put_int32_t(buf, 8, input_c);
@ -154,7 +165,11 @@ static inline void mavlink_msg_mount_control_send(mavlink_channel_t chan, uint8_
_mav_put_uint8_t(buf, 13, target_component);
_mav_put_uint8_t(buf, 14, save_position);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, buf, 15, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, buf, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, buf, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
#else
mavlink_mount_control_t packet;
packet.input_a = input_a;
@ -164,7 +179,11 @@ static inline void mavlink_msg_mount_control_send(mavlink_channel_t chan, uint8_
packet.target_component = target_component;
packet.save_position = save_position;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, (const char *)&packet, 15, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
#endif
}
@ -249,6 +268,6 @@ static inline void mavlink_msg_mount_control_decode(const mavlink_message_t* msg
mount_control->target_component = mavlink_msg_mount_control_get_target_component(msg);
mount_control->save_position = mavlink_msg_mount_control_get_save_position(msg);
#else
memcpy(mount_control, _MAV_PAYLOAD(msg), 15);
memcpy(mount_control, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_mount_status_t
#define MAVLINK_MSG_ID_MOUNT_STATUS_LEN 14
#define MAVLINK_MSG_ID_158_LEN 14
#define MAVLINK_MSG_ID_MOUNT_STATUS_CRC 134
#define MAVLINK_MSG_ID_158_CRC 134
#define MAVLINK_MESSAGE_INFO_MOUNT_STATUS { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_mount_status_pack(uint8_t system_id, uint8_t
uint8_t target_system, uint8_t target_component, int32_t pointing_a, int32_t pointing_b, int32_t pointing_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_MOUNT_STATUS_LEN];
_mav_put_int32_t(buf, 0, pointing_a);
_mav_put_int32_t(buf, 4, pointing_b);
_mav_put_int32_t(buf, 8, pointing_c);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#else
mavlink_mount_status_t packet;
packet.pointing_a = pointing_a;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_mount_status_pack(uint8_t system_id, uint8_t
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 14, 134);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_mount_status_pack_chan(uint8_t system_id, uin
uint8_t target_system,uint8_t target_component,int32_t pointing_a,int32_t pointing_b,int32_t pointing_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_MOUNT_STATUS_LEN];
_mav_put_int32_t(buf, 0, pointing_a);
_mav_put_int32_t(buf, 4, pointing_b);
_mav_put_int32_t(buf, 8, pointing_c);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#else
mavlink_mount_status_t packet;
packet.pointing_a = pointing_a;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_mount_status_pack_chan(uint8_t system_id, uin
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MOUNT_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 134);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_mount_status_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_mount_status_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int32_t pointing_a, int32_t pointing_b, int32_t pointing_c)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_MOUNT_STATUS_LEN];
_mav_put_int32_t(buf, 0, pointing_a);
_mav_put_int32_t(buf, 4, pointing_b);
_mav_put_int32_t(buf, 8, pointing_c);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, buf, 14, 134);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, buf, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, buf, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
#else
mavlink_mount_status_t packet;
packet.pointing_a = pointing_a;
@ -153,7 +168,11 @@ static inline void mavlink_msg_mount_status_send(mavlink_channel_t chan, uint8_t
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, (const char *)&packet, 14, 134);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_STATUS, (const char *)&packet, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_mount_status_decode(const mavlink_message_t* msg,
mount_status->target_system = mavlink_msg_mount_status_get_target_system(msg);
mount_status->target_component = mavlink_msg_mount_status_get_target_component(msg);
#else
memcpy(mount_status, _MAV_PAYLOAD(msg), 14);
memcpy(mount_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_radio_t
#define MAVLINK_MSG_ID_RADIO_LEN 9
#define MAVLINK_MSG_ID_166_LEN 9
#define MAVLINK_MSG_ID_RADIO_CRC 21
#define MAVLINK_MSG_ID_166_CRC 21
#define MAVLINK_MESSAGE_INFO_RADIO { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_radio_pack(uint8_t system_id, uint8_t compone
uint8_t rssi, uint8_t remrssi, uint8_t txbuf, uint8_t noise, uint8_t remnoise, uint16_t rxerrors, uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_RADIO_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_radio_pack(uint8_t system_id, uint8_t compone
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RADIO_LEN);
#else
mavlink_radio_t packet;
packet.rxerrors = rxerrors;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_radio_pack(uint8_t system_id, uint8_t compone
packet.noise = noise;
packet.remnoise = remnoise;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RADIO_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RADIO;
return mavlink_finalize_message(msg, system_id, component_id, 9, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RADIO_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_radio_pack_chan(uint8_t system_id, uint8_t co
uint8_t rssi,uint8_t remrssi,uint8_t txbuf,uint8_t noise,uint8_t remnoise,uint16_t rxerrors,uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_RADIO_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_radio_pack_chan(uint8_t system_id, uint8_t co
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RADIO_LEN);
#else
mavlink_radio_t packet;
packet.rxerrors = rxerrors;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_radio_pack_chan(uint8_t system_id, uint8_t co
packet.noise = noise;
packet.remnoise = remnoise;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RADIO_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RADIO;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RADIO_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_radio_encode(uint8_t system_id, uint8_t compo
static inline void mavlink_msg_radio_send(mavlink_channel_t chan, uint8_t rssi, uint8_t remrssi, uint8_t txbuf, uint8_t noise, uint8_t remnoise, uint16_t rxerrors, uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_RADIO_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
@ -164,7 +175,11 @@ static inline void mavlink_msg_radio_send(mavlink_channel_t chan, uint8_t rssi,
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, buf, 9, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, buf, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, buf, MAVLINK_MSG_ID_RADIO_LEN);
#endif
#else
mavlink_radio_t packet;
packet.rxerrors = rxerrors;
@ -175,7 +190,11 @@ static inline void mavlink_msg_radio_send(mavlink_channel_t chan, uint8_t rssi,
packet.noise = noise;
packet.remnoise = remnoise;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, (const char *)&packet, 9, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, (const char *)&packet, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO, (const char *)&packet, MAVLINK_MSG_ID_RADIO_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_radio_decode(const mavlink_message_t* msg, mavlin
radio->noise = mavlink_msg_radio_get_noise(msg);
radio->remnoise = mavlink_msg_radio_get_remnoise(msg);
#else
memcpy(radio, _MAV_PAYLOAD(msg), 9);
memcpy(radio, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RADIO_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_rangefinder_t
#define MAVLINK_MSG_ID_RANGEFINDER_LEN 8
#define MAVLINK_MSG_ID_173_LEN 8
#define MAVLINK_MSG_ID_RANGEFINDER_CRC 83
#define MAVLINK_MSG_ID_173_CRC 83
#define MAVLINK_MESSAGE_INFO_RANGEFINDER { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_rangefinder_pack(uint8_t system_id, uint8_t c
float distance, float voltage)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_RANGEFINDER_LEN];
_mav_put_float(buf, 0, distance);
_mav_put_float(buf, 4, voltage);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#else
mavlink_rangefinder_t packet;
packet.distance = distance;
packet.voltage = voltage;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RANGEFINDER;
return mavlink_finalize_message(msg, system_id, component_id, 8, 83);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_rangefinder_pack_chan(uint8_t system_id, uint
float distance,float voltage)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_RANGEFINDER_LEN];
_mav_put_float(buf, 0, distance);
_mav_put_float(buf, 4, voltage);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#else
mavlink_rangefinder_t packet;
packet.distance = distance;
packet.voltage = voltage;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RANGEFINDER;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 8, 83);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_rangefinder_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_rangefinder_send(mavlink_channel_t chan, float distance, float voltage)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_RANGEFINDER_LEN];
_mav_put_float(buf, 0, distance);
_mav_put_float(buf, 4, voltage);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, buf, 8, 83);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, buf, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, buf, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
#else
mavlink_rangefinder_t packet;
packet.distance = distance;
packet.voltage = voltage;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, (const char *)&packet, 8, 83);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, (const char *)&packet, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RANGEFINDER, (const char *)&packet, MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_rangefinder_decode(const mavlink_message_t* msg,
rangefinder->distance = mavlink_msg_rangefinder_get_distance(msg);
rangefinder->voltage = mavlink_msg_rangefinder_get_voltage(msg);
#else
memcpy(rangefinder, _MAV_PAYLOAD(msg), 8);
memcpy(rangefinder, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RANGEFINDER_LEN);
#endif
}

View File

@ -21,6 +21,9 @@ typedef struct __mavlink_sensor_offsets_t
#define MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN 42
#define MAVLINK_MSG_ID_150_LEN 42
#define MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC 134
#define MAVLINK_MSG_ID_150_CRC 134
#define MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS { \
@ -66,7 +69,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_
int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN];
_mav_put_float(buf, 0, mag_declination);
_mav_put_int32_t(buf, 4, raw_press);
_mav_put_int32_t(buf, 8, raw_temp);
@ -80,7 +83,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_
_mav_put_int16_t(buf, 38, mag_ofs_y);
_mav_put_int16_t(buf, 40, mag_ofs_z);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#else
mavlink_sensor_offsets_t packet;
packet.mag_declination = mag_declination;
@ -96,11 +99,15 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_
packet.mag_ofs_y = mag_ofs_y;
packet.mag_ofs_z = mag_ofs_z;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_OFFSETS;
return mavlink_finalize_message(msg, system_id, component_id, 42, 134);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
}
/**
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, u
int16_t mag_ofs_x,int16_t mag_ofs_y,int16_t mag_ofs_z,float mag_declination,int32_t raw_press,int32_t raw_temp,float gyro_cal_x,float gyro_cal_y,float gyro_cal_z,float accel_cal_x,float accel_cal_y,float accel_cal_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN];
_mav_put_float(buf, 0, mag_declination);
_mav_put_int32_t(buf, 4, raw_press);
_mav_put_int32_t(buf, 8, raw_temp);
@ -142,7 +149,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, u
_mav_put_int16_t(buf, 38, mag_ofs_y);
_mav_put_int16_t(buf, 40, mag_ofs_z);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#else
mavlink_sensor_offsets_t packet;
packet.mag_declination = mag_declination;
@ -158,11 +165,15 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, u
packet.mag_ofs_y = mag_ofs_y;
packet.mag_ofs_z = mag_ofs_z;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SENSOR_OFFSETS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 42, 134);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
}
/**
@ -200,7 +211,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_encode(uint8_t system_id, uint
static inline void mavlink_msg_sensor_offsets_send(mavlink_channel_t chan, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN];
_mav_put_float(buf, 0, mag_declination);
_mav_put_int32_t(buf, 4, raw_press);
_mav_put_int32_t(buf, 8, raw_temp);
@ -214,7 +225,11 @@ static inline void mavlink_msg_sensor_offsets_send(mavlink_channel_t chan, int16
_mav_put_int16_t(buf, 38, mag_ofs_y);
_mav_put_int16_t(buf, 40, mag_ofs_z);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, buf, 42, 134);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, buf, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, buf, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
#else
mavlink_sensor_offsets_t packet;
packet.mag_declination = mag_declination;
@ -230,7 +245,11 @@ static inline void mavlink_msg_sensor_offsets_send(mavlink_channel_t chan, int16
packet.mag_ofs_y = mag_ofs_y;
packet.mag_ofs_z = mag_ofs_z;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, (const char *)&packet, 42, 134);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENSOR_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
#endif
}
@ -381,6 +400,6 @@ static inline void mavlink_msg_sensor_offsets_decode(const mavlink_message_t* ms
sensor_offsets->mag_ofs_y = mavlink_msg_sensor_offsets_get_mag_ofs_y(msg);
sensor_offsets->mag_ofs_z = mavlink_msg_sensor_offsets_get_mag_ofs_z(msg);
#else
memcpy(sensor_offsets, _MAV_PAYLOAD(msg), 42);
memcpy(sensor_offsets, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_set_mag_offsets_t
#define MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN 8
#define MAVLINK_MSG_ID_151_LEN 8
#define MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC 219
#define MAVLINK_MSG_ID_151_CRC 219
#define MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8
uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN];
_mav_put_int16_t(buf, 0, mag_ofs_x);
_mav_put_int16_t(buf, 2, mag_ofs_y);
_mav_put_int16_t(buf, 4, mag_ofs_z);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#else
mavlink_set_mag_offsets_t packet;
packet.mag_ofs_x = mag_ofs_x;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_MAG_OFFSETS;
return mavlink_finalize_message(msg, system_id, component_id, 8, 219);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id,
uint8_t target_system,uint8_t target_component,int16_t mag_ofs_x,int16_t mag_ofs_y,int16_t mag_ofs_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN];
_mav_put_int16_t(buf, 0, mag_ofs_x);
_mav_put_int16_t(buf, 2, mag_ofs_y);
_mav_put_int16_t(buf, 4, mag_ofs_z);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#else
mavlink_set_mag_offsets_t packet;
packet.mag_ofs_x = mag_ofs_x;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id,
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 8);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_MAG_OFFSETS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 8, 219);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint8_t system_id, uin
static inline void mavlink_msg_set_mag_offsets_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[8];
char buf[MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN];
_mav_put_int16_t(buf, 0, mag_ofs_x);
_mav_put_int16_t(buf, 2, mag_ofs_y);
_mav_put_int16_t(buf, 4, mag_ofs_z);
_mav_put_uint8_t(buf, 6, target_system);
_mav_put_uint8_t(buf, 7, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, buf, 8, 219);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, buf, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, buf, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
#else
mavlink_set_mag_offsets_t packet;
packet.mag_ofs_x = mag_ofs_x;
@ -153,7 +168,11 @@ static inline void mavlink_msg_set_mag_offsets_send(mavlink_channel_t chan, uint
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, (const char *)&packet, 8, 219);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_MAG_OFFSETS, (const char *)&packet, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_set_mag_offsets_decode(const mavlink_message_t* m
set_mag_offsets->target_system = mavlink_msg_set_mag_offsets_get_target_system(msg);
set_mag_offsets->target_component = mavlink_msg_set_mag_offsets_get_target_component(msg);
#else
memcpy(set_mag_offsets, _MAV_PAYLOAD(msg), 8);
memcpy(set_mag_offsets, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
#endif
}

View File

@ -20,6 +20,9 @@ typedef struct __mavlink_simstate_t
#define MAVLINK_MSG_ID_SIMSTATE_LEN 44
#define MAVLINK_MSG_ID_164_LEN 44
#define MAVLINK_MSG_ID_SIMSTATE_CRC 111
#define MAVLINK_MSG_ID_164_CRC 111
#define MAVLINK_MESSAGE_INFO_SIMSTATE { \
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float lat, float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[44];
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
_mav_put_float(buf, 36, lat);
_mav_put_float(buf, 40, lng);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 44);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
#else
mavlink_simstate_t packet;
packet.roll = roll;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
packet.lat = lat;
packet.lng = lng;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 44);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SIMSTATE;
return mavlink_finalize_message(msg, system_id, component_id, 44, 111);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
}
/**
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t
float roll,float pitch,float yaw,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,float lat,float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[44];
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t
_mav_put_float(buf, 36, lat);
_mav_put_float(buf, 40, lng);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 44);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
#else
mavlink_simstate_t packet;
packet.roll = roll;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t
packet.lat = lat;
packet.lng = lng;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 44);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SIMSTATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 44, 111);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
}
/**
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_simstate_encode(uint8_t system_id, uint8_t co
static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float lat, float lng)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[44];
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
_mav_put_float(buf, 0, roll);
_mav_put_float(buf, 4, pitch);
_mav_put_float(buf, 8, yaw);
@ -204,7 +215,11 @@ static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll,
_mav_put_float(buf, 36, lat);
_mav_put_float(buf, 40, lng);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, buf, 44, 111);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, buf, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
#else
mavlink_simstate_t packet;
packet.roll = roll;
@ -219,7 +234,11 @@ static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll,
packet.lat = lat;
packet.lng = lng;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, (const char *)&packet, 44, 111);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, (const char *)&packet, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, (const char *)&packet, MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
#endif
}
@ -359,6 +378,6 @@ static inline void mavlink_msg_simstate_decode(const mavlink_message_t* msg, mav
simstate->lat = mavlink_msg_simstate_get_lat(msg);
simstate->lng = mavlink_msg_simstate_get_lng(msg);
#else
memcpy(simstate, _MAV_PAYLOAD(msg), 44);
memcpy(simstate, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SIMSTATE_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_wind_t
#define MAVLINK_MSG_ID_WIND_LEN 12
#define MAVLINK_MSG_ID_168_LEN 12
#define MAVLINK_MSG_ID_WIND_CRC 1
#define MAVLINK_MSG_ID_168_CRC 1
#define MAVLINK_MESSAGE_INFO_WIND { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_wind_pack(uint8_t system_id, uint8_t componen
float direction, float speed, float speed_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_WIND_LEN];
_mav_put_float(buf, 0, direction);
_mav_put_float(buf, 4, speed);
_mav_put_float(buf, 8, speed_z);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIND_LEN);
#else
mavlink_wind_t packet;
packet.direction = direction;
packet.speed = speed;
packet.speed_z = speed_z;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_WIND;
return mavlink_finalize_message(msg, system_id, component_id, 12, 1);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_WIND_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_wind_pack_chan(uint8_t system_id, uint8_t com
float direction,float speed,float speed_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_WIND_LEN];
_mav_put_float(buf, 0, direction);
_mav_put_float(buf, 4, speed);
_mav_put_float(buf, 8, speed_z);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIND_LEN);
#else
mavlink_wind_t packet;
packet.direction = direction;
packet.speed = speed;
packet.speed_z = speed_z;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_WIND;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 1);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_WIND_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_wind_encode(uint8_t system_id, uint8_t compon
static inline void mavlink_msg_wind_send(mavlink_channel_t chan, float direction, float speed, float speed_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_WIND_LEN];
_mav_put_float(buf, 0, direction);
_mav_put_float(buf, 4, speed);
_mav_put_float(buf, 8, speed_z);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, buf, 12, 1);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, buf, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, buf, MAVLINK_MSG_ID_WIND_LEN);
#endif
#else
mavlink_wind_t packet;
packet.direction = direction;
packet.speed = speed;
packet.speed_z = speed_z;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, (const char *)&packet, 12, 1);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, (const char *)&packet, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIND, (const char *)&packet, MAVLINK_MSG_ID_WIND_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_wind_decode(const mavlink_message_t* msg, mavlink
wind->speed = mavlink_msg_wind_get_speed(msg);
wind->speed_z = mavlink_msg_wind_get_speed_z(msg);
#else
memcpy(wind, _MAV_PAYLOAD(msg), 12);
memcpy(wind, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_WIND_LEN);
#endif
}

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Fri Mar 1 11:21:56 2013"
#define MAVLINK_BUILD_DATE "Sun Jul 14 15:51:23 2013"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 254

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_attitude_t
#define MAVLINK_MSG_ID_ATTITUDE_LEN 28
#define MAVLINK_MSG_ID_30_LEN 28
#define MAVLINK_MSG_ID_ATTITUDE_CRC 39
#define MAVLINK_MSG_ID_30_CRC 39
#define MAVLINK_MESSAGE_INFO_ATTITUDE { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t comp
uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_ATTITUDE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t comp
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_LEN);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t comp
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message(msg, system_id, component_id, 28, 39);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_LEN, MAVLINK_MSG_ID_ATTITUDE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t
uint32_t time_boot_ms,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_ATTITUDE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_LEN);
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 39);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_LEN, MAVLINK_MSG_ID_ATTITUDE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t co
static inline void mavlink_msg_attitude_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_ATTITUDE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -164,7 +175,11 @@ static inline void mavlink_msg_attitude_send(mavlink_channel_t chan, uint32_t ti
_mav_put_float(buf, 20, pitchspeed);
_mav_put_float(buf, 24, yawspeed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, buf, 28, 39);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, buf, MAVLINK_MSG_ID_ATTITUDE_LEN, MAVLINK_MSG_ID_ATTITUDE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, buf, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
#else
mavlink_attitude_t packet;
packet.time_boot_ms = time_boot_ms;
@ -175,7 +190,11 @@ static inline void mavlink_msg_attitude_send(mavlink_channel_t chan, uint32_t ti
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, (const char *)&packet, 28, 39);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, (const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_LEN, MAVLINK_MSG_ID_ATTITUDE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE, (const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_attitude_decode(const mavlink_message_t* msg, mav
attitude->pitchspeed = mavlink_msg_attitude_get_pitchspeed(msg);
attitude->yawspeed = mavlink_msg_attitude_get_yawspeed(msg);
#else
memcpy(attitude, _MAV_PAYLOAD(msg), 28);
memcpy(attitude, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ATTITUDE_LEN);
#endif
}

View File

@ -17,6 +17,9 @@ typedef struct __mavlink_attitude_quaternion_t
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN 32
#define MAVLINK_MSG_ID_31_LEN 32
#define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_CRC 246
#define MAVLINK_MSG_ID_31_CRC 246
#define MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION { \
@ -54,7 +57,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, u
uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
@ -64,7 +67,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, u
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
@ -76,11 +79,15 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, u
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message(msg, system_id, component_id, 32, 246);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
}
/**
@ -104,7 +111,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_
uint32_t time_boot_ms,float q1,float q2,float q3,float q4,float rollspeed,float pitchspeed,float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
@ -114,7 +121,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
@ -126,11 +133,15 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 246);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
}
/**
@ -164,7 +175,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_encode(uint8_t system_id,
static inline void mavlink_msg_attitude_quaternion_send(mavlink_channel_t chan, uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, q1);
_mav_put_float(buf, 8, q2);
@ -174,7 +185,11 @@ static inline void mavlink_msg_attitude_quaternion_send(mavlink_channel_t chan,
_mav_put_float(buf, 24, pitchspeed);
_mav_put_float(buf, 28, yawspeed);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, buf, 32, 246);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
#else
mavlink_attitude_quaternion_t packet;
packet.time_boot_ms = time_boot_ms;
@ -186,7 +201,11 @@ static inline void mavlink_msg_attitude_quaternion_send(mavlink_channel_t chan,
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, (const char *)&packet, 32, 246);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
#endif
}
@ -293,6 +312,6 @@ static inline void mavlink_msg_attitude_quaternion_decode(const mavlink_message_
attitude_quaternion->pitchspeed = mavlink_msg_attitude_quaternion_get_pitchspeed(msg);
attitude_quaternion->yawspeed = mavlink_msg_attitude_quaternion_get_yawspeed(msg);
#else
memcpy(attitude_quaternion, _MAV_PAYLOAD(msg), 32);
memcpy(attitude_quaternion, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ATTITUDE_QUATERNION_LEN);
#endif
}

View File

@ -10,6 +10,9 @@ typedef struct __mavlink_auth_key_t
#define MAVLINK_MSG_ID_AUTH_KEY_LEN 32
#define MAVLINK_MSG_ID_7_LEN 32
#define MAVLINK_MSG_ID_AUTH_KEY_CRC 119
#define MAVLINK_MSG_ID_7_CRC 119
#define MAVLINK_MSG_AUTH_KEY_FIELD_KEY_LEN 32
#define MAVLINK_MESSAGE_INFO_AUTH_KEY { \
@ -33,19 +36,23 @@ static inline uint16_t mavlink_msg_auth_key_pack(uint8_t system_id, uint8_t comp
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_AUTH_KEY_LEN];
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message(msg, system_id, component_id, 32, 119);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
}
/**
@ -62,19 +69,23 @@ static inline uint16_t mavlink_msg_auth_key_pack_chan(uint8_t system_id, uint8_t
const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_AUTH_KEY_LEN];
_mav_put_char_array(buf, 0, key, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_AUTH_KEY;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 119);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
}
/**
@ -101,15 +112,23 @@ static inline uint16_t mavlink_msg_auth_key_encode(uint8_t system_id, uint8_t co
static inline void mavlink_msg_auth_key_send(mavlink_channel_t chan, const char *key)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_AUTH_KEY_LEN];
_mav_put_char_array(buf, 0, key, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, 32, 119);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
#else
mavlink_auth_key_t packet;
mav_array_memcpy(packet.key, key, sizeof(char)*32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (const char *)&packet, 32, 119);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (const char *)&packet, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (const char *)&packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
#endif
}
@ -139,6 +158,6 @@ static inline void mavlink_msg_auth_key_decode(const mavlink_message_t* msg, mav
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_auth_key_get_key(msg, auth_key->key);
#else
memcpy(auth_key, _MAV_PAYLOAD(msg), 32);
memcpy(auth_key, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AUTH_KEY_LEN);
#endif
}

View File

@ -18,6 +18,9 @@ typedef struct __mavlink_battery_status_t
#define MAVLINK_MSG_ID_BATTERY_STATUS_LEN 16
#define MAVLINK_MSG_ID_147_LEN 16
#define MAVLINK_MSG_ID_BATTERY_STATUS_CRC 42
#define MAVLINK_MSG_ID_147_CRC 42
#define MAVLINK_MESSAGE_INFO_BATTERY_STATUS { \
@ -57,7 +60,7 @@ static inline uint16_t mavlink_msg_battery_status_pack(uint8_t system_id, uint8_
uint8_t accu_id, uint16_t voltage_cell_1, uint16_t voltage_cell_2, uint16_t voltage_cell_3, uint16_t voltage_cell_4, uint16_t voltage_cell_5, uint16_t voltage_cell_6, int16_t current_battery, int8_t battery_remaining)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_BATTERY_STATUS_LEN];
_mav_put_uint16_t(buf, 0, voltage_cell_1);
_mav_put_uint16_t(buf, 2, voltage_cell_2);
_mav_put_uint16_t(buf, 4, voltage_cell_3);
@ -68,7 +71,7 @@ static inline uint16_t mavlink_msg_battery_status_pack(uint8_t system_id, uint8_
_mav_put_uint8_t(buf, 14, accu_id);
_mav_put_int8_t(buf, 15, battery_remaining);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#else
mavlink_battery_status_t packet;
packet.voltage_cell_1 = voltage_cell_1;
@ -81,11 +84,15 @@ static inline uint16_t mavlink_msg_battery_status_pack(uint8_t system_id, uint8_
packet.accu_id = accu_id;
packet.battery_remaining = battery_remaining;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_BATTERY_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 16, 42);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BATTERY_STATUS_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
}
/**
@ -110,7 +117,7 @@ static inline uint16_t mavlink_msg_battery_status_pack_chan(uint8_t system_id, u
uint8_t accu_id,uint16_t voltage_cell_1,uint16_t voltage_cell_2,uint16_t voltage_cell_3,uint16_t voltage_cell_4,uint16_t voltage_cell_5,uint16_t voltage_cell_6,int16_t current_battery,int8_t battery_remaining)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_BATTERY_STATUS_LEN];
_mav_put_uint16_t(buf, 0, voltage_cell_1);
_mav_put_uint16_t(buf, 2, voltage_cell_2);
_mav_put_uint16_t(buf, 4, voltage_cell_3);
@ -121,7 +128,7 @@ static inline uint16_t mavlink_msg_battery_status_pack_chan(uint8_t system_id, u
_mav_put_uint8_t(buf, 14, accu_id);
_mav_put_int8_t(buf, 15, battery_remaining);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#else
mavlink_battery_status_t packet;
packet.voltage_cell_1 = voltage_cell_1;
@ -134,11 +141,15 @@ static inline uint16_t mavlink_msg_battery_status_pack_chan(uint8_t system_id, u
packet.accu_id = accu_id;
packet.battery_remaining = battery_remaining;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_BATTERY_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 16, 42);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BATTERY_STATUS_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
}
/**
@ -173,7 +184,7 @@ static inline uint16_t mavlink_msg_battery_status_encode(uint8_t system_id, uint
static inline void mavlink_msg_battery_status_send(mavlink_channel_t chan, uint8_t accu_id, uint16_t voltage_cell_1, uint16_t voltage_cell_2, uint16_t voltage_cell_3, uint16_t voltage_cell_4, uint16_t voltage_cell_5, uint16_t voltage_cell_6, int16_t current_battery, int8_t battery_remaining)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_BATTERY_STATUS_LEN];
_mav_put_uint16_t(buf, 0, voltage_cell_1);
_mav_put_uint16_t(buf, 2, voltage_cell_2);
_mav_put_uint16_t(buf, 4, voltage_cell_3);
@ -184,7 +195,11 @@ static inline void mavlink_msg_battery_status_send(mavlink_channel_t chan, uint8
_mav_put_uint8_t(buf, 14, accu_id);
_mav_put_int8_t(buf, 15, battery_remaining);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, buf, 16, 42);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, buf, MAVLINK_MSG_ID_BATTERY_STATUS_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, buf, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
#else
mavlink_battery_status_t packet;
packet.voltage_cell_1 = voltage_cell_1;
@ -197,7 +212,11 @@ static inline void mavlink_msg_battery_status_send(mavlink_channel_t chan, uint8
packet.accu_id = accu_id;
packet.battery_remaining = battery_remaining;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, (const char *)&packet, 16, 42);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, (const char *)&packet, MAVLINK_MSG_ID_BATTERY_STATUS_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS, (const char *)&packet, MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
#endif
}
@ -315,6 +334,6 @@ static inline void mavlink_msg_battery_status_decode(const mavlink_message_t* ms
battery_status->accu_id = mavlink_msg_battery_status_get_accu_id(msg);
battery_status->battery_remaining = mavlink_msg_battery_status_get_battery_remaining(msg);
#else
memcpy(battery_status, _MAV_PAYLOAD(msg), 16);
memcpy(battery_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_BATTERY_STATUS_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_change_operator_control_t
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN 28
#define MAVLINK_MSG_ID_5_LEN 28
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC 217
#define MAVLINK_MSG_ID_5_CRC 217
#define MAVLINK_MSG_CHANGE_OPERATOR_CONTROL_FIELD_PASSKEY_LEN 25
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL { \
@ -42,23 +45,27 @@ static inline uint16_t mavlink_msg_change_operator_control_pack(uint8_t system_i
uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 28, 217);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
}
/**
@ -78,23 +85,27 @@ static inline uint16_t mavlink_msg_change_operator_control_pack_chan(uint8_t sys
uint8_t target_system,uint8_t control_request,uint8_t version,const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 217);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
}
/**
@ -124,19 +135,27 @@ static inline uint16_t mavlink_msg_change_operator_control_encode(uint8_t system
static inline void mavlink_msg_change_operator_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t control_request, uint8_t version, const char *passkey)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, version);
_mav_put_char_array(buf, 3, passkey, 25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, 28, 217);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
#else
mavlink_change_operator_control_t packet;
packet.target_system = target_system;
packet.control_request = control_request;
packet.version = version;
mav_array_memcpy(packet.passkey, passkey, sizeof(char)*25);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, (const char *)&packet, 28, 217);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
#endif
}
@ -199,6 +218,6 @@ static inline void mavlink_msg_change_operator_control_decode(const mavlink_mess
change_operator_control->version = mavlink_msg_change_operator_control_get_version(msg);
mavlink_msg_change_operator_control_get_passkey(msg, change_operator_control->passkey);
#else
memcpy(change_operator_control, _MAV_PAYLOAD(msg), 28);
memcpy(change_operator_control, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_change_operator_control_ack_t
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN 3
#define MAVLINK_MSG_ID_6_LEN 3
#define MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC 104
#define MAVLINK_MSG_ID_6_CRC 104
#define MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_pack(uint8_t syst
uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 104);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_pack_chan(uint8_t
uint8_t gcs_system_id,uint8_t control_request,uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 104);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_encode(uint8_t sy
static inline void mavlink_msg_change_operator_control_ack_send(mavlink_channel_t chan, uint8_t gcs_system_id, uint8_t control_request, uint8_t ack)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN];
_mav_put_uint8_t(buf, 0, gcs_system_id);
_mav_put_uint8_t(buf, 1, control_request);
_mav_put_uint8_t(buf, 2, ack);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, 3, 104);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, buf, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
#else
mavlink_change_operator_control_ack_t packet;
packet.gcs_system_id = gcs_system_id;
packet.control_request = control_request;
packet.ack = ack;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, 3, 104);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK, (const char *)&packet, MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_change_operator_control_ack_decode(const mavlink_
change_operator_control_ack->control_request = mavlink_msg_change_operator_control_ack_get_control_request(msg);
change_operator_control_ack->ack = mavlink_msg_change_operator_control_ack_get_ack(msg);
#else
memcpy(change_operator_control_ack, _MAV_PAYLOAD(msg), 3);
memcpy(change_operator_control_ack, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_command_ack_t
#define MAVLINK_MSG_ID_COMMAND_ACK_LEN 3
#define MAVLINK_MSG_ID_77_LEN 3
#define MAVLINK_MSG_ID_COMMAND_ACK_CRC 143
#define MAVLINK_MSG_ID_77_CRC 143
#define MAVLINK_MESSAGE_INFO_COMMAND_ACK { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t c
uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_COMMAND_ACK_LEN];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 143);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_ACK_LEN, MAVLINK_MSG_ID_COMMAND_ACK_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint
uint16_t command,uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_COMMAND_ACK_LEN];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 143);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_ACK_LEN, MAVLINK_MSG_ID_COMMAND_ACK_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_command_ack_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_command_ack_send(mavlink_channel_t chan, uint16_t command, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_COMMAND_ACK_LEN];
_mav_put_uint16_t(buf, 0, command);
_mav_put_uint8_t(buf, 2, result);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, buf, 3, 143);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, buf, MAVLINK_MSG_ID_COMMAND_ACK_LEN, MAVLINK_MSG_ID_COMMAND_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, buf, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
#else
mavlink_command_ack_t packet;
packet.command = command;
packet.result = result;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, (const char *)&packet, 3, 143);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_ACK_LEN, MAVLINK_MSG_ID_COMMAND_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_ACK, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_command_ack_decode(const mavlink_message_t* msg,
command_ack->command = mavlink_msg_command_ack_get_command(msg);
command_ack->result = mavlink_msg_command_ack_get_result(msg);
#else
memcpy(command_ack, _MAV_PAYLOAD(msg), 3);
memcpy(command_ack, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_COMMAND_ACK_LEN);
#endif
}

View File

@ -20,6 +20,9 @@ typedef struct __mavlink_command_long_t
#define MAVLINK_MSG_ID_COMMAND_LONG_LEN 33
#define MAVLINK_MSG_ID_76_LEN 33
#define MAVLINK_MSG_ID_COMMAND_LONG_CRC 152
#define MAVLINK_MSG_ID_76_CRC 152
#define MAVLINK_MESSAGE_INFO_COMMAND_LONG { \
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t
uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_COMMAND_LONG_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t
packet.target_component = target_component;
packet.confirmation = confirmation;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message(msg, system_id, component_id, 33, 152);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_LONG_LEN, MAVLINK_MSG_ID_COMMAND_LONG_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
}
/**
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uin
uint8_t target_system,uint8_t target_component,uint16_t command,uint8_t confirmation,float param1,float param2,float param3,float param4,float param5,float param6,float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_COMMAND_LONG_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uin
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#else
mavlink_command_long_t packet;
packet.param1 = param1;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uin
packet.target_component = target_component;
packet.confirmation = confirmation;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 152);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_LONG_LEN, MAVLINK_MSG_ID_COMMAND_LONG_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
}
/**
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_command_long_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_command_long_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_COMMAND_LONG_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -204,7 +215,11 @@ static inline void mavlink_msg_command_long_send(mavlink_channel_t chan, uint8_t
_mav_put_uint8_t(buf, 31, target_component);
_mav_put_uint8_t(buf, 32, confirmation);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, buf, 33, 152);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, buf, MAVLINK_MSG_ID_COMMAND_LONG_LEN, MAVLINK_MSG_ID_COMMAND_LONG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, buf, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
#else
mavlink_command_long_t packet;
packet.param1 = param1;
@ -219,7 +234,11 @@ static inline void mavlink_msg_command_long_send(mavlink_channel_t chan, uint8_t
packet.target_component = target_component;
packet.confirmation = confirmation;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, (const char *)&packet, 33, 152);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_LONG_LEN, MAVLINK_MSG_ID_COMMAND_LONG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
#endif
}
@ -359,6 +378,6 @@ static inline void mavlink_msg_command_long_decode(const mavlink_message_t* msg,
command_long->target_component = mavlink_msg_command_long_get_target_component(msg);
command_long->confirmation = mavlink_msg_command_long_get_confirmation(msg);
#else
memcpy(command_long, _MAV_PAYLOAD(msg), 33);
memcpy(command_long, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_COMMAND_LONG_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_data_stream_t
#define MAVLINK_MSG_ID_DATA_STREAM_LEN 4
#define MAVLINK_MSG_ID_67_LEN 4
#define MAVLINK_MSG_ID_DATA_STREAM_CRC 21
#define MAVLINK_MSG_ID_67_CRC 21
#define MAVLINK_MESSAGE_INFO_DATA_STREAM { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_data_stream_pack(uint8_t system_id, uint8_t c
uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message(msg, system_id, component_id, 4, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA_STREAM_LEN, MAVLINK_MSG_ID_DATA_STREAM_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_data_stream_pack_chan(uint8_t system_id, uint
uint8_t stream_id,uint16_t message_rate,uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DATA_STREAM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 21);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA_STREAM_LEN, MAVLINK_MSG_ID_DATA_STREAM_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_data_stream_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_data_stream_send(mavlink_channel_t chan, uint8_t stream_id, uint16_t message_rate, uint8_t on_off)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, message_rate);
_mav_put_uint8_t(buf, 2, stream_id);
_mav_put_uint8_t(buf, 3, on_off);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, buf, 4, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, buf, MAVLINK_MSG_ID_DATA_STREAM_LEN, MAVLINK_MSG_ID_DATA_STREAM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, buf, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
#else
mavlink_data_stream_t packet;
packet.message_rate = message_rate;
packet.stream_id = stream_id;
packet.on_off = on_off;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, (const char *)&packet, 4, 21);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, (const char *)&packet, MAVLINK_MSG_ID_DATA_STREAM_LEN, MAVLINK_MSG_ID_DATA_STREAM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DATA_STREAM, (const char *)&packet, MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_data_stream_decode(const mavlink_message_t* msg,
data_stream->stream_id = mavlink_msg_data_stream_get_stream_id(msg);
data_stream->on_off = mavlink_msg_data_stream_get_on_off(msg);
#else
memcpy(data_stream, _MAV_PAYLOAD(msg), 4);
memcpy(data_stream, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DATA_STREAM_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_debug_t
#define MAVLINK_MSG_ID_DEBUG_LEN 9
#define MAVLINK_MSG_ID_254_LEN 9
#define MAVLINK_MSG_ID_DEBUG_CRC 46
#define MAVLINK_MSG_ID_254_CRC 46
#define MAVLINK_MESSAGE_INFO_DEBUG { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_debug_pack(uint8_t system_id, uint8_t compone
uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_DEBUG_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_LEN);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message(msg, system_id, component_id, 9, 46);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_debug_pack_chan(uint8_t system_id, uint8_t co
uint32_t time_boot_ms,uint8_t ind,float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_DEBUG_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_LEN);
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 46);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_debug_encode(uint8_t system_id, uint8_t compo
static inline void mavlink_msg_debug_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ind, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_DEBUG_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_uint8_t(buf, 8, ind);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, 9, 46);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, buf, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
#else
mavlink_debug_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
packet.ind = ind;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (const char *)&packet, 9, 46);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (const char *)&packet, MAVLINK_MSG_ID_DEBUG_LEN, MAVLINK_MSG_ID_DEBUG_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG, (const char *)&packet, MAVLINK_MSG_ID_DEBUG_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_debug_decode(const mavlink_message_t* msg, mavlin
debug->value = mavlink_msg_debug_get_value(msg);
debug->ind = mavlink_msg_debug_get_ind(msg);
#else
memcpy(debug, _MAV_PAYLOAD(msg), 9);
memcpy(debug, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DEBUG_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_debug_vect_t
#define MAVLINK_MSG_ID_DEBUG_VECT_LEN 30
#define MAVLINK_MSG_ID_250_LEN 30
#define MAVLINK_MSG_ID_DEBUG_VECT_CRC 49
#define MAVLINK_MSG_ID_250_CRC 49
#define MAVLINK_MSG_DEBUG_VECT_FIELD_NAME_LEN 10
#define MAVLINK_MESSAGE_INFO_DEBUG_VECT { \
@ -45,13 +48,13 @@ static inline uint16_t mavlink_msg_debug_vect_pack(uint8_t system_id, uint8_t co
const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_DEBUG_VECT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
@ -59,11 +62,15 @@ static inline uint16_t mavlink_msg_debug_vect_pack(uint8_t system_id, uint8_t co
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 49);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEBUG_VECT_LEN, MAVLINK_MSG_ID_DEBUG_VECT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
}
/**
@ -84,13 +91,13 @@ static inline uint16_t mavlink_msg_debug_vect_pack_chan(uint8_t system_id, uint8
const char *name,uint64_t time_usec,float x,float y,float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_DEBUG_VECT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
@ -98,11 +105,15 @@ static inline uint16_t mavlink_msg_debug_vect_pack_chan(uint8_t system_id, uint8
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_DEBUG_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 49);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEBUG_VECT_LEN, MAVLINK_MSG_ID_DEBUG_VECT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
}
/**
@ -133,13 +144,17 @@ static inline uint16_t mavlink_msg_debug_vect_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_debug_vect_send(mavlink_channel_t chan, const char *name, uint64_t time_usec, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_DEBUG_VECT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
_mav_put_float(buf, 16, z);
_mav_put_char_array(buf, 20, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, buf, 30, 49);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, buf, MAVLINK_MSG_ID_DEBUG_VECT_LEN, MAVLINK_MSG_ID_DEBUG_VECT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, buf, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
#else
mavlink_debug_vect_t packet;
packet.time_usec = time_usec;
@ -147,7 +162,11 @@ static inline void mavlink_msg_debug_vect_send(mavlink_channel_t chan, const cha
packet.y = y;
packet.z = z;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, (const char *)&packet, 30, 49);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, (const char *)&packet, MAVLINK_MSG_ID_DEBUG_VECT_LEN, MAVLINK_MSG_ID_DEBUG_VECT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEBUG_VECT, (const char *)&packet, MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
#endif
}
@ -221,6 +240,6 @@ static inline void mavlink_msg_debug_vect_decode(const mavlink_message_t* msg, m
debug_vect->z = mavlink_msg_debug_vect_get_z(msg);
mavlink_msg_debug_vect_get_name(msg, debug_vect->name);
#else
memcpy(debug_vect, _MAV_PAYLOAD(msg), 30);
memcpy(debug_vect, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_DEBUG_VECT_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_file_transfer_dir_list_t
#define MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN 249
#define MAVLINK_MSG_ID_111_LEN 249
#define MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_CRC 93
#define MAVLINK_MSG_ID_111_CRC 93
#define MAVLINK_MSG_FILE_TRANSFER_DIR_LIST_FIELD_DIR_PATH_LEN 240
#define MAVLINK_MESSAGE_INFO_FILE_TRANSFER_DIR_LIST { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_pack(uint8_t system_id
uint64_t transfer_uid, const char *dir_path, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[249];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 248, flags);
_mav_put_char_array(buf, 8, dir_path, 240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 249);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#else
mavlink_file_transfer_dir_list_t packet;
packet.transfer_uid = transfer_uid;
packet.flags = flags;
mav_array_memcpy(packet.dir_path, dir_path, sizeof(char)*240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 249);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 249, 93);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_pack_chan(uint8_t syst
uint64_t transfer_uid,const char *dir_path,uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[249];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 248, flags);
_mav_put_char_array(buf, 8, dir_path, 240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 249);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#else
mavlink_file_transfer_dir_list_t packet;
packet.transfer_uid = transfer_uid;
packet.flags = flags;
mav_array_memcpy(packet.dir_path, dir_path, sizeof(char)*240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 249);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 249, 93);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_encode(uint8_t system_
static inline void mavlink_msg_file_transfer_dir_list_send(mavlink_channel_t chan, uint64_t transfer_uid, const char *dir_path, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[249];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 248, flags);
_mav_put_char_array(buf, 8, dir_path, 240);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, buf, 249, 93);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, buf, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, buf, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
#else
mavlink_file_transfer_dir_list_t packet;
packet.transfer_uid = transfer_uid;
packet.flags = flags;
mav_array_memcpy(packet.dir_path, dir_path, sizeof(char)*240);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, (const char *)&packet, 249, 93);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_file_transfer_dir_list_decode(const mavlink_messa
mavlink_msg_file_transfer_dir_list_get_dir_path(msg, file_transfer_dir_list->dir_path);
file_transfer_dir_list->flags = mavlink_msg_file_transfer_dir_list_get_flags(msg);
#else
memcpy(file_transfer_dir_list, _MAV_PAYLOAD(msg), 249);
memcpy(file_transfer_dir_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FILE_TRANSFER_DIR_LIST_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_file_transfer_res_t
#define MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN 9
#define MAVLINK_MSG_ID_112_LEN 9
#define MAVLINK_MSG_ID_FILE_TRANSFER_RES_CRC 124
#define MAVLINK_MSG_ID_112_CRC 124
#define MAVLINK_MESSAGE_INFO_FILE_TRANSFER_RES { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_file_transfer_res_pack(uint8_t system_id, uin
uint64_t transfer_uid, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 8, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#else
mavlink_file_transfer_res_t packet;
packet.transfer_uid = transfer_uid;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_RES;
return mavlink_finalize_message(msg, system_id, component_id, 9, 124);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_RES_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_file_transfer_res_pack_chan(uint8_t system_id
uint64_t transfer_uid,uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 8, result);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#else
mavlink_file_transfer_res_t packet;
packet.transfer_uid = transfer_uid;
packet.result = result;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_RES;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 124);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_RES_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_file_transfer_res_encode(uint8_t system_id, u
static inline void mavlink_msg_file_transfer_res_send(mavlink_channel_t chan, uint64_t transfer_uid, uint8_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint8_t(buf, 8, result);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, buf, 9, 124);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, buf, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_RES_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, buf, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
#else
mavlink_file_transfer_res_t packet;
packet.transfer_uid = transfer_uid;
packet.result = result;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, (const char *)&packet, 9, 124);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_RES_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_RES, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_file_transfer_res_decode(const mavlink_message_t*
file_transfer_res->transfer_uid = mavlink_msg_file_transfer_res_get_transfer_uid(msg);
file_transfer_res->result = mavlink_msg_file_transfer_res_get_result(msg);
#else
memcpy(file_transfer_res, _MAV_PAYLOAD(msg), 9);
memcpy(file_transfer_res, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FILE_TRANSFER_RES_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_file_transfer_start_t
#define MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN 254
#define MAVLINK_MSG_ID_110_LEN 254
#define MAVLINK_MSG_ID_FILE_TRANSFER_START_CRC 235
#define MAVLINK_MSG_ID_110_CRC 235
#define MAVLINK_MSG_FILE_TRANSFER_START_FIELD_DEST_PATH_LEN 240
#define MAVLINK_MESSAGE_INFO_FILE_TRANSFER_START { \
@ -45,13 +48,13 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack(uint8_t system_id, u
uint64_t transfer_uid, const char *dest_path, uint8_t direction, uint32_t file_size, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[254];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint32_t(buf, 8, file_size);
_mav_put_uint8_t(buf, 252, direction);
_mav_put_uint8_t(buf, 253, flags);
_mav_put_char_array(buf, 12, dest_path, 240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 254);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#else
mavlink_file_transfer_start_t packet;
packet.transfer_uid = transfer_uid;
@ -59,11 +62,15 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack(uint8_t system_id, u
packet.direction = direction;
packet.flags = flags;
mav_array_memcpy(packet.dest_path, dest_path, sizeof(char)*240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 254);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_START;
return mavlink_finalize_message(msg, system_id, component_id, 254, 235);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_START_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
}
/**
@ -84,13 +91,13 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack_chan(uint8_t system_
uint64_t transfer_uid,const char *dest_path,uint8_t direction,uint32_t file_size,uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[254];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint32_t(buf, 8, file_size);
_mav_put_uint8_t(buf, 252, direction);
_mav_put_uint8_t(buf, 253, flags);
_mav_put_char_array(buf, 12, dest_path, 240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 254);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#else
mavlink_file_transfer_start_t packet;
packet.transfer_uid = transfer_uid;
@ -98,11 +105,15 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack_chan(uint8_t system_
packet.direction = direction;
packet.flags = flags;
mav_array_memcpy(packet.dest_path, dest_path, sizeof(char)*240);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 254);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_FILE_TRANSFER_START;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 254, 235);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_START_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
}
/**
@ -133,13 +144,17 @@ static inline uint16_t mavlink_msg_file_transfer_start_encode(uint8_t system_id,
static inline void mavlink_msg_file_transfer_start_send(mavlink_channel_t chan, uint64_t transfer_uid, const char *dest_path, uint8_t direction, uint32_t file_size, uint8_t flags)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[254];
char buf[MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN];
_mav_put_uint64_t(buf, 0, transfer_uid);
_mav_put_uint32_t(buf, 8, file_size);
_mav_put_uint8_t(buf, 252, direction);
_mav_put_uint8_t(buf, 253, flags);
_mav_put_char_array(buf, 12, dest_path, 240);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, buf, 254, 235);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, buf, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_START_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, buf, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
#else
mavlink_file_transfer_start_t packet;
packet.transfer_uid = transfer_uid;
@ -147,7 +162,11 @@ static inline void mavlink_msg_file_transfer_start_send(mavlink_channel_t chan,
packet.direction = direction;
packet.flags = flags;
mav_array_memcpy(packet.dest_path, dest_path, sizeof(char)*240);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, (const char *)&packet, 254, 235);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN, MAVLINK_MSG_ID_FILE_TRANSFER_START_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FILE_TRANSFER_START, (const char *)&packet, MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
#endif
}
@ -221,6 +240,6 @@ static inline void mavlink_msg_file_transfer_start_decode(const mavlink_message_
file_transfer_start->direction = mavlink_msg_file_transfer_start_get_direction(msg);
file_transfer_start->flags = mavlink_msg_file_transfer_start_get_flags(msg);
#else
memcpy(file_transfer_start, _MAV_PAYLOAD(msg), 254);
memcpy(file_transfer_start, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_FILE_TRANSFER_START_LEN);
#endif
}

View File

@ -12,12 +12,15 @@ typedef struct __mavlink_global_position_int_t
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
} mavlink_global_position_int_t;
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN 28
#define MAVLINK_MSG_ID_33_LEN 28
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_CRC 104
#define MAVLINK_MSG_ID_33_CRC 104
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT { \
@ -50,14 +53,14 @@ typedef struct __mavlink_global_position_int_t
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
@ -68,7 +71,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
@ -81,11 +84,15 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
packet.vz = vz;
packet.hdg = hdg;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message(msg, system_id, component_id, 28, 104);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
}
/**
@ -102,7 +109,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -110,7 +117,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_
uint32_t time_boot_ms,int32_t lat,int32_t lon,int32_t alt,int32_t relative_alt,int16_t vx,int16_t vy,int16_t vz,uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
@ -121,7 +128,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
@ -134,11 +141,15 @@ static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_
packet.vz = vz;
packet.hdg = hdg;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 104);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
}
/**
@ -166,14 +177,14 @@ static inline uint16_t mavlink_msg_global_position_int_encode(uint8_t system_id,
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_global_position_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, uint16_t hdg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, lat);
_mav_put_int32_t(buf, 8, lon);
@ -184,7 +195,11 @@ static inline void mavlink_msg_global_position_int_send(mavlink_channel_t chan,
_mav_put_int16_t(buf, 24, vz);
_mav_put_uint16_t(buf, 26, hdg);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, buf, 28, 104);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
#else
mavlink_global_position_int_t packet;
packet.time_boot_ms = time_boot_ms;
@ -197,7 +212,11 @@ static inline void mavlink_msg_global_position_int_send(mavlink_channel_t chan,
packet.vz = vz;
packet.hdg = hdg;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, (const char *)&packet, 28, 104);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
#endif
}
@ -289,7 +308,7 @@ static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_messa
/**
* @brief Get field hdg from global_position_int message
*
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
*/
static inline uint16_t mavlink_msg_global_position_int_get_hdg(const mavlink_message_t* msg)
{
@ -315,6 +334,6 @@ static inline void mavlink_msg_global_position_int_decode(const mavlink_message_
global_position_int->vz = mavlink_msg_global_position_int_get_vz(msg);
global_position_int->hdg = mavlink_msg_global_position_int_get_hdg(msg);
#else
memcpy(global_position_int, _MAV_PAYLOAD(msg), 28);
memcpy(global_position_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN);
#endif
}

View File

@ -4,9 +4,9 @@
typedef struct __mavlink_global_position_setpoint_int_t
{
int32_t latitude; ///< WGS84 Latitude position in degrees * 1E7
int32_t longitude; ///< WGS84 Longitude position in degrees * 1E7
int32_t altitude; ///< WGS84 Altitude in meters * 1000 (positive for up)
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
int32_t longitude; ///< Longitude (WGS84), in degrees * 1E7
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
int16_t yaw; ///< Desired yaw angle in degrees * 100
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
} mavlink_global_position_setpoint_int_t;
@ -14,6 +14,9 @@ typedef struct __mavlink_global_position_setpoint_int_t
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN 15
#define MAVLINK_MSG_ID_52_LEN 15
#define MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_CRC 141
#define MAVLINK_MSG_ID_52_CRC 141
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_SETPOINT_INT { \
@ -35,9 +38,9 @@ typedef struct __mavlink_global_position_setpoint_int_t
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t sys
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t sys
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message(msg, system_id, component_id, 15, 141);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}
/**
@ -75,9 +82,9 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t sys
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack_chan(uint8_
uint8_t coordinate_frame,int32_t latitude,int32_t longitude,int32_t altitude,int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack_chan(uint8_
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 141);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}
/**
@ -127,9 +138,9 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_encode(uint8_t s
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_encode(uint8_t s
static inline void mavlink_msg_global_position_setpoint_int_send(mavlink_channel_t chan, uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, buf, 15, 141);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
#else
mavlink_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -153,7 +168,11 @@ static inline void mavlink_msg_global_position_setpoint_int_send(mavlink_channel
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, 15, 141);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
#endif
}
@ -175,7 +194,7 @@ static inline uint8_t mavlink_msg_global_position_setpoint_int_get_coordinate_fr
/**
* @brief Get field latitude from global_position_setpoint_int message
*
* @return WGS84 Latitude position in degrees * 1E7
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_latitude(const mavlink_message_t* msg)
{
@ -185,7 +204,7 @@ static inline int32_t mavlink_msg_global_position_setpoint_int_get_latitude(cons
/**
* @brief Get field longitude from global_position_setpoint_int message
*
* @return WGS84 Longitude position in degrees * 1E7
* @return Longitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_longitude(const mavlink_message_t* msg)
{
@ -195,7 +214,7 @@ static inline int32_t mavlink_msg_global_position_setpoint_int_get_longitude(con
/**
* @brief Get field altitude from global_position_setpoint_int message
*
* @return WGS84 Altitude in meters * 1000 (positive for up)
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_global_position_setpoint_int_get_altitude(const mavlink_message_t* msg)
{
@ -227,6 +246,6 @@ static inline void mavlink_msg_global_position_setpoint_int_decode(const mavlink
global_position_setpoint_int->yaw = mavlink_msg_global_position_setpoint_int_get_yaw(msg);
global_position_setpoint_int->coordinate_frame = mavlink_msg_global_position_setpoint_int_get_coordinate_frame(msg);
#else
memcpy(global_position_setpoint_int, _MAV_PAYLOAD(msg), 15);
memcpy(global_position_setpoint_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_global_vision_position_estimate_t
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN 32
#define MAVLINK_MSG_ID_101_LEN 32
#define MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_CRC 102
#define MAVLINK_MSG_ID_101_CRC 102
#define MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t
uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message(msg, system_id, component_id, 32, 102);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uin
uint64_t usec,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uin
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uin
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 102);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_encode(uint8_
static inline void mavlink_msg_global_vision_position_estimate_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[32];
char buf[MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN];
_mav_put_uint64_t(buf, 0, usec);
_mav_put_float(buf, 8, x);
_mav_put_float(buf, 12, y);
@ -164,7 +175,11 @@ static inline void mavlink_msg_global_vision_position_estimate_send(mavlink_chan
_mav_put_float(buf, 24, pitch);
_mav_put_float(buf, 28, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, buf, 32, 102);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, buf, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, buf, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
#else
mavlink_global_vision_position_estimate_t packet;
packet.usec = usec;
@ -175,7 +190,11 @@ static inline void mavlink_msg_global_vision_position_estimate_send(mavlink_chan
packet.pitch = pitch;
packet.yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, (const char *)&packet, 32, 102);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_global_vision_position_estimate_decode(const mavl
global_vision_position_estimate->pitch = mavlink_msg_global_vision_position_estimate_get_pitch(msg);
global_vision_position_estimate->yaw = mavlink_msg_global_vision_position_estimate_get_yaw(msg);
#else
memcpy(global_vision_position_estimate, _MAV_PAYLOAD(msg), 32);
memcpy(global_vision_position_estimate, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE_LEN);
#endif
}

View File

@ -4,14 +4,17 @@
typedef struct __mavlink_gps_global_origin_t
{
int32_t latitude; ///< Latitude (WGS84), expressed as * 1E7
int32_t longitude; ///< Longitude (WGS84), expressed as * 1E7
int32_t altitude; ///< Altitude(WGS84), expressed as * 1000
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
int32_t longitude; ///< Longitude (WGS84), in degrees * 1E7
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
} mavlink_gps_global_origin_t;
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12
#define MAVLINK_MSG_ID_49_LEN 12
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC 39
#define MAVLINK_MSG_ID_49_CRC 39
#define MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN { \
@ -30,32 +33,36 @@ typedef struct __mavlink_gps_global_origin_t
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message(msg, system_id, component_id, 12, 39);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
}
/**
@ -64,9 +71,9 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id
int32_t latitude,int32_t longitude,int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 12);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 39);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
}
/**
@ -110,28 +121,36 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, u
* @brief Send a gps_global_origin message
* @param chan MAVLink channel to send the message
*
* @param latitude Latitude (WGS84), expressed as * 1E7
* @param longitude Longitude (WGS84), expressed as * 1E7
* @param altitude Altitude(WGS84), expressed as * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[12];
char buf[MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, 12, 39);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
#else
mavlink_gps_global_origin_t packet;
packet.latitude = latitude;
packet.longitude = longitude;
packet.altitude = altitude;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, 12, 39);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
#endif
}
@ -143,7 +162,7 @@ static inline void mavlink_msg_gps_global_origin_send(mavlink_channel_t chan, in
/**
* @brief Get field latitude from gps_global_origin message
*
* @return Latitude (WGS84), expressed as * 1E7
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_latitude(const mavlink_message_t* msg)
{
@ -153,7 +172,7 @@ static inline int32_t mavlink_msg_gps_global_origin_get_latitude(const mavlink_m
/**
* @brief Get field longitude from gps_global_origin message
*
* @return Longitude (WGS84), expressed as * 1E7
* @return Longitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_gps_global_origin_get_longitude(const mavlink_message_t* msg)
{
@ -163,7 +182,7 @@ static inline int32_t mavlink_msg_gps_global_origin_get_longitude(const mavlink_
/**
* @brief Get field altitude from gps_global_origin message
*
* @return Altitude(WGS84), expressed as * 1000
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_message_t* msg)
{
@ -183,6 +202,6 @@ static inline void mavlink_msg_gps_global_origin_decode(const mavlink_message_t*
gps_global_origin->longitude = mavlink_msg_gps_global_origin_get_longitude(msg);
gps_global_origin->altitude = mavlink_msg_gps_global_origin_get_altitude(msg);
#else
memcpy(gps_global_origin, _MAV_PAYLOAD(msg), 12);
memcpy(gps_global_origin, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN);
#endif
}

View File

@ -5,13 +5,13 @@
typedef struct __mavlink_gps_raw_int_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int32_t lat; ///< Latitude in 1E7 degrees
int32_t lon; ///< Longitude in 1E7 degrees
int32_t alt; ///< Altitude in 1E3 meters (millimeters) above MSL
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
} mavlink_gps_raw_int_t;
@ -19,6 +19,9 @@ typedef struct __mavlink_gps_raw_int_t
#define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 30
#define MAVLINK_MSG_ID_24_LEN 30
#define MAVLINK_MSG_ID_GPS_RAW_INT_CRC 24
#define MAVLINK_MSG_ID_24_CRC 24
#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
@ -46,13 +49,13 @@ typedef struct __mavlink_gps_raw_int_t
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message(msg, system_id, component_id, 30, 24);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
}
/**
@ -101,13 +108,13 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint
uint64_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,uint16_t cog,uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 30);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 30, 24);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
}
/**
@ -168,13 +179,13 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude in 1E7 degrees
* @param lon Longitude in 1E7 degrees
* @param alt Altitude in 1E3 meters (millimeters) above MSL
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
* @param satellites_visible Number of satellites visible. If unknown, set to 255
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_gps_raw_int_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[30];
char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
@ -194,7 +205,11 @@ static inline void mavlink_msg_gps_raw_int_send(mavlink_channel_t chan, uint64_t
_mav_put_uint8_t(buf, 28, fix_type);
_mav_put_uint8_t(buf, 29, satellites_visible);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, 30, 24);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
#else
mavlink_gps_raw_int_t packet;
packet.time_usec = time_usec;
@ -208,7 +223,11 @@ static inline void mavlink_msg_gps_raw_int_send(mavlink_channel_t chan, uint64_t
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (const char *)&packet, 30, 24);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (const char *)&packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (const char *)&packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
#endif
}
@ -240,7 +259,7 @@ static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(const mavlink_message
/**
* @brief Get field lat from gps_raw_int message
*
* @return Latitude in 1E7 degrees
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t* msg)
{
@ -250,7 +269,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t* m
/**
* @brief Get field lon from gps_raw_int message
*
* @return Longitude in 1E7 degrees
* @return Longitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* msg)
{
@ -260,7 +279,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* m
/**
* @brief Get field alt from gps_raw_int message
*
* @return Altitude in 1E3 meters (millimeters) above MSL
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* msg)
{
@ -270,7 +289,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* m
/**
* @brief Get field eph from gps_raw_int message
*
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg)
{
@ -280,7 +299,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t*
/**
* @brief Get field epv from gps_raw_int message
*
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg)
{
@ -290,7 +309,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t*
/**
* @brief Get field vel from gps_raw_int message
*
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
* @return GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t* msg)
{
@ -300,7 +319,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t*
/**
* @brief Get field cog from gps_raw_int message
*
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
*/
static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t* msg)
{
@ -337,6 +356,6 @@ static inline void mavlink_msg_gps_raw_int_decode(const mavlink_message_t* msg,
gps_raw_int->fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
gps_raw_int->satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
#else
memcpy(gps_raw_int, _MAV_PAYLOAD(msg), 30);
memcpy(gps_raw_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_gps_status_t
#define MAVLINK_MSG_ID_GPS_STATUS_LEN 101
#define MAVLINK_MSG_ID_25_LEN 101
#define MAVLINK_MSG_ID_GPS_STATUS_CRC 23
#define MAVLINK_MSG_ID_25_CRC 23
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_PRN_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_USED_LEN 20
#define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_ELEVATION_LEN 20
@ -52,14 +55,14 @@ static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t co
uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
char buf[MAVLINK_MSG_ID_GPS_STATUS_LEN];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
@ -68,11 +71,15 @@ static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t co
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message(msg, system_id, component_id, 101, 23);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_STATUS_LEN, MAVLINK_MSG_ID_GPS_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
}
/**
@ -94,14 +101,14 @@ static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8
uint8_t satellites_visible,const uint8_t *satellite_prn,const uint8_t *satellite_used,const uint8_t *satellite_elevation,const uint8_t *satellite_azimuth,const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
char buf[MAVLINK_MSG_ID_GPS_STATUS_LEN];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 101);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 101);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_GPS_STATUS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 101, 23);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_STATUS_LEN, MAVLINK_MSG_ID_GPS_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
}
/**
@ -146,14 +157,18 @@ static inline uint16_t mavlink_msg_gps_status_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_gps_status_send(mavlink_channel_t chan, uint8_t satellites_visible, const uint8_t *satellite_prn, const uint8_t *satellite_used, const uint8_t *satellite_elevation, const uint8_t *satellite_azimuth, const uint8_t *satellite_snr)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[101];
char buf[MAVLINK_MSG_ID_GPS_STATUS_LEN];
_mav_put_uint8_t(buf, 0, satellites_visible);
_mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
_mav_put_uint8_t_array(buf, 21, satellite_used, 20);
_mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
_mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
_mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, buf, 101, 23);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, buf, MAVLINK_MSG_ID_GPS_STATUS_LEN, MAVLINK_MSG_ID_GPS_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, buf, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
#else
mavlink_gps_status_t packet;
packet.satellites_visible = satellites_visible;
@ -162,7 +177,11 @@ static inline void mavlink_msg_gps_status_send(mavlink_channel_t chan, uint8_t s
mav_array_memcpy(packet.satellite_elevation, satellite_elevation, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_azimuth, satellite_azimuth, sizeof(uint8_t)*20);
mav_array_memcpy(packet.satellite_snr, satellite_snr, sizeof(uint8_t)*20);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, (const char *)&packet, 101, 23);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GPS_STATUS_LEN, MAVLINK_MSG_ID_GPS_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
#endif
}
@ -247,6 +266,6 @@ static inline void mavlink_msg_gps_status_decode(const mavlink_message_t* msg, m
mavlink_msg_gps_status_get_satellite_azimuth(msg, gps_status->satellite_azimuth);
mavlink_msg_gps_status_get_satellite_snr(msg, gps_status->satellite_snr);
#else
memcpy(gps_status, _MAV_PAYLOAD(msg), 101);
memcpy(gps_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS_STATUS_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_heartbeat_t
#define MAVLINK_MSG_ID_HEARTBEAT_LEN 9
#define MAVLINK_MSG_ID_0_LEN 9
#define MAVLINK_MSG_ID_HEARTBEAT_CRC 50
#define MAVLINK_MSG_ID_0_CRC 50
#define MAVLINK_MESSAGE_INFO_HEARTBEAT { \
@ -47,7 +50,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t com
uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_HEARTBEAT_LEN];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
@ -55,7 +58,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t com
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
@ -65,11 +68,15 @@ static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t com
packet.system_status = system_status;
packet.mavlink_version = 3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message(msg, system_id, component_id, 9, 50);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
}
/**
@ -90,7 +97,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_
uint8_t type,uint8_t autopilot,uint8_t base_mode,uint32_t custom_mode,uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_HEARTBEAT_LEN];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
@ -108,11 +115,15 @@ static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_
packet.system_status = system_status;
packet.mavlink_version = 3;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 9);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 9, 50);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
}
/**
@ -143,7 +154,7 @@ static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t c
static inline void mavlink_msg_heartbeat_send(mavlink_channel_t chan, uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[9];
char buf[MAVLINK_MSG_ID_HEARTBEAT_LEN];
_mav_put_uint32_t(buf, 0, custom_mode);
_mav_put_uint8_t(buf, 4, type);
_mav_put_uint8_t(buf, 5, autopilot);
@ -151,7 +162,11 @@ static inline void mavlink_msg_heartbeat_send(mavlink_channel_t chan, uint8_t ty
_mav_put_uint8_t(buf, 7, system_status);
_mav_put_uint8_t(buf, 8, 3);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, 9, 50);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
#else
mavlink_heartbeat_t packet;
packet.custom_mode = custom_mode;
@ -161,7 +176,11 @@ static inline void mavlink_msg_heartbeat_send(mavlink_channel_t chan, uint8_t ty
packet.system_status = system_status;
packet.mavlink_version = 3;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, 9, 50);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
#endif
}
@ -246,6 +265,6 @@ static inline void mavlink_msg_heartbeat_decode(const mavlink_message_t* msg, ma
heartbeat->system_status = mavlink_msg_heartbeat_get_system_status(msg);
heartbeat->mavlink_version = mavlink_msg_heartbeat_get_mavlink_version(msg);
#else
memcpy(heartbeat, _MAV_PAYLOAD(msg), 9);
memcpy(heartbeat, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HEARTBEAT_LEN);
#endif
}

View File

@ -24,6 +24,9 @@ typedef struct __mavlink_highres_imu_t
#define MAVLINK_MSG_ID_HIGHRES_IMU_LEN 62
#define MAVLINK_MSG_ID_105_LEN 62
#define MAVLINK_MSG_ID_HIGHRES_IMU_CRC 93
#define MAVLINK_MSG_ID_105_CRC 93
#define MAVLINK_MESSAGE_INFO_HIGHRES_IMU { \
@ -75,7 +78,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t c
uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint16_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[62];
char buf[MAVLINK_MSG_ID_HIGHRES_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
@ -92,7 +95,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t c
_mav_put_float(buf, 56, temperature);
_mav_put_uint16_t(buf, 60, fields_updated);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 62);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#else
mavlink_highres_imu_t packet;
packet.time_usec = time_usec;
@ -111,11 +114,15 @@ static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t c
packet.temperature = temperature;
packet.fields_updated = fields_updated;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 62);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIGHRES_IMU;
return mavlink_finalize_message(msg, system_id, component_id, 62, 93);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIGHRES_IMU_LEN, MAVLINK_MSG_ID_HIGHRES_IMU_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
}
/**
@ -146,7 +153,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack_chan(uint8_t system_id, uint
uint64_t time_usec,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,float xmag,float ymag,float zmag,float abs_pressure,float diff_pressure,float pressure_alt,float temperature,uint16_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[62];
char buf[MAVLINK_MSG_ID_HIGHRES_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
@ -163,7 +170,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack_chan(uint8_t system_id, uint
_mav_put_float(buf, 56, temperature);
_mav_put_uint16_t(buf, 60, fields_updated);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 62);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#else
mavlink_highres_imu_t packet;
packet.time_usec = time_usec;
@ -182,11 +189,15 @@ static inline uint16_t mavlink_msg_highres_imu_pack_chan(uint8_t system_id, uint
packet.temperature = temperature;
packet.fields_updated = fields_updated;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 62);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIGHRES_IMU;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 62, 93);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIGHRES_IMU_LEN, MAVLINK_MSG_ID_HIGHRES_IMU_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
}
/**
@ -227,7 +238,7 @@ static inline uint16_t mavlink_msg_highres_imu_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_highres_imu_send(mavlink_channel_t chan, uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint16_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[62];
char buf[MAVLINK_MSG_ID_HIGHRES_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
@ -244,7 +255,11 @@ static inline void mavlink_msg_highres_imu_send(mavlink_channel_t chan, uint64_t
_mav_put_float(buf, 56, temperature);
_mav_put_uint16_t(buf, 60, fields_updated);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, buf, 62, 93);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, buf, MAVLINK_MSG_ID_HIGHRES_IMU_LEN, MAVLINK_MSG_ID_HIGHRES_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, buf, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
#else
mavlink_highres_imu_t packet;
packet.time_usec = time_usec;
@ -263,7 +278,11 @@ static inline void mavlink_msg_highres_imu_send(mavlink_channel_t chan, uint64_t
packet.temperature = temperature;
packet.fields_updated = fields_updated;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, (const char *)&packet, 62, 93);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, (const char *)&packet, MAVLINK_MSG_ID_HIGHRES_IMU_LEN, MAVLINK_MSG_ID_HIGHRES_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIGHRES_IMU, (const char *)&packet, MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
#endif
}
@ -447,6 +466,6 @@ static inline void mavlink_msg_highres_imu_decode(const mavlink_message_t* msg,
highres_imu->temperature = mavlink_msg_highres_imu_get_temperature(msg);
highres_imu->fields_updated = mavlink_msg_highres_imu_get_fields_updated(msg);
#else
memcpy(highres_imu, _MAV_PAYLOAD(msg), 62);
memcpy(highres_imu, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIGHRES_IMU_LEN);
#endif
}

View File

@ -20,6 +20,9 @@ typedef struct __mavlink_hil_controls_t
#define MAVLINK_MSG_ID_HIL_CONTROLS_LEN 42
#define MAVLINK_MSG_ID_91_LEN 42
#define MAVLINK_MSG_ID_HIL_CONTROLS_CRC 63
#define MAVLINK_MSG_ID_91_CRC 63
#define MAVLINK_MESSAGE_INFO_HIL_CONTROLS { \
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t
uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t
packet.mode = mode;
packet.nav_mode = nav_mode;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message(msg, system_id, component_id, 42, 63);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
}
/**
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uin
uint64_t time_usec,float roll_ailerons,float pitch_elevator,float yaw_rudder,float throttle,float aux1,float aux2,float aux3,float aux4,uint8_t mode,uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uin
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uin
packet.mode = mode;
packet.nav_mode = nav_mode;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 42);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 42, 63);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
}
/**
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_t time_usec, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, float aux1, float aux2, float aux3, float aux4, uint8_t mode, uint8_t nav_mode)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[42];
char buf[MAVLINK_MSG_ID_HIL_CONTROLS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll_ailerons);
_mav_put_float(buf, 12, pitch_elevator);
@ -204,7 +215,11 @@ static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_
_mav_put_uint8_t(buf, 40, mode);
_mav_put_uint8_t(buf, 41, nav_mode);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, 42, 63);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, buf, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
#else
mavlink_hil_controls_t packet;
packet.time_usec = time_usec;
@ -219,7 +234,11 @@ static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_
packet.mode = mode;
packet.nav_mode = nav_mode;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (const char *)&packet, 42, 63);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (const char *)&packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_CONTROLS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_CONTROLS, (const char *)&packet, MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
#endif
}
@ -359,6 +378,6 @@ static inline void mavlink_msg_hil_controls_decode(const mavlink_message_t* msg,
hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
#else
memcpy(hil_controls, _MAV_PAYLOAD(msg), 42);
memcpy(hil_controls, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_CONTROLS_LEN);
#endif
}

View File

@ -0,0 +1,427 @@
// MESSAGE HIL_GPS PACKING
#define MAVLINK_MSG_ID_HIL_GPS 113
typedef struct __mavlink_hil_gps_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
int16_t vn; ///< GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
int16_t ve; ///< GPS velocity in cm/s in EAST direction in earth-fixed NED frame
int16_t vd; ///< GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
} mavlink_hil_gps_t;
#define MAVLINK_MSG_ID_HIL_GPS_LEN 36
#define MAVLINK_MSG_ID_113_LEN 36
#define MAVLINK_MSG_ID_HIL_GPS_CRC 124
#define MAVLINK_MSG_ID_113_CRC 124
#define MAVLINK_MESSAGE_INFO_HIL_GPS { \
"HIL_GPS", \
13, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_gps_t, time_usec) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_hil_gps_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_hil_gps_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_hil_gps_t, alt) }, \
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_hil_gps_t, eph) }, \
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_hil_gps_t, epv) }, \
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_hil_gps_t, vel) }, \
{ "vn", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_hil_gps_t, vn) }, \
{ "ve", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_hil_gps_t, ve) }, \
{ "vd", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_hil_gps_t, vd) }, \
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_hil_gps_t, cog) }, \
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_hil_gps_t, fix_type) }, \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_hil_gps_t, satellites_visible) }, \
} \
}
/**
* @brief Pack a hil_gps message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_gps_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_int16_t(buf, 26, vn);
_mav_put_int16_t(buf, 28, ve);
_mav_put_int16_t(buf, 30, vd);
_mav_put_uint16_t(buf, 32, cog);
_mav_put_uint8_t(buf, 34, fix_type);
_mav_put_uint8_t(buf, 35, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
#else
mavlink_hil_gps_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.vn = vn;
packet.ve = ve;
packet.vd = vd;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_GPS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
}
/**
* @brief Pack a hil_gps message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,int16_t vn,int16_t ve,int16_t vd,uint16_t cog,uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_int16_t(buf, 26, vn);
_mav_put_int16_t(buf, 28, ve);
_mav_put_int16_t(buf, 30, vd);
_mav_put_uint16_t(buf, 32, cog);
_mav_put_uint8_t(buf, 34, fix_type);
_mav_put_uint8_t(buf, 35, satellites_visible);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
#else
mavlink_hil_gps_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.vn = vn;
packet.ve = ve;
packet.vd = vd;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_GPS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
}
/**
* @brief Encode a hil_gps struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_gps C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_gps_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_gps_t* hil_gps)
{
return mavlink_msg_hil_gps_pack(system_id, component_id, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
}
/**
* @brief Send a hil_gps message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat Latitude (WGS84), in degrees * 1E7
* @param lon Longitude (WGS84), in degrees * 1E7
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int32_t(buf, 8, lat);
_mav_put_int32_t(buf, 12, lon);
_mav_put_int32_t(buf, 16, alt);
_mav_put_uint16_t(buf, 20, eph);
_mav_put_uint16_t(buf, 22, epv);
_mav_put_uint16_t(buf, 24, vel);
_mav_put_int16_t(buf, 26, vn);
_mav_put_int16_t(buf, 28, ve);
_mav_put_int16_t(buf, 30, vd);
_mav_put_uint16_t(buf, 32, cog);
_mav_put_uint8_t(buf, 34, fix_type);
_mav_put_uint8_t(buf, 35, satellites_visible);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
#else
mavlink_hil_gps_t packet;
packet.time_usec = time_usec;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.eph = eph;
packet.epv = epv;
packet.vel = vel;
packet.vn = vn;
packet.ve = ve;
packet.vd = vd;
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)&packet, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)&packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
#endif
}
#endif
// MESSAGE HIL_GPS UNPACKING
/**
* @brief Get field time_usec from hil_gps message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_gps_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field fix_type from hil_gps message
*
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
*/
static inline uint8_t mavlink_msg_hil_gps_get_fix_type(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 34);
}
/**
* @brief Get field lat from hil_gps message
*
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_hil_gps_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
}
/**
* @brief Get field lon from hil_gps message
*
* @return Longitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_hil_gps_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
}
/**
* @brief Get field alt from hil_gps message
*
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_hil_gps_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
}
/**
* @brief Get field eph from hil_gps message
*
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_hil_gps_get_eph(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 20);
}
/**
* @brief Get field epv from hil_gps message
*
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_hil_gps_get_epv(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 22);
}
/**
* @brief Get field vel from hil_gps message
*
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_hil_gps_get_vel(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 24);
}
/**
* @brief Get field vn from hil_gps message
*
* @return GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_vn(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 26);
}
/**
* @brief Get field ve from hil_gps message
*
* @return GPS velocity in cm/s in EAST direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_ve(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 28);
}
/**
* @brief Get field vd from hil_gps message
*
* @return GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_vd(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 30);
}
/**
* @brief Get field cog from hil_gps message
*
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
*/
static inline uint16_t mavlink_msg_hil_gps_get_cog(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 32);
}
/**
* @brief Get field satellites_visible from hil_gps message
*
* @return Number of satellites visible. If unknown, set to 255
*/
static inline uint8_t mavlink_msg_hil_gps_get_satellites_visible(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 35);
}
/**
* @brief Decode a hil_gps message into a struct
*
* @param msg The message to decode
* @param hil_gps C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_gps_decode(const mavlink_message_t* msg, mavlink_hil_gps_t* hil_gps)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_gps->time_usec = mavlink_msg_hil_gps_get_time_usec(msg);
hil_gps->lat = mavlink_msg_hil_gps_get_lat(msg);
hil_gps->lon = mavlink_msg_hil_gps_get_lon(msg);
hil_gps->alt = mavlink_msg_hil_gps_get_alt(msg);
hil_gps->eph = mavlink_msg_hil_gps_get_eph(msg);
hil_gps->epv = mavlink_msg_hil_gps_get_epv(msg);
hil_gps->vel = mavlink_msg_hil_gps_get_vel(msg);
hil_gps->vn = mavlink_msg_hil_gps_get_vn(msg);
hil_gps->ve = mavlink_msg_hil_gps_get_ve(msg);
hil_gps->vd = mavlink_msg_hil_gps_get_vd(msg);
hil_gps->cog = mavlink_msg_hil_gps_get_cog(msg);
hil_gps->fix_type = mavlink_msg_hil_gps_get_fix_type(msg);
hil_gps->satellites_visible = mavlink_msg_hil_gps_get_satellites_visible(msg);
#else
memcpy(hil_gps, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
}

View File

@ -0,0 +1,317 @@
// MESSAGE HIL_OPTICAL_FLOW PACKING
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW 114
typedef struct __mavlink_hil_optical_flow_t
{
uint64_t time_usec; ///< Timestamp (UNIX)
float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated
float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated
float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
int16_t flow_x; ///< Flow in pixels in x-sensor direction
int16_t flow_y; ///< Flow in pixels in y-sensor direction
uint8_t sensor_id; ///< Sensor ID
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
} mavlink_hil_optical_flow_t;
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN 26
#define MAVLINK_MSG_ID_114_LEN 26
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC 119
#define MAVLINK_MSG_ID_114_CRC 119
#define MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW { \
"HIL_OPTICAL_FLOW", \
8, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_optical_flow_t, time_usec) }, \
{ "flow_comp_m_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_optical_flow_t, flow_comp_m_x) }, \
{ "flow_comp_m_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_optical_flow_t, flow_comp_m_y) }, \
{ "ground_distance", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_optical_flow_t, ground_distance) }, \
{ "flow_x", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_hil_optical_flow_t, flow_x) }, \
{ "flow_y", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_hil_optical_flow_t, flow_y) }, \
{ "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_hil_optical_flow_t, sensor_id) }, \
{ "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_hil_optical_flow_t, quality) }, \
} \
}
/**
* @brief Pack a hil_optical_flow message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_optical_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#else
mavlink_hil_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_OPTICAL_FLOW;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
}
/**
* @brief Pack a hil_optical_flow message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_optical_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint8_t sensor_id,int16_t flow_x,int16_t flow_y,float flow_comp_m_x,float flow_comp_m_y,uint8_t quality,float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#else
mavlink_hil_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_OPTICAL_FLOW;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
}
/**
* @brief Encode a hil_optical_flow struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_optical_flow C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_optical_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_optical_flow_t* hil_optical_flow)
{
return mavlink_msg_hil_optical_flow_pack(system_id, component_id, msg, hil_optical_flow->time_usec, hil_optical_flow->sensor_id, hil_optical_flow->flow_x, hil_optical_flow->flow_y, hil_optical_flow->flow_comp_m_x, hil_optical_flow->flow_comp_m_y, hil_optical_flow->quality, hil_optical_flow->ground_distance);
}
/**
* @brief Send a hil_optical_flow message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_optical_flow_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
_mav_put_float(buf, 16, ground_distance);
_mav_put_int16_t(buf, 20, flow_x);
_mav_put_int16_t(buf, 22, flow_y);
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
#else
mavlink_hil_optical_flow_t packet;
packet.time_usec = time_usec;
packet.flow_comp_m_x = flow_comp_m_x;
packet.flow_comp_m_y = flow_comp_m_y;
packet.ground_distance = ground_distance;
packet.flow_x = flow_x;
packet.flow_y = flow_y;
packet.sensor_id = sensor_id;
packet.quality = quality;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
#endif
}
#endif
// MESSAGE HIL_OPTICAL_FLOW UNPACKING
/**
* @brief Get field time_usec from hil_optical_flow message
*
* @return Timestamp (UNIX)
*/
static inline uint64_t mavlink_msg_hil_optical_flow_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field sensor_id from hil_optical_flow message
*
* @return Sensor ID
*/
static inline uint8_t mavlink_msg_hil_optical_flow_get_sensor_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 24);
}
/**
* @brief Get field flow_x from hil_optical_flow message
*
* @return Flow in pixels in x-sensor direction
*/
static inline int16_t mavlink_msg_hil_optical_flow_get_flow_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 20);
}
/**
* @brief Get field flow_y from hil_optical_flow message
*
* @return Flow in pixels in y-sensor direction
*/
static inline int16_t mavlink_msg_hil_optical_flow_get_flow_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 22);
}
/**
* @brief Get field flow_comp_m_x from hil_optical_flow message
*
* @return Flow in meters in x-sensor direction, angular-speed compensated
*/
static inline float mavlink_msg_hil_optical_flow_get_flow_comp_m_x(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field flow_comp_m_y from hil_optical_flow message
*
* @return Flow in meters in y-sensor direction, angular-speed compensated
*/
static inline float mavlink_msg_hil_optical_flow_get_flow_comp_m_y(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field quality from hil_optical_flow message
*
* @return Optical flow quality / confidence. 0: bad, 255: maximum quality
*/
static inline uint8_t mavlink_msg_hil_optical_flow_get_quality(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 25);
}
/**
* @brief Get field ground_distance from hil_optical_flow message
*
* @return Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
*/
static inline float mavlink_msg_hil_optical_flow_get_ground_distance(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Decode a hil_optical_flow message into a struct
*
* @param msg The message to decode
* @param hil_optical_flow C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_optical_flow_decode(const mavlink_message_t* msg, mavlink_hil_optical_flow_t* hil_optical_flow)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_optical_flow->time_usec = mavlink_msg_hil_optical_flow_get_time_usec(msg);
hil_optical_flow->flow_comp_m_x = mavlink_msg_hil_optical_flow_get_flow_comp_m_x(msg);
hil_optical_flow->flow_comp_m_y = mavlink_msg_hil_optical_flow_get_flow_comp_m_y(msg);
hil_optical_flow->ground_distance = mavlink_msg_hil_optical_flow_get_ground_distance(msg);
hil_optical_flow->flow_x = mavlink_msg_hil_optical_flow_get_flow_x(msg);
hil_optical_flow->flow_y = mavlink_msg_hil_optical_flow_get_flow_y(msg);
hil_optical_flow->sensor_id = mavlink_msg_hil_optical_flow_get_sensor_id(msg);
hil_optical_flow->quality = mavlink_msg_hil_optical_flow_get_quality(msg);
#else
memcpy(hil_optical_flow, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
#endif
}

View File

@ -23,6 +23,9 @@ typedef struct __mavlink_hil_rc_inputs_raw_t
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33
#define MAVLINK_MSG_ID_92_LEN 33
#define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC 54
#define MAVLINK_MSG_ID_92_CRC 54
#define MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW { \
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uin
uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
@ -88,7 +91,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uin
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
@ -106,11 +109,15 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uin
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 33, 54);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
}
/**
@ -140,7 +147,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id
uint64_t time_usec,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw,uint16_t chan9_raw,uint16_t chan10_raw,uint16_t chan11_raw,uint16_t chan12_raw,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
@ -156,7 +163,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
@ -174,11 +181,15 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 33);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 33, 54);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
}
/**
@ -218,7 +229,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode(uint8_t system_id, u
static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, uint64_t time_usec, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint16_t chan9_raw, uint16_t chan10_raw, uint16_t chan11_raw, uint16_t chan12_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[33];
char buf[MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 8, chan1_raw);
_mav_put_uint16_t(buf, 10, chan2_raw);
@ -234,7 +245,11 @@ static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, ui
_mav_put_uint16_t(buf, 30, chan12_raw);
_mav_put_uint8_t(buf, 32, rssi);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, 33, 54);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, buf, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
#else
mavlink_hil_rc_inputs_raw_t packet;
packet.time_usec = time_usec;
@ -252,7 +267,11 @@ static inline void mavlink_msg_hil_rc_inputs_raw_send(mavlink_channel_t chan, ui
packet.chan12_raw = chan12_raw;
packet.rssi = rssi;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, 33, 54);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW, (const char *)&packet, MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
#endif
}
@ -425,6 +444,6 @@ static inline void mavlink_msg_hil_rc_inputs_raw_decode(const mavlink_message_t*
hil_rc_inputs_raw->chan12_raw = mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(msg);
hil_rc_inputs_raw->rssi = mavlink_msg_hil_rc_inputs_raw_get_rssi(msg);
#else
memcpy(hil_rc_inputs_raw, _MAV_PAYLOAD(msg), 33);
memcpy(hil_rc_inputs_raw, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN);
#endif
}

View File

@ -0,0 +1,471 @@
// MESSAGE HIL_SENSOR PACKING
#define MAVLINK_MSG_ID_HIL_SENSOR 107
typedef struct __mavlink_hil_sensor_t
{
uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot)
float xacc; ///< X acceleration (m/s^2)
float yacc; ///< Y acceleration (m/s^2)
float zacc; ///< Z acceleration (m/s^2)
float xgyro; ///< Angular speed around X axis in body frame (rad / sec)
float ygyro; ///< Angular speed around Y axis in body frame (rad / sec)
float zgyro; ///< Angular speed around Z axis in body frame (rad / sec)
float xmag; ///< X Magnetic field (Gauss)
float ymag; ///< Y Magnetic field (Gauss)
float zmag; ///< Z Magnetic field (Gauss)
float abs_pressure; ///< Absolute pressure in millibar
float diff_pressure; ///< Differential pressure (airspeed) in millibar
float pressure_alt; ///< Altitude calculated from pressure
float temperature; ///< Temperature in degrees celsius
uint32_t fields_updated; ///< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
} mavlink_hil_sensor_t;
#define MAVLINK_MSG_ID_HIL_SENSOR_LEN 64
#define MAVLINK_MSG_ID_107_LEN 64
#define MAVLINK_MSG_ID_HIL_SENSOR_CRC 108
#define MAVLINK_MSG_ID_107_CRC 108
#define MAVLINK_MESSAGE_INFO_HIL_SENSOR { \
"HIL_SENSOR", \
15, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_sensor_t, time_usec) }, \
{ "xacc", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_sensor_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_sensor_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_sensor_t, zacc) }, \
{ "xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_sensor_t, xgyro) }, \
{ "ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_sensor_t, ygyro) }, \
{ "zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_sensor_t, zgyro) }, \
{ "xmag", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_sensor_t, xmag) }, \
{ "ymag", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_hil_sensor_t, ymag) }, \
{ "zmag", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_hil_sensor_t, zmag) }, \
{ "abs_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_hil_sensor_t, abs_pressure) }, \
{ "diff_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_hil_sensor_t, diff_pressure) }, \
{ "pressure_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_hil_sensor_t, pressure_alt) }, \
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_hil_sensor_t, temperature) }, \
{ "fields_updated", NULL, MAVLINK_TYPE_UINT32_T, 0, 60, offsetof(mavlink_hil_sensor_t, fields_updated) }, \
} \
}
/**
* @brief Pack a hil_sensor message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param xacc X acceleration (m/s^2)
* @param yacc Y acceleration (m/s^2)
* @param zacc Z acceleration (m/s^2)
* @param xgyro Angular speed around X axis in body frame (rad / sec)
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
* @param xmag X Magnetic field (Gauss)
* @param ymag Y Magnetic field (Gauss)
* @param zmag Z Magnetic field (Gauss)
* @param abs_pressure Absolute pressure in millibar
* @param diff_pressure Differential pressure (airspeed) in millibar
* @param pressure_alt Altitude calculated from pressure
* @param temperature Temperature in degrees celsius
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_sensor_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint32_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
_mav_put_float(buf, 16, zacc);
_mav_put_float(buf, 20, xgyro);
_mav_put_float(buf, 24, ygyro);
_mav_put_float(buf, 28, zgyro);
_mav_put_float(buf, 32, xmag);
_mav_put_float(buf, 36, ymag);
_mav_put_float(buf, 40, zmag);
_mav_put_float(buf, 44, abs_pressure);
_mav_put_float(buf, 48, diff_pressure);
_mav_put_float(buf, 52, pressure_alt);
_mav_put_float(buf, 56, temperature);
_mav_put_uint32_t(buf, 60, fields_updated);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#else
mavlink_hil_sensor_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
packet.abs_pressure = abs_pressure;
packet.diff_pressure = diff_pressure;
packet.pressure_alt = pressure_alt;
packet.temperature = temperature;
packet.fields_updated = fields_updated;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_SENSOR;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
}
/**
* @brief Pack a hil_sensor message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param xacc X acceleration (m/s^2)
* @param yacc Y acceleration (m/s^2)
* @param zacc Z acceleration (m/s^2)
* @param xgyro Angular speed around X axis in body frame (rad / sec)
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
* @param xmag X Magnetic field (Gauss)
* @param ymag Y Magnetic field (Gauss)
* @param zmag Z Magnetic field (Gauss)
* @param abs_pressure Absolute pressure in millibar
* @param diff_pressure Differential pressure (airspeed) in millibar
* @param pressure_alt Altitude calculated from pressure
* @param temperature Temperature in degrees celsius
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_sensor_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,float xmag,float ymag,float zmag,float abs_pressure,float diff_pressure,float pressure_alt,float temperature,uint32_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
_mav_put_float(buf, 16, zacc);
_mav_put_float(buf, 20, xgyro);
_mav_put_float(buf, 24, ygyro);
_mav_put_float(buf, 28, zgyro);
_mav_put_float(buf, 32, xmag);
_mav_put_float(buf, 36, ymag);
_mav_put_float(buf, 40, zmag);
_mav_put_float(buf, 44, abs_pressure);
_mav_put_float(buf, 48, diff_pressure);
_mav_put_float(buf, 52, pressure_alt);
_mav_put_float(buf, 56, temperature);
_mav_put_uint32_t(buf, 60, fields_updated);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#else
mavlink_hil_sensor_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
packet.abs_pressure = abs_pressure;
packet.diff_pressure = diff_pressure;
packet.pressure_alt = pressure_alt;
packet.temperature = temperature;
packet.fields_updated = fields_updated;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_SENSOR;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
}
/**
* @brief Encode a hil_sensor struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_sensor C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_sensor_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_sensor_t* hil_sensor)
{
return mavlink_msg_hil_sensor_pack(system_id, component_id, msg, hil_sensor->time_usec, hil_sensor->xacc, hil_sensor->yacc, hil_sensor->zacc, hil_sensor->xgyro, hil_sensor->ygyro, hil_sensor->zgyro, hil_sensor->xmag, hil_sensor->ymag, hil_sensor->zmag, hil_sensor->abs_pressure, hil_sensor->diff_pressure, hil_sensor->pressure_alt, hil_sensor->temperature, hil_sensor->fields_updated);
}
/**
* @brief Send a hil_sensor message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param xacc X acceleration (m/s^2)
* @param yacc Y acceleration (m/s^2)
* @param zacc Z acceleration (m/s^2)
* @param xgyro Angular speed around X axis in body frame (rad / sec)
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
* @param xmag X Magnetic field (Gauss)
* @param ymag Y Magnetic field (Gauss)
* @param zmag Z Magnetic field (Gauss)
* @param abs_pressure Absolute pressure in millibar
* @param diff_pressure Differential pressure (airspeed) in millibar
* @param pressure_alt Altitude calculated from pressure
* @param temperature Temperature in degrees celsius
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_sensor_send(mavlink_channel_t chan, uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint32_t fields_updated)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, xacc);
_mav_put_float(buf, 12, yacc);
_mav_put_float(buf, 16, zacc);
_mav_put_float(buf, 20, xgyro);
_mav_put_float(buf, 24, ygyro);
_mav_put_float(buf, 28, zgyro);
_mav_put_float(buf, 32, xmag);
_mav_put_float(buf, 36, ymag);
_mav_put_float(buf, 40, zmag);
_mav_put_float(buf, 44, abs_pressure);
_mav_put_float(buf, 48, diff_pressure);
_mav_put_float(buf, 52, pressure_alt);
_mav_put_float(buf, 56, temperature);
_mav_put_uint32_t(buf, 60, fields_updated);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
#else
mavlink_hil_sensor_t packet;
packet.time_usec = time_usec;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
packet.xgyro = xgyro;
packet.ygyro = ygyro;
packet.zgyro = zgyro;
packet.xmag = xmag;
packet.ymag = ymag;
packet.zmag = zmag;
packet.abs_pressure = abs_pressure;
packet.diff_pressure = diff_pressure;
packet.pressure_alt = pressure_alt;
packet.temperature = temperature;
packet.fields_updated = fields_updated;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, (const char *)&packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, (const char *)&packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
#endif
}
#endif
// MESSAGE HIL_SENSOR UNPACKING
/**
* @brief Get field time_usec from hil_sensor message
*
* @return Timestamp (microseconds, synced to UNIX time or since system boot)
*/
static inline uint64_t mavlink_msg_hil_sensor_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field xacc from hil_sensor message
*
* @return X acceleration (m/s^2)
*/
static inline float mavlink_msg_hil_sensor_get_xacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field yacc from hil_sensor message
*
* @return Y acceleration (m/s^2)
*/
static inline float mavlink_msg_hil_sensor_get_yacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field zacc from hil_sensor message
*
* @return Z acceleration (m/s^2)
*/
static inline float mavlink_msg_hil_sensor_get_zacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field xgyro from hil_sensor message
*
* @return Angular speed around X axis in body frame (rad / sec)
*/
static inline float mavlink_msg_hil_sensor_get_xgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field ygyro from hil_sensor message
*
* @return Angular speed around Y axis in body frame (rad / sec)
*/
static inline float mavlink_msg_hil_sensor_get_ygyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field zgyro from hil_sensor message
*
* @return Angular speed around Z axis in body frame (rad / sec)
*/
static inline float mavlink_msg_hil_sensor_get_zgyro(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field xmag from hil_sensor message
*
* @return X Magnetic field (Gauss)
*/
static inline float mavlink_msg_hil_sensor_get_xmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field ymag from hil_sensor message
*
* @return Y Magnetic field (Gauss)
*/
static inline float mavlink_msg_hil_sensor_get_ymag(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 36);
}
/**
* @brief Get field zmag from hil_sensor message
*
* @return Z Magnetic field (Gauss)
*/
static inline float mavlink_msg_hil_sensor_get_zmag(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 40);
}
/**
* @brief Get field abs_pressure from hil_sensor message
*
* @return Absolute pressure in millibar
*/
static inline float mavlink_msg_hil_sensor_get_abs_pressure(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 44);
}
/**
* @brief Get field diff_pressure from hil_sensor message
*
* @return Differential pressure (airspeed) in millibar
*/
static inline float mavlink_msg_hil_sensor_get_diff_pressure(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 48);
}
/**
* @brief Get field pressure_alt from hil_sensor message
*
* @return Altitude calculated from pressure
*/
static inline float mavlink_msg_hil_sensor_get_pressure_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 52);
}
/**
* @brief Get field temperature from hil_sensor message
*
* @return Temperature in degrees celsius
*/
static inline float mavlink_msg_hil_sensor_get_temperature(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 56);
}
/**
* @brief Get field fields_updated from hil_sensor message
*
* @return Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
*/
static inline uint32_t mavlink_msg_hil_sensor_get_fields_updated(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 60);
}
/**
* @brief Decode a hil_sensor message into a struct
*
* @param msg The message to decode
* @param hil_sensor C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_sensor_decode(const mavlink_message_t* msg, mavlink_hil_sensor_t* hil_sensor)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_sensor->time_usec = mavlink_msg_hil_sensor_get_time_usec(msg);
hil_sensor->xacc = mavlink_msg_hil_sensor_get_xacc(msg);
hil_sensor->yacc = mavlink_msg_hil_sensor_get_yacc(msg);
hil_sensor->zacc = mavlink_msg_hil_sensor_get_zacc(msg);
hil_sensor->xgyro = mavlink_msg_hil_sensor_get_xgyro(msg);
hil_sensor->ygyro = mavlink_msg_hil_sensor_get_ygyro(msg);
hil_sensor->zgyro = mavlink_msg_hil_sensor_get_zgyro(msg);
hil_sensor->xmag = mavlink_msg_hil_sensor_get_xmag(msg);
hil_sensor->ymag = mavlink_msg_hil_sensor_get_ymag(msg);
hil_sensor->zmag = mavlink_msg_hil_sensor_get_zmag(msg);
hil_sensor->abs_pressure = mavlink_msg_hil_sensor_get_abs_pressure(msg);
hil_sensor->diff_pressure = mavlink_msg_hil_sensor_get_diff_pressure(msg);
hil_sensor->pressure_alt = mavlink_msg_hil_sensor_get_pressure_alt(msg);
hil_sensor->temperature = mavlink_msg_hil_sensor_get_temperature(msg);
hil_sensor->fields_updated = mavlink_msg_hil_sensor_get_fields_updated(msg);
#else
memcpy(hil_sensor, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_SENSOR_LEN);
#endif
}

View File

@ -8,9 +8,9 @@ typedef struct __mavlink_hil_state_t
float roll; ///< Roll angle (rad)
float pitch; ///< Pitch angle (rad)
float yaw; ///< Yaw angle (rad)
float rollspeed; ///< Roll angular speed (rad/s)
float pitchspeed; ///< Pitch angular speed (rad/s)
float yawspeed; ///< Yaw angular speed (rad/s)
float rollspeed; ///< Body frame roll / phi angular speed (rad/s)
float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s)
float yawspeed; ///< Body frame yaw / psi angular speed (rad/s)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
@ -25,6 +25,9 @@ typedef struct __mavlink_hil_state_t
#define MAVLINK_MSG_ID_HIL_STATE_LEN 56
#define MAVLINK_MSG_ID_90_LEN 56
#define MAVLINK_MSG_ID_HIL_STATE_CRC 183
#define MAVLINK_MSG_ID_90_CRC 183
#define MAVLINK_MESSAGE_INFO_HIL_STATE { \
@ -60,9 +63,9 @@ typedef struct __mavlink_hil_state_t
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
@ -78,7 +81,7 @@ static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t com
uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
char buf[MAVLINK_MSG_ID_HIL_STATE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
@ -96,7 +99,7 @@ static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t com
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_LEN);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
@ -116,11 +119,15 @@ static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t com
packet.yacc = yacc;
packet.zacc = zacc;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message(msg, system_id, component_id, 56, 183);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_LEN, MAVLINK_MSG_ID_HIL_STATE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
}
/**
@ -133,9 +140,9 @@ static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t com
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
@ -152,7 +159,7 @@ static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_
uint64_t time_usec,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed,int32_t lat,int32_t lon,int32_t alt,int16_t vx,int16_t vy,int16_t vz,int16_t xacc,int16_t yacc,int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
char buf[MAVLINK_MSG_ID_HIL_STATE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
@ -170,7 +177,7 @@ static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 56);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_LEN);
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
@ -190,11 +197,15 @@ static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_
packet.yacc = yacc;
packet.zacc = zacc;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 56);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 56, 183);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_LEN, MAVLINK_MSG_ID_HIL_STATE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
}
/**
@ -218,9 +229,9 @@ static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t c
* @param roll Roll angle (rad)
* @param pitch Pitch angle (rad)
* @param yaw Yaw angle (rad)
* @param rollspeed Roll angular speed (rad/s)
* @param pitchspeed Pitch angular speed (rad/s)
* @param yawspeed Yaw angular speed (rad/s)
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
@ -236,7 +247,7 @@ static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t c
static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t time_usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[56];
char buf[MAVLINK_MSG_ID_HIL_STATE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, roll);
_mav_put_float(buf, 12, pitch);
@ -254,7 +265,11 @@ static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t t
_mav_put_int16_t(buf, 52, yacc);
_mav_put_int16_t(buf, 54, zacc);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, buf, 56, 183);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, buf, MAVLINK_MSG_ID_HIL_STATE_LEN, MAVLINK_MSG_ID_HIL_STATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, buf, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
#else
mavlink_hil_state_t packet;
packet.time_usec = time_usec;
@ -274,7 +289,11 @@ static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t t
packet.yacc = yacc;
packet.zacc = zacc;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, (const char *)&packet, 56, 183);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_LEN, MAVLINK_MSG_ID_HIL_STATE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
#endif
}
@ -326,7 +345,7 @@ static inline float mavlink_msg_hil_state_get_yaw(const mavlink_message_t* msg)
/**
* @brief Get field rollspeed from hil_state message
*
* @return Roll angular speed (rad/s)
* @return Body frame roll / phi angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t* msg)
{
@ -336,7 +355,7 @@ static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t*
/**
* @brief Get field pitchspeed from hil_state message
*
* @return Pitch angular speed (rad/s)
* @return Body frame pitch / theta angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t* msg)
{
@ -346,7 +365,7 @@ static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t
/**
* @brief Get field yawspeed from hil_state message
*
* @return Yaw angular speed (rad/s)
* @return Body frame yaw / psi angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_get_yawspeed(const mavlink_message_t* msg)
{
@ -469,6 +488,6 @@ static inline void mavlink_msg_hil_state_decode(const mavlink_message_t* msg, ma
hil_state->yacc = mavlink_msg_hil_state_get_yacc(msg);
hil_state->zacc = mavlink_msg_hil_state_get_zacc(msg);
#else
memcpy(hil_state, _MAV_PAYLOAD(msg), 56);
memcpy(hil_state, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_STATE_LEN);
#endif
}

View File

@ -0,0 +1,487 @@
// MESSAGE HIL_STATE_QUATERNION PACKING
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION 115
typedef struct __mavlink_hil_state_quaternion_t
{
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
float attitude_quaternion[4]; ///< Vehicle attitude expressed as normalized quaternion
float rollspeed; ///< Body frame roll / phi angular speed (rad/s)
float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s)
float yawspeed; ///< Body frame yaw / psi angular speed (rad/s)
int32_t lat; ///< Latitude, expressed as * 1E7
int32_t lon; ///< Longitude, expressed as * 1E7
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
uint16_t ind_airspeed; ///< Indicated airspeed, expressed as m/s * 100
uint16_t true_airspeed; ///< True airspeed, expressed as m/s * 100
int16_t xacc; ///< X acceleration (mg)
int16_t yacc; ///< Y acceleration (mg)
int16_t zacc; ///< Z acceleration (mg)
} mavlink_hil_state_quaternion_t;
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN 64
#define MAVLINK_MSG_ID_115_LEN 64
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC 4
#define MAVLINK_MSG_ID_115_CRC 4
#define MAVLINK_MSG_HIL_STATE_QUATERNION_FIELD_ATTITUDE_QUATERNION_LEN 4
#define MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION { \
"HIL_STATE_QUATERNION", \
16, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_state_quaternion_t, time_usec) }, \
{ "attitude_quaternion", NULL, MAVLINK_TYPE_FLOAT, 4, 8, offsetof(mavlink_hil_state_quaternion_t, attitude_quaternion) }, \
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_state_quaternion_t, rollspeed) }, \
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_state_quaternion_t, pitchspeed) }, \
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_state_quaternion_t, yawspeed) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_hil_state_quaternion_t, lat) }, \
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_hil_state_quaternion_t, lon) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_hil_state_quaternion_t, alt) }, \
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_hil_state_quaternion_t, vx) }, \
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_hil_state_quaternion_t, vy) }, \
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_hil_state_quaternion_t, vz) }, \
{ "ind_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 54, offsetof(mavlink_hil_state_quaternion_t, ind_airspeed) }, \
{ "true_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 56, offsetof(mavlink_hil_state_quaternion_t, true_airspeed) }, \
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_hil_state_quaternion_t, xacc) }, \
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 60, offsetof(mavlink_hil_state_quaternion_t, yacc) }, \
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 62, offsetof(mavlink_hil_state_quaternion_t, zacc) }, \
} \
}
/**
* @brief Pack a hil_state_quaternion message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
* @param true_airspeed True airspeed, expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, const float *attitude_quaternion, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 24, rollspeed);
_mav_put_float(buf, 28, pitchspeed);
_mav_put_float(buf, 32, yawspeed);
_mav_put_int32_t(buf, 36, lat);
_mav_put_int32_t(buf, 40, lon);
_mav_put_int32_t(buf, 44, alt);
_mav_put_int16_t(buf, 48, vx);
_mav_put_int16_t(buf, 50, vy);
_mav_put_int16_t(buf, 52, vz);
_mav_put_uint16_t(buf, 54, ind_airspeed);
_mav_put_uint16_t(buf, 56, true_airspeed);
_mav_put_int16_t(buf, 58, xacc);
_mav_put_int16_t(buf, 60, yacc);
_mav_put_int16_t(buf, 62, zacc);
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#else
mavlink_hil_state_quaternion_t packet;
packet.time_usec = time_usec;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ind_airspeed = ind_airspeed;
packet.true_airspeed = true_airspeed;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_STATE_QUATERNION;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
}
/**
* @brief Pack a hil_state_quaternion message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
* @param true_airspeed True airspeed, expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,const float *attitude_quaternion,float rollspeed,float pitchspeed,float yawspeed,int32_t lat,int32_t lon,int32_t alt,int16_t vx,int16_t vy,int16_t vz,uint16_t ind_airspeed,uint16_t true_airspeed,int16_t xacc,int16_t yacc,int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 24, rollspeed);
_mav_put_float(buf, 28, pitchspeed);
_mav_put_float(buf, 32, yawspeed);
_mav_put_int32_t(buf, 36, lat);
_mav_put_int32_t(buf, 40, lon);
_mav_put_int32_t(buf, 44, alt);
_mav_put_int16_t(buf, 48, vx);
_mav_put_int16_t(buf, 50, vy);
_mav_put_int16_t(buf, 52, vz);
_mav_put_uint16_t(buf, 54, ind_airspeed);
_mav_put_uint16_t(buf, 56, true_airspeed);
_mav_put_int16_t(buf, 58, xacc);
_mav_put_int16_t(buf, 60, yacc);
_mav_put_int16_t(buf, 62, zacc);
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#else
mavlink_hil_state_quaternion_t packet;
packet.time_usec = time_usec;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ind_airspeed = ind_airspeed;
packet.true_airspeed = true_airspeed;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_HIL_STATE_QUATERNION;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
}
/**
* @brief Encode a hil_state_quaternion struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param hil_state_quaternion C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_state_quaternion_t* hil_state_quaternion)
{
return mavlink_msg_hil_state_quaternion_pack(system_id, component_id, msg, hil_state_quaternion->time_usec, hil_state_quaternion->attitude_quaternion, hil_state_quaternion->rollspeed, hil_state_quaternion->pitchspeed, hil_state_quaternion->yawspeed, hil_state_quaternion->lat, hil_state_quaternion->lon, hil_state_quaternion->alt, hil_state_quaternion->vx, hil_state_quaternion->vy, hil_state_quaternion->vz, hil_state_quaternion->ind_airspeed, hil_state_quaternion->true_airspeed, hil_state_quaternion->xacc, hil_state_quaternion->yacc, hil_state_quaternion->zacc);
}
/**
* @brief Send a hil_state_quaternion message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
* @param rollspeed Body frame roll / phi angular speed (rad/s)
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
* @param lat Latitude, expressed as * 1E7
* @param lon Longitude, expressed as * 1E7
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
* @param true_airspeed True airspeed, expressed as m/s * 100
* @param xacc X acceleration (mg)
* @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_state_quaternion_send(mavlink_channel_t chan, uint64_t time_usec, const float *attitude_quaternion, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 24, rollspeed);
_mav_put_float(buf, 28, pitchspeed);
_mav_put_float(buf, 32, yawspeed);
_mav_put_int32_t(buf, 36, lat);
_mav_put_int32_t(buf, 40, lon);
_mav_put_int32_t(buf, 44, alt);
_mav_put_int16_t(buf, 48, vx);
_mav_put_int16_t(buf, 50, vy);
_mav_put_int16_t(buf, 52, vz);
_mav_put_uint16_t(buf, 54, ind_airspeed);
_mav_put_uint16_t(buf, 56, true_airspeed);
_mav_put_int16_t(buf, 58, xacc);
_mav_put_int16_t(buf, 60, yacc);
_mav_put_int16_t(buf, 62, zacc);
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
#else
mavlink_hil_state_quaternion_t packet;
packet.time_usec = time_usec;
packet.rollspeed = rollspeed;
packet.pitchspeed = pitchspeed;
packet.yawspeed = yawspeed;
packet.lat = lat;
packet.lon = lon;
packet.alt = alt;
packet.vx = vx;
packet.vy = vy;
packet.vz = vz;
packet.ind_airspeed = ind_airspeed;
packet.true_airspeed = true_airspeed;
packet.xacc = xacc;
packet.yacc = yacc;
packet.zacc = zacc;
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
#endif
}
#endif
// MESSAGE HIL_STATE_QUATERNION UNPACKING
/**
* @brief Get field time_usec from hil_state_quaternion message
*
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
*/
static inline uint64_t mavlink_msg_hil_state_quaternion_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field attitude_quaternion from hil_state_quaternion message
*
* @return Vehicle attitude expressed as normalized quaternion
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_get_attitude_quaternion(const mavlink_message_t* msg, float *attitude_quaternion)
{
return _MAV_RETURN_float_array(msg, attitude_quaternion, 4, 8);
}
/**
* @brief Get field rollspeed from hil_state_quaternion message
*
* @return Body frame roll / phi angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_quaternion_get_rollspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 24);
}
/**
* @brief Get field pitchspeed from hil_state_quaternion message
*
* @return Body frame pitch / theta angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_quaternion_get_pitchspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 28);
}
/**
* @brief Get field yawspeed from hil_state_quaternion message
*
* @return Body frame yaw / psi angular speed (rad/s)
*/
static inline float mavlink_msg_hil_state_quaternion_get_yawspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field lat from hil_state_quaternion message
*
* @return Latitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_quaternion_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 36);
}
/**
* @brief Get field lon from hil_state_quaternion message
*
* @return Longitude, expressed as * 1E7
*/
static inline int32_t mavlink_msg_hil_state_quaternion_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 40);
}
/**
* @brief Get field alt from hil_state_quaternion message
*
* @return Altitude in meters, expressed as * 1000 (millimeters)
*/
static inline int32_t mavlink_msg_hil_state_quaternion_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 44);
}
/**
* @brief Get field vx from hil_state_quaternion message
*
* @return Ground X Speed (Latitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_vx(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 48);
}
/**
* @brief Get field vy from hil_state_quaternion message
*
* @return Ground Y Speed (Longitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_vy(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 50);
}
/**
* @brief Get field vz from hil_state_quaternion message
*
* @return Ground Z Speed (Altitude), expressed as m/s * 100
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_vz(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 52);
}
/**
* @brief Get field ind_airspeed from hil_state_quaternion message
*
* @return Indicated airspeed, expressed as m/s * 100
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_get_ind_airspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 54);
}
/**
* @brief Get field true_airspeed from hil_state_quaternion message
*
* @return True airspeed, expressed as m/s * 100
*/
static inline uint16_t mavlink_msg_hil_state_quaternion_get_true_airspeed(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 56);
}
/**
* @brief Get field xacc from hil_state_quaternion message
*
* @return X acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_xacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 58);
}
/**
* @brief Get field yacc from hil_state_quaternion message
*
* @return Y acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_yacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 60);
}
/**
* @brief Get field zacc from hil_state_quaternion message
*
* @return Z acceleration (mg)
*/
static inline int16_t mavlink_msg_hil_state_quaternion_get_zacc(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 62);
}
/**
* @brief Decode a hil_state_quaternion message into a struct
*
* @param msg The message to decode
* @param hil_state_quaternion C-struct to decode the message contents into
*/
static inline void mavlink_msg_hil_state_quaternion_decode(const mavlink_message_t* msg, mavlink_hil_state_quaternion_t* hil_state_quaternion)
{
#if MAVLINK_NEED_BYTE_SWAP
hil_state_quaternion->time_usec = mavlink_msg_hil_state_quaternion_get_time_usec(msg);
mavlink_msg_hil_state_quaternion_get_attitude_quaternion(msg, hil_state_quaternion->attitude_quaternion);
hil_state_quaternion->rollspeed = mavlink_msg_hil_state_quaternion_get_rollspeed(msg);
hil_state_quaternion->pitchspeed = mavlink_msg_hil_state_quaternion_get_pitchspeed(msg);
hil_state_quaternion->yawspeed = mavlink_msg_hil_state_quaternion_get_yawspeed(msg);
hil_state_quaternion->lat = mavlink_msg_hil_state_quaternion_get_lat(msg);
hil_state_quaternion->lon = mavlink_msg_hil_state_quaternion_get_lon(msg);
hil_state_quaternion->alt = mavlink_msg_hil_state_quaternion_get_alt(msg);
hil_state_quaternion->vx = mavlink_msg_hil_state_quaternion_get_vx(msg);
hil_state_quaternion->vy = mavlink_msg_hil_state_quaternion_get_vy(msg);
hil_state_quaternion->vz = mavlink_msg_hil_state_quaternion_get_vz(msg);
hil_state_quaternion->ind_airspeed = mavlink_msg_hil_state_quaternion_get_ind_airspeed(msg);
hil_state_quaternion->true_airspeed = mavlink_msg_hil_state_quaternion_get_true_airspeed(msg);
hil_state_quaternion->xacc = mavlink_msg_hil_state_quaternion_get_xacc(msg);
hil_state_quaternion->yacc = mavlink_msg_hil_state_quaternion_get_yacc(msg);
hil_state_quaternion->zacc = mavlink_msg_hil_state_quaternion_get_zacc(msg);
#else
memcpy(hil_state_quaternion, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_local_position_ned_t
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN 28
#define MAVLINK_MSG_ID_32_LEN 28
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC 185
#define MAVLINK_MSG_ID_32_CRC 185
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, ui
uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, ui
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, ui
packet.vy = vy;
packet.vz = vz;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message(msg, system_id, component_id, 28, 185);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_i
uint32_t time_boot_ms,float x,float y,float z,float vx,float vy,float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_i
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_i
packet.vy = vy;
packet.vz = vz;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 185);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_local_position_ned_encode(uint8_t system_id,
static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float vx, float vy, float vz)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -164,7 +175,11 @@ static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, u
_mav_put_float(buf, 20, vy);
_mav_put_float(buf, 24, vz);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, 28, 185);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
#else
mavlink_local_position_ned_t packet;
packet.time_boot_ms = time_boot_ms;
@ -175,7 +190,11 @@ static inline void mavlink_msg_local_position_ned_send(mavlink_channel_t chan, u
packet.vy = vy;
packet.vz = vz;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (const char *)&packet, 28, 185);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_local_position_ned_decode(const mavlink_message_t
local_position_ned->vy = mavlink_msg_local_position_ned_get_vy(msg);
local_position_ned->vz = mavlink_msg_local_position_ned_get_vz(msg);
#else
memcpy(local_position_ned, _MAV_PAYLOAD(msg), 28);
memcpy(local_position_ned, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOCAL_POSITION_NED_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_local_position_ned_system_global_offset_t
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN 28
#define MAVLINK_MSG_ID_89_LEN 28
#define MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_CRC 231
#define MAVLINK_MSG_ID_89_CRC 231
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(
uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message(msg, system_id, component_id, 28, 231);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_
uint32_t time_boot_ms,float x,float y,float z,float roll,float pitch,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_
packet.pitch = pitch;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 28);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 28, 231);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_encod
static inline void mavlink_msg_local_position_ned_system_global_offset_send(mavlink_channel_t chan, uint32_t time_boot_ms, float x, float y, float z, float roll, float pitch, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[28];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, x);
_mav_put_float(buf, 8, y);
@ -164,7 +175,11 @@ static inline void mavlink_msg_local_position_ned_system_global_offset_send(mavl
_mav_put_float(buf, 20, pitch);
_mav_put_float(buf, 24, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, buf, 28, 231);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, buf, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
#else
mavlink_local_position_ned_system_global_offset_t packet;
packet.time_boot_ms = time_boot_ms;
@ -175,7 +190,11 @@ static inline void mavlink_msg_local_position_ned_system_global_offset_send(mavl
packet.pitch = pitch;
packet.yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, (const char *)&packet, 28, 231);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_local_position_ned_system_global_offset_decode(co
local_position_ned_system_global_offset->pitch = mavlink_msg_local_position_ned_system_global_offset_get_pitch(msg);
local_position_ned_system_global_offset->yaw = mavlink_msg_local_position_ned_system_global_offset_get_yaw(msg);
#else
memcpy(local_position_ned_system_global_offset, _MAV_PAYLOAD(msg), 28);
memcpy(local_position_ned_system_global_offset, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_local_position_setpoint_t
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN 17
#define MAVLINK_MSG_ID_51_LEN 17
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC 223
#define MAVLINK_MSG_ID_51_CRC 223
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_i
uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_i
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 17, 223);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t sys
uint8_t coordinate_frame,float x,float y,float z,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 17);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t sys
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 17);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 17, 223);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_local_position_setpoint_encode(uint8_t system
static inline void mavlink_msg_local_position_setpoint_send(mavlink_channel_t chan, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[17];
char buf[MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
_mav_put_float(buf, 12, yaw);
_mav_put_uint8_t(buf, 16, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, 17, 223);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
#else
mavlink_local_position_setpoint_t packet;
packet.x = x;
@ -153,7 +168,11 @@ static inline void mavlink_msg_local_position_setpoint_send(mavlink_channel_t ch
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (const char *)&packet, 17, 223);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_local_position_setpoint_decode(const mavlink_mess
local_position_setpoint->yaw = mavlink_msg_local_position_setpoint_get_yaw(msg);
local_position_setpoint->coordinate_frame = mavlink_msg_local_position_setpoint_get_coordinate_frame(msg);
#else
memcpy(local_position_setpoint, _MAV_PAYLOAD(msg), 17);
memcpy(local_position_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_LEN);
#endif
}

View File

@ -15,6 +15,9 @@ typedef struct __mavlink_manual_control_t
#define MAVLINK_MSG_ID_MANUAL_CONTROL_LEN 11
#define MAVLINK_MSG_ID_69_LEN 11
#define MAVLINK_MSG_ID_MANUAL_CONTROL_CRC 243
#define MAVLINK_MSG_ID_69_CRC 243
#define MAVLINK_MESSAGE_INFO_MANUAL_CONTROL { \
@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_
uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[11];
char buf[MAVLINK_MSG_ID_MANUAL_CONTROL_LEN];
_mav_put_int16_t(buf, 0, x);
_mav_put_int16_t(buf, 2, y);
_mav_put_int16_t(buf, 4, z);
@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_
_mav_put_uint16_t(buf, 8, buttons);
_mav_put_uint8_t(buf, 10, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 11);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#else
mavlink_manual_control_t packet;
packet.x = x;
@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_
packet.buttons = buttons;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 11);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message(msg, system_id, component_id, 11, 243);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
}
/**
@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, u
uint8_t target,int16_t x,int16_t y,int16_t z,int16_t r,uint16_t buttons)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[11];
char buf[MAVLINK_MSG_ID_MANUAL_CONTROL_LEN];
_mav_put_int16_t(buf, 0, x);
_mav_put_int16_t(buf, 2, y);
_mav_put_int16_t(buf, 4, z);
@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, u
_mav_put_uint16_t(buf, 8, buttons);
_mav_put_uint8_t(buf, 10, target);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 11);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#else
mavlink_manual_control_t packet;
packet.x = x;
@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, u
packet.buttons = buttons;
packet.target = target;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 11);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MANUAL_CONTROL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 11, 243);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
}
/**
@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint
static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8_t target, int16_t x, int16_t y, int16_t z, int16_t r, uint16_t buttons)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[11];
char buf[MAVLINK_MSG_ID_MANUAL_CONTROL_LEN];
_mav_put_int16_t(buf, 0, x);
_mav_put_int16_t(buf, 2, y);
_mav_put_int16_t(buf, 4, z);
@ -154,7 +165,11 @@ static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8
_mav_put_uint16_t(buf, 8, buttons);
_mav_put_uint8_t(buf, 10, target);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, 11, 243);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, buf, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
#else
mavlink_manual_control_t packet;
packet.x = x;
@ -164,7 +179,11 @@ static inline void mavlink_msg_manual_control_send(mavlink_channel_t chan, uint8
packet.buttons = buttons;
packet.target = target;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, 11, 243);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN, MAVLINK_MSG_ID_MANUAL_CONTROL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
#endif
}
@ -249,6 +268,6 @@ static inline void mavlink_msg_manual_control_decode(const mavlink_message_t* ms
manual_control->buttons = mavlink_msg_manual_control_get_buttons(msg);
manual_control->target = mavlink_msg_manual_control_get_target(msg);
#else
memcpy(manual_control, _MAV_PAYLOAD(msg), 11);
memcpy(manual_control, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MANUAL_CONTROL_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_manual_setpoint_t
#define MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN 22
#define MAVLINK_MSG_ID_81_LEN 22
#define MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC 106
#define MAVLINK_MSG_ID_81_CRC 106
#define MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack(uint8_t system_id, uint8
uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack(uint8_t system_id, uint8
_mav_put_uint8_t(buf, 20, mode_switch);
_mav_put_uint8_t(buf, 21, manual_override_switch);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#else
mavlink_manual_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack(uint8_t system_id, uint8
packet.mode_switch = mode_switch;
packet.manual_override_switch = manual_override_switch;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MANUAL_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 22, 106);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack_chan(uint8_t system_id,
uint32_t time_boot_ms,float roll,float pitch,float yaw,float thrust,uint8_t mode_switch,uint8_t manual_override_switch)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack_chan(uint8_t system_id,
_mav_put_uint8_t(buf, 20, mode_switch);
_mav_put_uint8_t(buf, 21, manual_override_switch);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#else
mavlink_manual_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack_chan(uint8_t system_id,
packet.mode_switch = mode_switch;
packet.manual_override_switch = manual_override_switch;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MANUAL_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 106);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_encode(uint8_t system_id, uin
static inline void mavlink_msg_manual_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust, uint8_t mode_switch, uint8_t manual_override_switch)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
@ -164,7 +175,11 @@ static inline void mavlink_msg_manual_setpoint_send(mavlink_channel_t chan, uint
_mav_put_uint8_t(buf, 20, mode_switch);
_mav_put_uint8_t(buf, 21, manual_override_switch);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, buf, 22, 106);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, buf, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
#else
mavlink_manual_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -175,7 +190,11 @@ static inline void mavlink_msg_manual_setpoint_send(mavlink_channel_t chan, uint
packet.mode_switch = mode_switch;
packet.manual_override_switch = manual_override_switch;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (const char *)&packet, 22, 106);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN, MAVLINK_MSG_ID_MANUAL_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MANUAL_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_manual_setpoint_decode(const mavlink_message_t* m
manual_setpoint->mode_switch = mavlink_msg_manual_setpoint_get_mode_switch(msg);
manual_setpoint->manual_override_switch = mavlink_msg_manual_setpoint_get_manual_override_switch(msg);
#else
memcpy(manual_setpoint, _MAV_PAYLOAD(msg), 22);
memcpy(manual_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MANUAL_SETPOINT_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_memory_vect_t
#define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36
#define MAVLINK_MSG_ID_249_LEN 36
#define MAVLINK_MSG_ID_MEMORY_VECT_CRC 204
#define MAVLINK_MSG_ID_249_CRC 204
#define MAVLINK_MSG_MEMORY_VECT_FIELD_VALUE_LEN 32
#define MAVLINK_MESSAGE_INFO_MEMORY_VECT { \
@ -42,23 +45,27 @@ static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t c
uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message(msg, system_id, component_id, 36, 204);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
}
/**
@ -78,23 +85,27 @@ static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint
uint16_t address,uint8_t ver,uint8_t type,const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 36);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 36);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 36, 204);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
}
/**
@ -124,19 +135,27 @@ static inline uint16_t mavlink_msg_memory_vect_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_memory_vect_send(mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type, const int8_t *value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[36];
char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
_mav_put_uint16_t(buf, 0, address);
_mav_put_uint8_t(buf, 2, ver);
_mav_put_uint8_t(buf, 3, type);
_mav_put_int8_t_array(buf, 4, value, 32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, 36, 204);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
#else
mavlink_memory_vect_t packet;
packet.address = address;
packet.ver = ver;
packet.type = type;
mav_array_memcpy(packet.value, value, sizeof(int8_t)*32);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (const char *)&packet, 36, 204);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (const char *)&packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (const char *)&packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
#endif
}
@ -199,6 +218,6 @@ static inline void mavlink_msg_memory_vect_decode(const mavlink_message_t* msg,
memory_vect->type = mavlink_msg_memory_vect_get_type(msg);
mavlink_msg_memory_vect_get_value(msg, memory_vect->value);
#else
memcpy(memory_vect, _MAV_PAYLOAD(msg), 36);
memcpy(memory_vect, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MEMORY_VECT_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_mission_ack_t
#define MAVLINK_MSG_ID_MISSION_ACK_LEN 3
#define MAVLINK_MSG_ID_47_LEN 3
#define MAVLINK_MSG_ID_MISSION_ACK_CRC 153
#define MAVLINK_MSG_ID_47_CRC 153
#define MAVLINK_MESSAGE_INFO_MISSION_ACK { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c
uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message(msg, system_id, component_id, 3, 153);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint
uint8_t target_system,uint8_t target_component,uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 3);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ACK;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 153);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[3];
char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_put_uint8_t(buf, 2, type);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, 3, 153);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
#else
mavlink_mission_ack_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
packet.type = type;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, 3, 153);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_mission_ack_decode(const mavlink_message_t* msg,
mission_ack->target_component = mavlink_msg_mission_ack_get_target_component(msg);
mission_ack->type = mavlink_msg_mission_ack_get_type(msg);
#else
memcpy(mission_ack, _MAV_PAYLOAD(msg), 3);
memcpy(mission_ack, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_ACK_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_mission_clear_all_t
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN 2
#define MAVLINK_MSG_ID_45_LEN 2
#define MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC 232
#define MAVLINK_MSG_ID_45_CRC 232
#define MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_mission_clear_all_pack(uint8_t system_id, uin
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message(msg, system_id, component_id, 2, 232);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_mission_clear_all_pack_chan(uint8_t system_id
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 232);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_mission_clear_all_encode(uint8_t system_id, u
static inline void mavlink_msg_mission_clear_all_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, 2, 232);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, buf, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
#else
mavlink_mission_clear_all_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, 2, 232);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CLEAR_ALL, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_mission_clear_all_decode(const mavlink_message_t*
mission_clear_all->target_system = mavlink_msg_mission_clear_all_get_target_system(msg);
mission_clear_all->target_component = mavlink_msg_mission_clear_all_get_target_component(msg);
#else
memcpy(mission_clear_all, _MAV_PAYLOAD(msg), 2);
memcpy(mission_clear_all, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_CLEAR_ALL_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_mission_count_t
#define MAVLINK_MSG_ID_MISSION_COUNT_LEN 4
#define MAVLINK_MSG_ID_44_LEN 4
#define MAVLINK_MSG_ID_MISSION_COUNT_CRC 221
#define MAVLINK_MSG_ID_44_CRC 221
#define MAVLINK_MESSAGE_INFO_MISSION_COUNT { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t
uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message(msg, system_id, component_id, 4, 221);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, ui
uint8_t target_system,uint8_t target_component,uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_COUNT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 221);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8
static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN];
_mav_put_uint16_t(buf, 0, count);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, 4, 221);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
#else
mavlink_mission_count_t packet;
packet.count = count;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, 4, 221);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_mission_count_decode(const mavlink_message_t* msg
mission_count->target_system = mavlink_msg_mission_count_get_target_system(msg);
mission_count->target_component = mavlink_msg_mission_count_get_target_component(msg);
#else
memcpy(mission_count, _MAV_PAYLOAD(msg), 4);
memcpy(mission_count, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_COUNT_LEN);
#endif
}

View File

@ -10,6 +10,9 @@ typedef struct __mavlink_mission_current_t
#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 2
#define MAVLINK_MSG_ID_42_LEN 2
#define MAVLINK_MSG_ID_MISSION_CURRENT_CRC 28
#define MAVLINK_MSG_ID_42_CRC 28
#define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \
@ -33,19 +36,23 @@ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message(msg, system_id, component_id, 2, 28);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
}
/**
@ -62,19 +69,23 @@ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#else
mavlink_mission_current_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 28);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
}
/**
@ -101,15 +112,23 @@ static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uin
static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, 2, 28);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
#else
mavlink_mission_current_t packet;
packet.seq = seq;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, 2, 28);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
#endif
}
@ -139,6 +158,6 @@ static inline void mavlink_msg_mission_current_decode(const mavlink_message_t* m
#if MAVLINK_NEED_BYTE_SWAP
mission_current->seq = mavlink_msg_mission_current_get_seq(msg);
#else
memcpy(mission_current, _MAV_PAYLOAD(msg), 2);
memcpy(mission_current, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif
}

View File

@ -23,6 +23,9 @@ typedef struct __mavlink_mission_item_t
#define MAVLINK_MSG_ID_MISSION_ITEM_LEN 37
#define MAVLINK_MSG_ID_39_LEN 37
#define MAVLINK_MSG_ID_MISSION_ITEM_CRC 254
#define MAVLINK_MSG_ID_39_CRC 254
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM { \
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t
uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -88,7 +91,7 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
@ -106,11 +109,15 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t
packet.current = current;
packet.autocontinue = autocontinue;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message(msg, system_id, component_id, 37, 254);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
}
/**
@ -140,7 +147,7 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uin
uint8_t target_system,uint8_t target_component,uint16_t seq,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,float param1,float param2,float param3,float param4,float x,float y,float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -156,7 +163,7 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uin
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 37);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
@ -174,11 +181,15 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uin
packet.current = current;
packet.autocontinue = autocontinue;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 37);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 37, 254);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
}
/**
@ -218,7 +229,7 @@ static inline uint16_t mavlink_msg_mission_item_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, float x, float y, float z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[37];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_LEN];
_mav_put_float(buf, 0, param1);
_mav_put_float(buf, 4, param2);
_mav_put_float(buf, 8, param3);
@ -234,7 +245,11 @@ static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t
_mav_put_uint8_t(buf, 35, current);
_mav_put_uint8_t(buf, 36, autocontinue);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, 37, 254);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, buf, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
#else
mavlink_mission_item_t packet;
packet.param1 = param1;
@ -252,7 +267,11 @@ static inline void mavlink_msg_mission_item_send(mavlink_channel_t chan, uint8_t
packet.current = current;
packet.autocontinue = autocontinue;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, (const char *)&packet, 37, 254);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ITEM_LEN, MAVLINK_MSG_ID_MISSION_ITEM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
#endif
}
@ -425,6 +444,6 @@ static inline void mavlink_msg_mission_item_decode(const mavlink_message_t* msg,
mission_item->current = mavlink_msg_mission_item_get_current(msg);
mission_item->autocontinue = mavlink_msg_mission_item_get_autocontinue(msg);
#else
memcpy(mission_item, _MAV_PAYLOAD(msg), 37);
memcpy(mission_item, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_ITEM_LEN);
#endif
}

View File

@ -10,6 +10,9 @@ typedef struct __mavlink_mission_item_reached_t
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN 2
#define MAVLINK_MSG_ID_46_LEN 2
#define MAVLINK_MSG_ID_MISSION_ITEM_REACHED_CRC 11
#define MAVLINK_MSG_ID_46_CRC 11
#define MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED { \
@ -33,19 +36,23 @@ static inline uint16_t mavlink_msg_mission_item_reached_pack(uint8_t system_id,
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message(msg, system_id, component_id, 2, 11);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
}
/**
@ -62,19 +69,23 @@ static inline uint16_t mavlink_msg_mission_item_reached_pack_chan(uint8_t system
uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN];
_mav_put_uint16_t(buf, 0, seq);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 11);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
}
/**
@ -101,15 +112,23 @@ static inline uint16_t mavlink_msg_mission_item_reached_encode(uint8_t system_id
static inline void mavlink_msg_mission_item_reached_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, buf, 2, 11);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, buf, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, buf, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
#else
mavlink_mission_item_reached_t packet;
packet.seq = seq;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, (const char *)&packet, 2, 11);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ITEM_REACHED, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
#endif
}
@ -139,6 +158,6 @@ static inline void mavlink_msg_mission_item_reached_decode(const mavlink_message
#if MAVLINK_NEED_BYTE_SWAP
mission_item_reached->seq = mavlink_msg_mission_item_reached_get_seq(msg);
#else
memcpy(mission_item_reached, _MAV_PAYLOAD(msg), 2);
memcpy(mission_item_reached, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_ITEM_REACHED_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_mission_request_t
#define MAVLINK_MSG_ID_MISSION_REQUEST_LEN 4
#define MAVLINK_MSG_ID_40_LEN 4
#define MAVLINK_MSG_ID_MISSION_REQUEST_CRC 230
#define MAVLINK_MSG_ID_40_CRC 230
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_mission_request_pack(uint8_t system_id, uint8
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message(msg, system_id, component_id, 4, 230);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_mission_request_pack_chan(uint8_t system_id,
uint8_t target_system,uint8_t target_component,uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 230);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_mission_request_encode(uint8_t system_id, uin
static inline void mavlink_msg_mission_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, buf, 4, 230);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
#else
mavlink_mission_request_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, (const char *)&packet, 4, 230);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_mission_request_decode(const mavlink_message_t* m
mission_request->target_system = mavlink_msg_mission_request_get_target_system(msg);
mission_request->target_component = mavlink_msg_mission_request_get_target_component(msg);
#else
memcpy(mission_request, _MAV_PAYLOAD(msg), 4);
memcpy(mission_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_REQUEST_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_mission_request_list_t
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN 2
#define MAVLINK_MSG_ID_43_LEN 2
#define MAVLINK_MSG_ID_MISSION_REQUEST_LIST_CRC 132
#define MAVLINK_MSG_ID_43_CRC 132
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_mission_request_list_pack(uint8_t system_id,
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 2, 132);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_mission_request_list_pack_chan(uint8_t system
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 132);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_mission_request_list_encode(uint8_t system_id
static inline void mavlink_msg_mission_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, buf, 2, 132);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
#else
mavlink_mission_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, (const char *)&packet, 2, 132);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_mission_request_list_decode(const mavlink_message
mission_request_list->target_system = mavlink_msg_mission_request_list_get_target_system(msg);
mission_request_list->target_component = mavlink_msg_mission_request_list_get_target_component(msg);
#else
memcpy(mission_request_list, _MAV_PAYLOAD(msg), 2);
memcpy(mission_request_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_REQUEST_LIST_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_mission_request_partial_list_t
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN 6
#define MAVLINK_MSG_ID_37_LEN 6
#define MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_CRC 212
#define MAVLINK_MSG_ID_37_CRC 212
#define MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST { \
@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack(uint8_t sys
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack(uint8_t sys
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 6, 212);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
}
/**
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack_chan(uint8_
uint8_t target_system,uint8_t target_component,int16_t start_index,int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack_chan(uint8_
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 212);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
}
/**
@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_encode(uint8_t s
static inline void mavlink_msg_mission_request_partial_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, buf, 6, 212);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, buf, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
#else
mavlink_mission_request_partial_list_t packet;
packet.start_index = start_index;
@ -142,7 +157,11 @@ static inline void mavlink_msg_mission_request_partial_list_send(mavlink_channel
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, (const char *)&packet, 6, 212);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
#endif
}
@ -205,6 +224,6 @@ static inline void mavlink_msg_mission_request_partial_list_decode(const mavlink
mission_request_partial_list->target_system = mavlink_msg_mission_request_partial_list_get_target_system(msg);
mission_request_partial_list->target_component = mavlink_msg_mission_request_partial_list_get_target_component(msg);
#else
memcpy(mission_request_partial_list, _MAV_PAYLOAD(msg), 6);
memcpy(mission_request_partial_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_mission_set_current_t
#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN 4
#define MAVLINK_MSG_ID_41_LEN 4
#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC 28
#define MAVLINK_MSG_ID_41_CRC 28
#define MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT { \
@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_mission_set_current_pack(uint8_t system_id, u
uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
return mavlink_finalize_message(msg, system_id, component_id, 4, 28);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
}
/**
@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_mission_set_current_pack_chan(uint8_t system_
uint8_t target_system,uint8_t target_component,uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 28);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
}
/**
@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_mission_set_current_encode(uint8_t system_id,
static inline void mavlink_msg_mission_set_current_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[4];
char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
_mav_put_uint16_t(buf, 0, seq);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, 4, 28);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
#else
mavlink_mission_set_current_t packet;
packet.seq = seq;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (const char *)&packet, 4, 28);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
#endif
}
@ -183,6 +202,6 @@ static inline void mavlink_msg_mission_set_current_decode(const mavlink_message_
mission_set_current->target_system = mavlink_msg_mission_set_current_get_target_system(msg);
mission_set_current->target_component = mavlink_msg_mission_set_current_get_target_component(msg);
#else
memcpy(mission_set_current, _MAV_PAYLOAD(msg), 4);
memcpy(mission_set_current, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_mission_write_partial_list_t
#define MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN 6
#define MAVLINK_MSG_ID_38_LEN 6
#define MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_CRC 9
#define MAVLINK_MSG_ID_38_CRC 9
#define MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST { \
@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack(uint8_t syste
uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack(uint8_t syste
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 6, 9);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
}
/**
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack_chan(uint8_t
uint8_t target_system,uint8_t target_component,int16_t start_index,int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack_chan(uint8_t
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 9);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
}
/**
@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_encode(uint8_t sys
static inline void mavlink_msg_mission_write_partial_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t start_index, int16_t end_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN];
_mav_put_int16_t(buf, 0, start_index);
_mav_put_int16_t(buf, 2, end_index);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, buf, 6, 9);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, buf, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, buf, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
#else
mavlink_mission_write_partial_list_t packet;
packet.start_index = start_index;
@ -142,7 +157,11 @@ static inline void mavlink_msg_mission_write_partial_list_send(mavlink_channel_t
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, (const char *)&packet, 6, 9);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST, (const char *)&packet, MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
#endif
}
@ -205,6 +224,6 @@ static inline void mavlink_msg_mission_write_partial_list_decode(const mavlink_m
mission_write_partial_list->target_system = mavlink_msg_mission_write_partial_list_get_target_system(msg);
mission_write_partial_list->target_component = mavlink_msg_mission_write_partial_list_get_target_component(msg);
#else
memcpy(mission_write_partial_list, _MAV_PAYLOAD(msg), 6);
memcpy(mission_write_partial_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_named_value_float_t
#define MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN 18
#define MAVLINK_MSG_ID_251_LEN 18
#define MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_CRC 170
#define MAVLINK_MSG_ID_251_CRC 170
#define MAVLINK_MSG_NAMED_VALUE_FLOAT_FIELD_NAME_LEN 10
#define MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_named_value_float_pack(uint8_t system_id, uin
uint32_t time_boot_ms, const char *name, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
return mavlink_finalize_message(msg, system_id, component_id, 18, 170);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_named_value_float_pack_chan(uint8_t system_id
uint32_t time_boot_ms,const char *name,float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 170);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_named_value_float_encode(uint8_t system_id, u
static inline void mavlink_msg_named_value_float_send(mavlink_channel_t chan, uint32_t time_boot_ms, const char *name, float value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, buf, 18, 170);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, buf, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, buf, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
#else
mavlink_named_value_float_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, (const char *)&packet, 18, 170);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, (const char *)&packet, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT, (const char *)&packet, MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_named_value_float_decode(const mavlink_message_t*
named_value_float->value = mavlink_msg_named_value_float_get_value(msg);
mavlink_msg_named_value_float_get_name(msg, named_value_float->name);
#else
memcpy(named_value_float, _MAV_PAYLOAD(msg), 18);
memcpy(named_value_float, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_NAMED_VALUE_FLOAT_LEN);
#endif
}

View File

@ -12,6 +12,9 @@ typedef struct __mavlink_named_value_int_t
#define MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN 18
#define MAVLINK_MSG_ID_252_LEN 18
#define MAVLINK_MSG_ID_NAMED_VALUE_INT_CRC 44
#define MAVLINK_MSG_ID_252_CRC 44
#define MAVLINK_MSG_NAMED_VALUE_INT_FIELD_NAME_LEN 10
#define MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT { \
@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_named_value_int_pack(uint8_t system_id, uint8
uint32_t time_boot_ms, const char *name, int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_INT;
return mavlink_finalize_message(msg, system_id, component_id, 18, 44);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_INT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
}
/**
@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_named_value_int_pack_chan(uint8_t system_id,
uint32_t time_boot_ms,const char *name,int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAMED_VALUE_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 44);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_INT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
}
/**
@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_named_value_int_encode(uint8_t system_id, uin
static inline void mavlink_msg_named_value_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, const char *name, int32_t value)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int32_t(buf, 4, value);
_mav_put_char_array(buf, 8, name, 10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, buf, 18, 44);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
#else
mavlink_named_value_int_t packet;
packet.time_boot_ms = time_boot_ms;
packet.value = value;
mav_array_memcpy(packet.name, name, sizeof(char)*10);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, (const char *)&packet, 18, 44);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, (const char *)&packet, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN, MAVLINK_MSG_ID_NAMED_VALUE_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAMED_VALUE_INT, (const char *)&packet, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
#endif
}
@ -177,6 +196,6 @@ static inline void mavlink_msg_named_value_int_decode(const mavlink_message_t* m
named_value_int->value = mavlink_msg_named_value_int_get_value(msg);
mavlink_msg_named_value_int_get_name(msg, named_value_int->name);
#else
memcpy(named_value_int, _MAV_PAYLOAD(msg), 18);
memcpy(named_value_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);
#endif
}

View File

@ -17,6 +17,9 @@ typedef struct __mavlink_nav_controller_output_t
#define MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN 26
#define MAVLINK_MSG_ID_62_LEN 26
#define MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_CRC 183
#define MAVLINK_MSG_ID_62_CRC 183
#define MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT { \
@ -54,7 +57,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack(uint8_t system_id,
float nav_roll, float nav_pitch, int16_t nav_bearing, int16_t target_bearing, uint16_t wp_dist, float alt_error, float aspd_error, float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
@ -64,7 +67,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack(uint8_t system_id,
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
@ -76,11 +79,15 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack(uint8_t system_id,
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT;
return mavlink_finalize_message(msg, system_id, component_id, 26, 183);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
}
/**
@ -104,7 +111,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack_chan(uint8_t syste
float nav_roll,float nav_pitch,int16_t nav_bearing,int16_t target_bearing,uint16_t wp_dist,float alt_error,float aspd_error,float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
@ -114,7 +121,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack_chan(uint8_t syste
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
@ -126,11 +133,15 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack_chan(uint8_t syste
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 183);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
}
/**
@ -164,7 +175,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_encode(uint8_t system_i
static inline void mavlink_msg_nav_controller_output_send(mavlink_channel_t chan, float nav_roll, float nav_pitch, int16_t nav_bearing, int16_t target_bearing, uint16_t wp_dist, float alt_error, float aspd_error, float xtrack_error)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN];
_mav_put_float(buf, 0, nav_roll);
_mav_put_float(buf, 4, nav_pitch);
_mav_put_float(buf, 8, alt_error);
@ -174,7 +185,11 @@ static inline void mavlink_msg_nav_controller_output_send(mavlink_channel_t chan
_mav_put_int16_t(buf, 22, target_bearing);
_mav_put_uint16_t(buf, 24, wp_dist);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, buf, 26, 183);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, buf, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, buf, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
#else
mavlink_nav_controller_output_t packet;
packet.nav_roll = nav_roll;
@ -186,7 +201,11 @@ static inline void mavlink_msg_nav_controller_output_send(mavlink_channel_t chan
packet.target_bearing = target_bearing;
packet.wp_dist = wp_dist;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, (const char *)&packet, 26, 183);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, (const char *)&packet, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT, (const char *)&packet, MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
#endif
}
@ -293,6 +312,6 @@ static inline void mavlink_msg_nav_controller_output_decode(const mavlink_messag
nav_controller_output->target_bearing = mavlink_msg_nav_controller_output_get_target_bearing(msg);
nav_controller_output->wp_dist = mavlink_msg_nav_controller_output_get_wp_dist(msg);
#else
memcpy(nav_controller_output, _MAV_PAYLOAD(msg), 26);
memcpy(nav_controller_output, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT_LEN);
#endif
}

View File

@ -0,0 +1,268 @@
// MESSAGE OMNIDIRECTIONAL_FLOW PACKING
#define MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW 106
typedef struct __mavlink_omnidirectional_flow_t
{
uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot)
float front_distance_m; ///< Front distance in meters. Positive value (including zero): distance known. Negative value: Unknown distance
int16_t left[10]; ///< Flow in deci pixels (1 = 0.1 pixel) on left hemisphere
int16_t right[10]; ///< Flow in deci pixels (1 = 0.1 pixel) on right hemisphere
uint8_t sensor_id; ///< Sensor ID
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
} mavlink_omnidirectional_flow_t;
#define MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN 54
#define MAVLINK_MSG_ID_106_LEN 54
#define MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_CRC 211
#define MAVLINK_MSG_ID_106_CRC 211
#define MAVLINK_MSG_OMNIDIRECTIONAL_FLOW_FIELD_LEFT_LEN 10
#define MAVLINK_MSG_OMNIDIRECTIONAL_FLOW_FIELD_RIGHT_LEN 10
#define MAVLINK_MESSAGE_INFO_OMNIDIRECTIONAL_FLOW { \
"OMNIDIRECTIONAL_FLOW", \
6, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_omnidirectional_flow_t, time_usec) }, \
{ "front_distance_m", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_omnidirectional_flow_t, front_distance_m) }, \
{ "left", NULL, MAVLINK_TYPE_INT16_T, 10, 12, offsetof(mavlink_omnidirectional_flow_t, left) }, \
{ "right", NULL, MAVLINK_TYPE_INT16_T, 10, 32, offsetof(mavlink_omnidirectional_flow_t, right) }, \
{ "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_omnidirectional_flow_t, sensor_id) }, \
{ "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 53, offsetof(mavlink_omnidirectional_flow_t, quality) }, \
} \
}
/**
* @brief Pack a omnidirectional_flow message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param sensor_id Sensor ID
* @param left Flow in deci pixels (1 = 0.1 pixel) on left hemisphere
* @param right Flow in deci pixels (1 = 0.1 pixel) on right hemisphere
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param front_distance_m Front distance in meters. Positive value (including zero): distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_omnidirectional_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint64_t time_usec, uint8_t sensor_id, const int16_t *left, const int16_t *right, uint8_t quality, float front_distance_m)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, front_distance_m);
_mav_put_uint8_t(buf, 52, sensor_id);
_mav_put_uint8_t(buf, 53, quality);
_mav_put_int16_t_array(buf, 12, left, 10);
_mav_put_int16_t_array(buf, 32, right, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#else
mavlink_omnidirectional_flow_t packet;
packet.time_usec = time_usec;
packet.front_distance_m = front_distance_m;
packet.sensor_id = sensor_id;
packet.quality = quality;
mav_array_memcpy(packet.left, left, sizeof(int16_t)*10);
mav_array_memcpy(packet.right, right, sizeof(int16_t)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
}
/**
* @brief Pack a omnidirectional_flow message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param sensor_id Sensor ID
* @param left Flow in deci pixels (1 = 0.1 pixel) on left hemisphere
* @param right Flow in deci pixels (1 = 0.1 pixel) on right hemisphere
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param front_distance_m Front distance in meters. Positive value (including zero): distance known. Negative value: Unknown distance
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_omnidirectional_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint64_t time_usec,uint8_t sensor_id,const int16_t *left,const int16_t *right,uint8_t quality,float front_distance_m)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, front_distance_m);
_mav_put_uint8_t(buf, 52, sensor_id);
_mav_put_uint8_t(buf, 53, quality);
_mav_put_int16_t_array(buf, 12, left, 10);
_mav_put_int16_t_array(buf, 32, right, 10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#else
mavlink_omnidirectional_flow_t packet;
packet.time_usec = time_usec;
packet.front_distance_m = front_distance_m;
packet.sensor_id = sensor_id;
packet.quality = quality;
mav_array_memcpy(packet.left, left, sizeof(int16_t)*10);
mav_array_memcpy(packet.right, right, sizeof(int16_t)*10);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
}
/**
* @brief Encode a omnidirectional_flow struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param omnidirectional_flow C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_omnidirectional_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_omnidirectional_flow_t* omnidirectional_flow)
{
return mavlink_msg_omnidirectional_flow_pack(system_id, component_id, msg, omnidirectional_flow->time_usec, omnidirectional_flow->sensor_id, omnidirectional_flow->left, omnidirectional_flow->right, omnidirectional_flow->quality, omnidirectional_flow->front_distance_m);
}
/**
* @brief Send a omnidirectional_flow message
* @param chan MAVLink channel to send the message
*
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
* @param sensor_id Sensor ID
* @param left Flow in deci pixels (1 = 0.1 pixel) on left hemisphere
* @param right Flow in deci pixels (1 = 0.1 pixel) on right hemisphere
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
* @param front_distance_m Front distance in meters. Positive value (including zero): distance known. Negative value: Unknown distance
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_omnidirectional_flow_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, const int16_t *left, const int16_t *right, uint8_t quality, float front_distance_m)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, front_distance_m);
_mav_put_uint8_t(buf, 52, sensor_id);
_mav_put_uint8_t(buf, 53, quality);
_mav_put_int16_t_array(buf, 12, left, 10);
_mav_put_int16_t_array(buf, 32, right, 10);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW, buf, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW, buf, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
#else
mavlink_omnidirectional_flow_t packet;
packet.time_usec = time_usec;
packet.front_distance_m = front_distance_m;
packet.sensor_id = sensor_id;
packet.quality = quality;
mav_array_memcpy(packet.left, left, sizeof(int16_t)*10);
mav_array_memcpy(packet.right, right, sizeof(int16_t)*10);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
#endif
}
#endif
// MESSAGE OMNIDIRECTIONAL_FLOW UNPACKING
/**
* @brief Get field time_usec from omnidirectional_flow message
*
* @return Timestamp (microseconds, synced to UNIX time or since system boot)
*/
static inline uint64_t mavlink_msg_omnidirectional_flow_get_time_usec(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint64_t(msg, 0);
}
/**
* @brief Get field sensor_id from omnidirectional_flow message
*
* @return Sensor ID
*/
static inline uint8_t mavlink_msg_omnidirectional_flow_get_sensor_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 52);
}
/**
* @brief Get field left from omnidirectional_flow message
*
* @return Flow in deci pixels (1 = 0.1 pixel) on left hemisphere
*/
static inline uint16_t mavlink_msg_omnidirectional_flow_get_left(const mavlink_message_t* msg, int16_t *left)
{
return _MAV_RETURN_int16_t_array(msg, left, 10, 12);
}
/**
* @brief Get field right from omnidirectional_flow message
*
* @return Flow in deci pixels (1 = 0.1 pixel) on right hemisphere
*/
static inline uint16_t mavlink_msg_omnidirectional_flow_get_right(const mavlink_message_t* msg, int16_t *right)
{
return _MAV_RETURN_int16_t_array(msg, right, 10, 32);
}
/**
* @brief Get field quality from omnidirectional_flow message
*
* @return Optical flow quality / confidence. 0: bad, 255: maximum quality
*/
static inline uint8_t mavlink_msg_omnidirectional_flow_get_quality(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 53);
}
/**
* @brief Get field front_distance_m from omnidirectional_flow message
*
* @return Front distance in meters. Positive value (including zero): distance known. Negative value: Unknown distance
*/
static inline float mavlink_msg_omnidirectional_flow_get_front_distance_m(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Decode a omnidirectional_flow message into a struct
*
* @param msg The message to decode
* @param omnidirectional_flow C-struct to decode the message contents into
*/
static inline void mavlink_msg_omnidirectional_flow_decode(const mavlink_message_t* msg, mavlink_omnidirectional_flow_t* omnidirectional_flow)
{
#if MAVLINK_NEED_BYTE_SWAP
omnidirectional_flow->time_usec = mavlink_msg_omnidirectional_flow_get_time_usec(msg);
omnidirectional_flow->front_distance_m = mavlink_msg_omnidirectional_flow_get_front_distance_m(msg);
mavlink_msg_omnidirectional_flow_get_left(msg, omnidirectional_flow->left);
mavlink_msg_omnidirectional_flow_get_right(msg, omnidirectional_flow->right);
omnidirectional_flow->sensor_id = mavlink_msg_omnidirectional_flow_get_sensor_id(msg);
omnidirectional_flow->quality = mavlink_msg_omnidirectional_flow_get_quality(msg);
#else
memcpy(omnidirectional_flow, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_OMNIDIRECTIONAL_FLOW_LEN);
#endif
}

View File

@ -8,8 +8,8 @@ typedef struct __mavlink_optical_flow_t
float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated
float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated
float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
int16_t flow_x; ///< Flow in pixels in x-sensor direction
int16_t flow_y; ///< Flow in pixels in y-sensor direction
int16_t flow_x; ///< Flow in pixels * 10 in x-sensor direction (dezi-pixels)
int16_t flow_y; ///< Flow in pixels * 10 in y-sensor direction (dezi-pixels)
uint8_t sensor_id; ///< Sensor ID
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
} mavlink_optical_flow_t;
@ -17,6 +17,9 @@ typedef struct __mavlink_optical_flow_t
#define MAVLINK_MSG_ID_OPTICAL_FLOW_LEN 26
#define MAVLINK_MSG_ID_100_LEN 26
#define MAVLINK_MSG_ID_OPTICAL_FLOW_CRC 175
#define MAVLINK_MSG_ID_100_CRC 175
#define MAVLINK_MESSAGE_INFO_OPTICAL_FLOW { \
@ -42,8 +45,8 @@ typedef struct __mavlink_optical_flow_t
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
@ -54,7 +57,7 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t
uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
@ -64,7 +67,7 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
@ -76,11 +79,15 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t
packet.sensor_id = sensor_id;
packet.quality = quality;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
return mavlink_finalize_message(msg, system_id, component_id, 26, 175);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_OPTICAL_FLOW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
}
/**
@ -91,8 +98,8 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t
* @param msg The MAVLink message to compress the data into
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
@ -104,7 +111,7 @@ static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uin
uint64_t time_usec,uint8_t sensor_id,int16_t flow_x,int16_t flow_y,float flow_comp_m_x,float flow_comp_m_y,uint8_t quality,float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
@ -114,7 +121,7 @@ static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uin
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
@ -126,11 +133,15 @@ static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uin
packet.sensor_id = sensor_id;
packet.quality = quality;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 175);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_OPTICAL_FLOW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
}
/**
@ -152,8 +163,8 @@ static inline uint16_t mavlink_msg_optical_flow_encode(uint8_t system_id, uint8_
*
* @param time_usec Timestamp (UNIX)
* @param sensor_id Sensor ID
* @param flow_x Flow in pixels in x-sensor direction
* @param flow_y Flow in pixels in y-sensor direction
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
@ -164,7 +175,7 @@ static inline uint16_t mavlink_msg_optical_flow_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_optical_flow_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_OPTICAL_FLOW_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_float(buf, 8, flow_comp_m_x);
_mav_put_float(buf, 12, flow_comp_m_y);
@ -174,7 +185,11 @@ static inline void mavlink_msg_optical_flow_send(mavlink_channel_t chan, uint64_
_mav_put_uint8_t(buf, 24, sensor_id);
_mav_put_uint8_t(buf, 25, quality);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, buf, 26, 175);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_OPTICAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
#else
mavlink_optical_flow_t packet;
packet.time_usec = time_usec;
@ -186,7 +201,11 @@ static inline void mavlink_msg_optical_flow_send(mavlink_channel_t chan, uint64_
packet.sensor_id = sensor_id;
packet.quality = quality;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, (const char *)&packet, 26, 175);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_OPTICAL_FLOW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
#endif
}
@ -218,7 +237,7 @@ static inline uint8_t mavlink_msg_optical_flow_get_sensor_id(const mavlink_messa
/**
* @brief Get field flow_x from optical_flow message
*
* @return Flow in pixels in x-sensor direction
* @return Flow in pixels * 10 in x-sensor direction (dezi-pixels)
*/
static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_t* msg)
{
@ -228,7 +247,7 @@ static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_
/**
* @brief Get field flow_y from optical_flow message
*
* @return Flow in pixels in y-sensor direction
* @return Flow in pixels * 10 in y-sensor direction (dezi-pixels)
*/
static inline int16_t mavlink_msg_optical_flow_get_flow_y(const mavlink_message_t* msg)
{
@ -293,6 +312,6 @@ static inline void mavlink_msg_optical_flow_decode(const mavlink_message_t* msg,
optical_flow->sensor_id = mavlink_msg_optical_flow_get_sensor_id(msg);
optical_flow->quality = mavlink_msg_optical_flow_get_quality(msg);
#else
memcpy(optical_flow, _MAV_PAYLOAD(msg), 26);
memcpy(optical_flow, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_OPTICAL_FLOW_LEN);
#endif
}

View File

@ -11,6 +11,9 @@ typedef struct __mavlink_param_request_list_t
#define MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN 2
#define MAVLINK_MSG_ID_21_LEN 2
#define MAVLINK_MSG_ID_PARAM_REQUEST_LIST_CRC 159
#define MAVLINK_MSG_ID_21_CRC 159
#define MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST { \
@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_param_request_list_pack(uint8_t system_id, ui
uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST;
return mavlink_finalize_message(msg, system_id, component_id, 2, 159);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
}
/**
@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_param_request_list_pack_chan(uint8_t system_i
uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 2);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 159);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
}
/**
@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_param_request_list_encode(uint8_t system_id,
static inline void mavlink_msg_param_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[2];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN];
_mav_put_uint8_t(buf, 0, target_system);
_mav_put_uint8_t(buf, 1, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, buf, 2, 159);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, buf, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, buf, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
#else
mavlink_param_request_list_t packet;
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, (const char *)&packet, 2, 159);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
#endif
}
@ -161,6 +180,6 @@ static inline void mavlink_msg_param_request_list_decode(const mavlink_message_t
param_request_list->target_system = mavlink_msg_param_request_list_get_target_system(msg);
param_request_list->target_component = mavlink_msg_param_request_list_get_target_component(msg);
#else
memcpy(param_request_list, _MAV_PAYLOAD(msg), 2);
memcpy(param_request_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PARAM_REQUEST_LIST_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_param_request_read_t
#define MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN 20
#define MAVLINK_MSG_ID_20_LEN 20
#define MAVLINK_MSG_ID_PARAM_REQUEST_READ_CRC 214
#define MAVLINK_MSG_ID_20_CRC 214
#define MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN 16
#define MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ { \
@ -42,23 +45,27 @@ static inline uint16_t mavlink_msg_param_request_read_pack(uint8_t system_id, ui
uint8_t target_system, uint8_t target_component, const char *param_id, int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
return mavlink_finalize_message(msg, system_id, component_id, 20, 214);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_READ_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
}
/**
@ -78,23 +85,27 @@ static inline uint16_t mavlink_msg_param_request_read_pack_chan(uint8_t system_i
uint8_t target_system,uint8_t target_component,const char *param_id,int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 214);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_READ_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
}
/**
@ -124,19 +135,27 @@ static inline uint16_t mavlink_msg_param_request_read_encode(uint8_t system_id,
static inline void mavlink_msg_param_request_read_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, int16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN];
_mav_put_int16_t(buf, 0, param_index);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_char_array(buf, 4, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, buf, 20, 214);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, buf, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_READ_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, buf, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
#else
mavlink_param_request_read_t packet;
packet.param_index = param_index;
packet.target_system = target_system;
packet.target_component = target_component;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, (const char *)&packet, 20, 214);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, (const char *)&packet, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN, MAVLINK_MSG_ID_PARAM_REQUEST_READ_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_REQUEST_READ, (const char *)&packet, MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
#endif
}
@ -199,6 +218,6 @@ static inline void mavlink_msg_param_request_read_decode(const mavlink_message_t
param_request_read->target_component = mavlink_msg_param_request_read_get_target_component(msg);
mavlink_msg_param_request_read_get_param_id(msg, param_request_read->param_id);
#else
memcpy(param_request_read, _MAV_PAYLOAD(msg), 20);
memcpy(param_request_read, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PARAM_REQUEST_READ_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_param_set_t
#define MAVLINK_MSG_ID_PARAM_SET_LEN 23
#define MAVLINK_MSG_ID_23_LEN 23
#define MAVLINK_MSG_ID_PARAM_SET_CRC 168
#define MAVLINK_MSG_ID_23_CRC 168
#define MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN 16
#define MAVLINK_MESSAGE_INFO_PARAM_SET { \
@ -45,13 +48,13 @@ static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t com
uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
char buf[MAVLINK_MSG_ID_PARAM_SET_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 23);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_SET_LEN);
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
@ -59,11 +62,15 @@ static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t com
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 23);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_SET;
return mavlink_finalize_message(msg, system_id, component_id, 23, 168);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_SET_LEN, MAVLINK_MSG_ID_PARAM_SET_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
}
/**
@ -84,13 +91,13 @@ static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_
uint8_t target_system,uint8_t target_component,const char *param_id,float param_value,uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
char buf[MAVLINK_MSG_ID_PARAM_SET_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 23);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_SET_LEN);
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
@ -98,11 +105,15 @@ static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 23);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_SET;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 23, 168);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_SET_LEN, MAVLINK_MSG_ID_PARAM_SET_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
}
/**
@ -133,13 +144,17 @@ static inline uint16_t mavlink_msg_param_set_encode(uint8_t system_id, uint8_t c
static inline void mavlink_msg_param_set_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[23];
char buf[MAVLINK_MSG_ID_PARAM_SET_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint8_t(buf, 4, target_system);
_mav_put_uint8_t(buf, 5, target_component);
_mav_put_uint8_t(buf, 22, param_type);
_mav_put_char_array(buf, 6, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, buf, 23, 168);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, buf, MAVLINK_MSG_ID_PARAM_SET_LEN, MAVLINK_MSG_ID_PARAM_SET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, buf, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
#else
mavlink_param_set_t packet;
packet.param_value = param_value;
@ -147,7 +162,11 @@ static inline void mavlink_msg_param_set_send(mavlink_channel_t chan, uint8_t ta
packet.target_component = target_component;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, (const char *)&packet, 23, 168);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, (const char *)&packet, MAVLINK_MSG_ID_PARAM_SET_LEN, MAVLINK_MSG_ID_PARAM_SET_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_SET, (const char *)&packet, MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
#endif
}
@ -221,6 +240,6 @@ static inline void mavlink_msg_param_set_decode(const mavlink_message_t* msg, ma
mavlink_msg_param_set_get_param_id(msg, param_set->param_id);
param_set->param_type = mavlink_msg_param_set_get_param_type(msg);
#else
memcpy(param_set, _MAV_PAYLOAD(msg), 23);
memcpy(param_set, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PARAM_SET_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_param_value_t
#define MAVLINK_MSG_ID_PARAM_VALUE_LEN 25
#define MAVLINK_MSG_ID_22_LEN 25
#define MAVLINK_MSG_ID_PARAM_VALUE_CRC 220
#define MAVLINK_MSG_ID_22_CRC 220
#define MAVLINK_MSG_PARAM_VALUE_FIELD_PARAM_ID_LEN 16
#define MAVLINK_MESSAGE_INFO_PARAM_VALUE { \
@ -45,13 +48,13 @@ static inline uint16_t mavlink_msg_param_value_pack(uint8_t system_id, uint8_t c
const char *param_id, float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_PARAM_VALUE_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
@ -59,11 +62,15 @@ static inline uint16_t mavlink_msg_param_value_pack(uint8_t system_id, uint8_t c
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE;
return mavlink_finalize_message(msg, system_id, component_id, 25, 220);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_VALUE_LEN, MAVLINK_MSG_ID_PARAM_VALUE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
}
/**
@ -84,13 +91,13 @@ static inline uint16_t mavlink_msg_param_value_pack_chan(uint8_t system_id, uint
const char *param_id,float param_value,uint8_t param_type,uint16_t param_count,uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_PARAM_VALUE_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
@ -98,11 +105,15 @@ static inline uint16_t mavlink_msg_param_value_pack_chan(uint8_t system_id, uint
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 25, 220);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_VALUE_LEN, MAVLINK_MSG_ID_PARAM_VALUE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
}
/**
@ -133,13 +144,17 @@ static inline uint16_t mavlink_msg_param_value_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_param_value_send(mavlink_channel_t chan, const char *param_id, float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_PARAM_VALUE_LEN];
_mav_put_float(buf, 0, param_value);
_mav_put_uint16_t(buf, 4, param_count);
_mav_put_uint16_t(buf, 6, param_index);
_mav_put_uint8_t(buf, 24, param_type);
_mav_put_char_array(buf, 8, param_id, 16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, buf, 25, 220);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, buf, MAVLINK_MSG_ID_PARAM_VALUE_LEN, MAVLINK_MSG_ID_PARAM_VALUE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, buf, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
#else
mavlink_param_value_t packet;
packet.param_value = param_value;
@ -147,7 +162,11 @@ static inline void mavlink_msg_param_value_send(mavlink_channel_t chan, const ch
packet.param_index = param_index;
packet.param_type = param_type;
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, (const char *)&packet, 25, 220);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, (const char *)&packet, MAVLINK_MSG_ID_PARAM_VALUE_LEN, MAVLINK_MSG_ID_PARAM_VALUE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE, (const char *)&packet, MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
#endif
}
@ -221,6 +240,6 @@ static inline void mavlink_msg_param_value_decode(const mavlink_message_t* msg,
mavlink_msg_param_value_get_param_id(msg, param_value->param_id);
param_value->param_type = mavlink_msg_param_value_get_param_type(msg);
#else
memcpy(param_value, _MAV_PAYLOAD(msg), 25);
memcpy(param_value, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PARAM_VALUE_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_ping_t
#define MAVLINK_MSG_ID_PING_LEN 14
#define MAVLINK_MSG_ID_4_LEN 14
#define MAVLINK_MSG_ID_PING_CRC 237
#define MAVLINK_MSG_ID_4_CRC 237
#define MAVLINK_MESSAGE_INFO_PING { \
@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_ping_pack(uint8_t system_id, uint8_t componen
uint64_t time_usec, uint32_t seq, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_PING_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PING_LEN);
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_ping_pack(uint8_t system_id, uint8_t componen
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PING_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PING;
return mavlink_finalize_message(msg, system_id, component_id, 14, 237);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PING_LEN, MAVLINK_MSG_ID_PING_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PING_LEN);
#endif
}
/**
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_ping_pack_chan(uint8_t system_id, uint8_t com
uint64_t time_usec,uint32_t seq,uint8_t target_system,uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_PING_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PING_LEN);
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_ping_pack_chan(uint8_t system_id, uint8_t com
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PING_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_PING;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 237);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PING_LEN, MAVLINK_MSG_ID_PING_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PING_LEN);
#endif
}
/**
@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_ping_encode(uint8_t system_id, uint8_t compon
static inline void mavlink_msg_ping_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t seq, uint8_t target_system, uint8_t target_component)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_PING_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_uint32_t(buf, 8, seq);
_mav_put_uint8_t(buf, 12, target_system);
_mav_put_uint8_t(buf, 13, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, buf, 14, 237);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, buf, MAVLINK_MSG_ID_PING_LEN, MAVLINK_MSG_ID_PING_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, buf, MAVLINK_MSG_ID_PING_LEN);
#endif
#else
mavlink_ping_t packet;
packet.time_usec = time_usec;
@ -142,7 +157,11 @@ static inline void mavlink_msg_ping_send(mavlink_channel_t chan, uint64_t time_u
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, (const char *)&packet, 14, 237);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, (const char *)&packet, MAVLINK_MSG_ID_PING_LEN, MAVLINK_MSG_ID_PING_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PING, (const char *)&packet, MAVLINK_MSG_ID_PING_LEN);
#endif
#endif
}
@ -205,6 +224,6 @@ static inline void mavlink_msg_ping_decode(const mavlink_message_t* msg, mavlink
ping->target_system = mavlink_msg_ping_get_target_system(msg);
ping->target_component = mavlink_msg_ping_get_target_component(msg);
#else
memcpy(ping, _MAV_PAYLOAD(msg), 14);
memcpy(ping, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PING_LEN);
#endif
}

View File

@ -0,0 +1,295 @@
// MESSAGE RADIO_STATUS PACKING
#define MAVLINK_MSG_ID_RADIO_STATUS 109
typedef struct __mavlink_radio_status_t
{
uint16_t rxerrors; ///< receive errors
uint16_t fixed; ///< count of error corrected packets
uint8_t rssi; ///< local signal strength
uint8_t remrssi; ///< remote signal strength
uint8_t txbuf; ///< how full the tx buffer is as a percentage
uint8_t noise; ///< background noise level
uint8_t remnoise; ///< remote background noise level
} mavlink_radio_status_t;
#define MAVLINK_MSG_ID_RADIO_STATUS_LEN 9
#define MAVLINK_MSG_ID_109_LEN 9
#define MAVLINK_MSG_ID_RADIO_STATUS_CRC 185
#define MAVLINK_MSG_ID_109_CRC 185
#define MAVLINK_MESSAGE_INFO_RADIO_STATUS { \
"RADIO_STATUS", \
7, \
{ { "rxerrors", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_radio_status_t, rxerrors) }, \
{ "fixed", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_radio_status_t, fixed) }, \
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_radio_status_t, rssi) }, \
{ "remrssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_radio_status_t, remrssi) }, \
{ "txbuf", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_radio_status_t, txbuf) }, \
{ "noise", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_radio_status_t, noise) }, \
{ "remnoise", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_radio_status_t, remnoise) }, \
} \
}
/**
* @brief Pack a radio_status message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param rssi local signal strength
* @param remrssi remote signal strength
* @param txbuf how full the tx buffer is as a percentage
* @param noise background noise level
* @param remnoise remote background noise level
* @param rxerrors receive errors
* @param fixed count of error corrected packets
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_radio_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t rssi, uint8_t remrssi, uint8_t txbuf, uint8_t noise, uint8_t remnoise, uint16_t rxerrors, uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RADIO_STATUS_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
_mav_put_uint8_t(buf, 5, remrssi);
_mav_put_uint8_t(buf, 6, txbuf);
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#else
mavlink_radio_status_t packet;
packet.rxerrors = rxerrors;
packet.fixed = fixed;
packet.rssi = rssi;
packet.remrssi = remrssi;
packet.txbuf = txbuf;
packet.noise = noise;
packet.remnoise = remnoise;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RADIO_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RADIO_STATUS_LEN, MAVLINK_MSG_ID_RADIO_STATUS_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
}
/**
* @brief Pack a radio_status message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param rssi local signal strength
* @param remrssi remote signal strength
* @param txbuf how full the tx buffer is as a percentage
* @param noise background noise level
* @param remnoise remote background noise level
* @param rxerrors receive errors
* @param fixed count of error corrected packets
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_radio_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t rssi,uint8_t remrssi,uint8_t txbuf,uint8_t noise,uint8_t remnoise,uint16_t rxerrors,uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RADIO_STATUS_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
_mav_put_uint8_t(buf, 5, remrssi);
_mav_put_uint8_t(buf, 6, txbuf);
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#else
mavlink_radio_status_t packet;
packet.rxerrors = rxerrors;
packet.fixed = fixed;
packet.rssi = rssi;
packet.remrssi = remrssi;
packet.txbuf = txbuf;
packet.noise = noise;
packet.remnoise = remnoise;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RADIO_STATUS;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RADIO_STATUS_LEN, MAVLINK_MSG_ID_RADIO_STATUS_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
}
/**
* @brief Encode a radio_status struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param radio_status C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_radio_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_radio_status_t* radio_status)
{
return mavlink_msg_radio_status_pack(system_id, component_id, msg, radio_status->rssi, radio_status->remrssi, radio_status->txbuf, radio_status->noise, radio_status->remnoise, radio_status->rxerrors, radio_status->fixed);
}
/**
* @brief Send a radio_status message
* @param chan MAVLink channel to send the message
*
* @param rssi local signal strength
* @param remrssi remote signal strength
* @param txbuf how full the tx buffer is as a percentage
* @param noise background noise level
* @param remnoise remote background noise level
* @param rxerrors receive errors
* @param fixed count of error corrected packets
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_radio_status_send(mavlink_channel_t chan, uint8_t rssi, uint8_t remrssi, uint8_t txbuf, uint8_t noise, uint8_t remnoise, uint16_t rxerrors, uint16_t fixed)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RADIO_STATUS_LEN];
_mav_put_uint16_t(buf, 0, rxerrors);
_mav_put_uint16_t(buf, 2, fixed);
_mav_put_uint8_t(buf, 4, rssi);
_mav_put_uint8_t(buf, 5, remrssi);
_mav_put_uint8_t(buf, 6, txbuf);
_mav_put_uint8_t(buf, 7, noise);
_mav_put_uint8_t(buf, 8, remnoise);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO_STATUS, buf, MAVLINK_MSG_ID_RADIO_STATUS_LEN, MAVLINK_MSG_ID_RADIO_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO_STATUS, buf, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
#else
mavlink_radio_status_t packet;
packet.rxerrors = rxerrors;
packet.fixed = fixed;
packet.rssi = rssi;
packet.remrssi = remrssi;
packet.txbuf = txbuf;
packet.noise = noise;
packet.remnoise = remnoise;
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO_STATUS, (const char *)&packet, MAVLINK_MSG_ID_RADIO_STATUS_LEN, MAVLINK_MSG_ID_RADIO_STATUS_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RADIO_STATUS, (const char *)&packet, MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
#endif
}
#endif
// MESSAGE RADIO_STATUS UNPACKING
/**
* @brief Get field rssi from radio_status message
*
* @return local signal strength
*/
static inline uint8_t mavlink_msg_radio_status_get_rssi(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field remrssi from radio_status message
*
* @return remote signal strength
*/
static inline uint8_t mavlink_msg_radio_status_get_remrssi(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 5);
}
/**
* @brief Get field txbuf from radio_status message
*
* @return how full the tx buffer is as a percentage
*/
static inline uint8_t mavlink_msg_radio_status_get_txbuf(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 6);
}
/**
* @brief Get field noise from radio_status message
*
* @return background noise level
*/
static inline uint8_t mavlink_msg_radio_status_get_noise(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 7);
}
/**
* @brief Get field remnoise from radio_status message
*
* @return remote background noise level
*/
static inline uint8_t mavlink_msg_radio_status_get_remnoise(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field rxerrors from radio_status message
*
* @return receive errors
*/
static inline uint16_t mavlink_msg_radio_status_get_rxerrors(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
}
/**
* @brief Get field fixed from radio_status message
*
* @return count of error corrected packets
*/
static inline uint16_t mavlink_msg_radio_status_get_fixed(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 2);
}
/**
* @brief Decode a radio_status message into a struct
*
* @param msg The message to decode
* @param radio_status C-struct to decode the message contents into
*/
static inline void mavlink_msg_radio_status_decode(const mavlink_message_t* msg, mavlink_radio_status_t* radio_status)
{
#if MAVLINK_NEED_BYTE_SWAP
radio_status->rxerrors = mavlink_msg_radio_status_get_rxerrors(msg);
radio_status->fixed = mavlink_msg_radio_status_get_fixed(msg);
radio_status->rssi = mavlink_msg_radio_status_get_rssi(msg);
radio_status->remrssi = mavlink_msg_radio_status_get_remrssi(msg);
radio_status->txbuf = mavlink_msg_radio_status_get_txbuf(msg);
radio_status->noise = mavlink_msg_radio_status_get_noise(msg);
radio_status->remnoise = mavlink_msg_radio_status_get_remnoise(msg);
#else
memcpy(radio_status, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RADIO_STATUS_LEN);
#endif
}

View File

@ -19,6 +19,9 @@ typedef struct __mavlink_raw_imu_t
#define MAVLINK_MSG_ID_RAW_IMU_LEN 26
#define MAVLINK_MSG_ID_27_LEN 26
#define MAVLINK_MSG_ID_RAW_IMU_CRC 144
#define MAVLINK_MSG_ID_27_CRC 144
#define MAVLINK_MESSAGE_INFO_RAW_IMU { \
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_raw_imu_pack(uint8_t system_id, uint8_t compo
uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_RAW_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_raw_imu_pack(uint8_t system_id, uint8_t compo
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_IMU_LEN);
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_raw_imu_pack(uint8_t system_id, uint8_t compo
packet.ymag = ymag;
packet.zmag = zmag;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_IMU;
return mavlink_finalize_message(msg, system_id, component_id, 26, 144);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
}
/**
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_raw_imu_pack_chan(uint8_t system_id, uint8_t
uint64_t time_usec,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_RAW_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_raw_imu_pack_chan(uint8_t system_id, uint8_t
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_IMU_LEN);
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_raw_imu_pack_chan(uint8_t system_id, uint8_t
packet.ymag = ymag;
packet.zmag = zmag;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 26);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_IMU;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 26, 144);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
}
/**
@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_raw_imu_encode(uint8_t system_id, uint8_t com
static inline void mavlink_msg_raw_imu_send(mavlink_channel_t chan, uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[26];
char buf[MAVLINK_MSG_ID_RAW_IMU_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, xacc);
_mav_put_int16_t(buf, 10, yacc);
@ -194,7 +205,11 @@ static inline void mavlink_msg_raw_imu_send(mavlink_channel_t chan, uint64_t tim
_mav_put_int16_t(buf, 22, ymag);
_mav_put_int16_t(buf, 24, zmag);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, 26, 144);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
#else
mavlink_raw_imu_t packet;
packet.time_usec = time_usec;
@ -208,7 +223,11 @@ static inline void mavlink_msg_raw_imu_send(mavlink_channel_t chan, uint64_t tim
packet.ymag = ymag;
packet.zmag = zmag;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (const char *)&packet, 26, 144);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (const char *)&packet, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (const char *)&packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
#endif
}
@ -337,6 +356,6 @@ static inline void mavlink_msg_raw_imu_decode(const mavlink_message_t* msg, mavl
raw_imu->ymag = mavlink_msg_raw_imu_get_ymag(msg);
raw_imu->zmag = mavlink_msg_raw_imu_get_zmag(msg);
#else
memcpy(raw_imu, _MAV_PAYLOAD(msg), 26);
memcpy(raw_imu, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RAW_IMU_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_raw_pressure_t
#define MAVLINK_MSG_ID_RAW_PRESSURE_LEN 16
#define MAVLINK_MSG_ID_28_LEN 16
#define MAVLINK_MSG_ID_RAW_PRESSURE_CRC 67
#define MAVLINK_MSG_ID_28_CRC 67
#define MAVLINK_MESSAGE_INFO_RAW_PRESSURE { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_raw_pressure_pack(uint8_t system_id, uint8_t
uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_RAW_PRESSURE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_raw_pressure_pack(uint8_t system_id, uint8_t
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_PRESSURE;
return mavlink_finalize_message(msg, system_id, component_id, 16, 67);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_raw_pressure_pack_chan(uint8_t system_id, uin
uint64_t time_usec,int16_t press_abs,int16_t press_diff1,int16_t press_diff2,int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_RAW_PRESSURE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_raw_pressure_pack_chan(uint8_t system_id, uin
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 16);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_PRESSURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 16, 67);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_raw_pressure_encode(uint8_t system_id, uint8_
static inline void mavlink_msg_raw_pressure_send(mavlink_channel_t chan, uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[16];
char buf[MAVLINK_MSG_ID_RAW_PRESSURE_LEN];
_mav_put_uint64_t(buf, 0, time_usec);
_mav_put_int16_t(buf, 8, press_abs);
_mav_put_int16_t(buf, 10, press_diff1);
_mav_put_int16_t(buf, 12, press_diff2);
_mav_put_int16_t(buf, 14, temperature);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, 16, 67);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
#else
mavlink_raw_pressure_t packet;
packet.time_usec = time_usec;
@ -153,7 +168,11 @@ static inline void mavlink_msg_raw_pressure_send(mavlink_channel_t chan, uint64_
packet.press_diff2 = press_diff2;
packet.temperature = temperature;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (const char *)&packet, 16, 67);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (const char *)&packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (const char *)&packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_raw_pressure_decode(const mavlink_message_t* msg,
raw_pressure->press_diff2 = mavlink_msg_raw_pressure_get_press_diff2(msg);
raw_pressure->temperature = mavlink_msg_raw_pressure_get_temperature(msg);
#else
memcpy(raw_pressure, _MAV_PAYLOAD(msg), 16);
memcpy(raw_pressure, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
#endif
}

View File

@ -4,14 +4,14 @@
typedef struct __mavlink_rc_channels_override_t
{
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
} mavlink_rc_channels_override_t;
@ -19,6 +19,9 @@ typedef struct __mavlink_rc_channels_override_t
#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN 18
#define MAVLINK_MSG_ID_70_LEN 18
#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC 124
#define MAVLINK_MSG_ID_70_CRC 124
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE { \
@ -46,21 +49,21 @@ typedef struct __mavlink_rc_channels_override_t
*
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id,
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id,
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
return mavlink_finalize_message(msg, system_id, component_id, 18, 124);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
}
/**
@ -101,14 +108,14 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id,
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system
uint8_t target_system,uint8_t target_component,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system
packet.target_system = target_system;
packet.target_component = target_component;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 18);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 124);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
}
/**
@ -168,21 +179,21 @@ static inline uint16_t mavlink_msg_rc_channels_override_encode(uint8_t system_id
*
* @param target_system System ID
* @param target_component Component ID
* @param chan1_raw RC channel 1 value, in microseconds
* @param chan2_raw RC channel 2 value, in microseconds
* @param chan3_raw RC channel 3 value, in microseconds
* @param chan4_raw RC channel 4 value, in microseconds
* @param chan5_raw RC channel 5 value, in microseconds
* @param chan6_raw RC channel 6 value, in microseconds
* @param chan7_raw RC channel 7 value, in microseconds
* @param chan8_raw RC channel 8 value, in microseconds
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[18];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN];
_mav_put_uint16_t(buf, 0, chan1_raw);
_mav_put_uint16_t(buf, 2, chan2_raw);
_mav_put_uint16_t(buf, 4, chan3_raw);
@ -194,7 +205,11 @@ static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan,
_mav_put_uint8_t(buf, 16, target_system);
_mav_put_uint8_t(buf, 17, target_component);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, 18, 124);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, buf, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
#else
mavlink_rc_channels_override_t packet;
packet.chan1_raw = chan1_raw;
@ -208,7 +223,11 @@ static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan,
packet.target_system = target_system;
packet.target_component = target_component;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)&packet, 18, 124);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
#endif
}
@ -240,7 +259,7 @@ static inline uint8_t mavlink_msg_rc_channels_override_get_target_component(cons
/**
* @brief Get field chan1_raw from rc_channels_override message
*
* @return RC channel 1 value, in microseconds
* @return RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavlink_message_t* msg)
{
@ -250,7 +269,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavl
/**
* @brief Get field chan2_raw from rc_channels_override message
*
* @return RC channel 2 value, in microseconds
* @return RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavlink_message_t* msg)
{
@ -260,7 +279,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavl
/**
* @brief Get field chan3_raw from rc_channels_override message
*
* @return RC channel 3 value, in microseconds
* @return RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavlink_message_t* msg)
{
@ -270,7 +289,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavl
/**
* @brief Get field chan4_raw from rc_channels_override message
*
* @return RC channel 4 value, in microseconds
* @return RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavlink_message_t* msg)
{
@ -280,7 +299,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavl
/**
* @brief Get field chan5_raw from rc_channels_override message
*
* @return RC channel 5 value, in microseconds
* @return RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavlink_message_t* msg)
{
@ -290,7 +309,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavl
/**
* @brief Get field chan6_raw from rc_channels_override message
*
* @return RC channel 6 value, in microseconds
* @return RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavlink_message_t* msg)
{
@ -300,7 +319,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavl
/**
* @brief Get field chan7_raw from rc_channels_override message
*
* @return RC channel 7 value, in microseconds
* @return RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavlink_message_t* msg)
{
@ -310,7 +329,7 @@ static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavl
/**
* @brief Get field chan8_raw from rc_channels_override message
*
* @return RC channel 8 value, in microseconds
* @return RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field.
*/
static inline uint16_t mavlink_msg_rc_channels_override_get_chan8_raw(const mavlink_message_t* msg)
{
@ -337,6 +356,6 @@ static inline void mavlink_msg_rc_channels_override_decode(const mavlink_message
rc_channels_override->target_system = mavlink_msg_rc_channels_override_get_target_system(msg);
rc_channels_override->target_component = mavlink_msg_rc_channels_override_get_target_component(msg);
#else
memcpy(rc_channels_override, _MAV_PAYLOAD(msg), 18);
memcpy(rc_channels_override, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE_LEN);
#endif
}

View File

@ -5,14 +5,14 @@
typedef struct __mavlink_rc_channels_raw_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of 65535 implies the channel is unused.
uint16_t chan1_raw; ///< RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan2_raw; ///< RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan3_raw; ///< RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan4_raw; ///< RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan5_raw; ///< RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan6_raw; ///< RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan7_raw; ///< RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint16_t chan8_raw; ///< RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
} mavlink_rc_channels_raw_t;
@ -20,6 +20,9 @@ typedef struct __mavlink_rc_channels_raw_t
#define MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN 22
#define MAVLINK_MSG_ID_35_LEN 22
#define MAVLINK_MSG_ID_RC_CHANNELS_RAW_CRC 244
#define MAVLINK_MSG_ID_35_CRC 244
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW { \
@ -48,14 +51,14 @@ typedef struct __mavlink_rc_channels_raw_t
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8
uint32_t time_boot_ms, uint8_t port, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8
packet.port = port;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 22, 244);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN, MAVLINK_MSG_ID_RC_CHANNELS_RAW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
}
/**
@ -106,14 +113,14 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack_chan(uint8_t system_id,
uint32_t time_boot_ms,uint8_t port,uint16_t chan1_raw,uint16_t chan2_raw,uint16_t chan3_raw,uint16_t chan4_raw,uint16_t chan5_raw,uint16_t chan6_raw,uint16_t chan7_raw,uint16_t chan8_raw,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack_chan(uint8_t system_id,
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack_chan(uint8_t system_id,
packet.port = port;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 244);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN, MAVLINK_MSG_ID_RC_CHANNELS_RAW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
}
/**
@ -176,14 +187,14 @@ static inline uint16_t mavlink_msg_rc_channels_raw_encode(uint8_t system_id, uin
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_raw RC channel 1 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of 65535 implies the channel is unused.
* @param chan1_raw RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan2_raw RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan3_raw RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan4_raw RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan5_raw RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan6_raw RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan7_raw RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param chan8_raw RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_encode(uint8_t system_id, uin
static inline void mavlink_msg_rc_channels_raw_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t port, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_uint16_t(buf, 4, chan1_raw);
_mav_put_uint16_t(buf, 6, chan2_raw);
@ -204,7 +215,11 @@ static inline void mavlink_msg_rc_channels_raw_send(mavlink_channel_t chan, uint
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, buf, 22, 244);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, buf, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN, MAVLINK_MSG_ID_RC_CHANNELS_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, buf, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
#else
mavlink_rc_channels_raw_t packet;
packet.time_boot_ms = time_boot_ms;
@ -219,7 +234,11 @@ static inline void mavlink_msg_rc_channels_raw_send(mavlink_channel_t chan, uint
packet.port = port;
packet.rssi = rssi;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, (const char *)&packet, 22, 244);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN, MAVLINK_MSG_ID_RC_CHANNELS_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_RAW, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
#endif
}
@ -251,7 +270,7 @@ static inline uint8_t mavlink_msg_rc_channels_raw_get_port(const mavlink_message
/**
* @brief Get field chan1_raw from rc_channels_raw message
*
* @return RC channel 1 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan1_raw(const mavlink_message_t* msg)
{
@ -261,7 +280,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan1_raw(const mavlink_m
/**
* @brief Get field chan2_raw from rc_channels_raw message
*
* @return RC channel 2 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan2_raw(const mavlink_message_t* msg)
{
@ -271,7 +290,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan2_raw(const mavlink_m
/**
* @brief Get field chan3_raw from rc_channels_raw message
*
* @return RC channel 3 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan3_raw(const mavlink_message_t* msg)
{
@ -281,7 +300,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan3_raw(const mavlink_m
/**
* @brief Get field chan4_raw from rc_channels_raw message
*
* @return RC channel 4 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan4_raw(const mavlink_message_t* msg)
{
@ -291,7 +310,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan4_raw(const mavlink_m
/**
* @brief Get field chan5_raw from rc_channels_raw message
*
* @return RC channel 5 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan5_raw(const mavlink_message_t* msg)
{
@ -301,7 +320,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan5_raw(const mavlink_m
/**
* @brief Get field chan6_raw from rc_channels_raw message
*
* @return RC channel 6 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan6_raw(const mavlink_message_t* msg)
{
@ -311,7 +330,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan6_raw(const mavlink_m
/**
* @brief Get field chan7_raw from rc_channels_raw message
*
* @return RC channel 7 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan7_raw(const mavlink_message_t* msg)
{
@ -321,7 +340,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan7_raw(const mavlink_m
/**
* @brief Get field chan8_raw from rc_channels_raw message
*
* @return RC channel 8 value, in microseconds. A value of 65535 implies the channel is unused.
* @return RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused.
*/
static inline uint16_t mavlink_msg_rc_channels_raw_get_chan8_raw(const mavlink_message_t* msg)
{
@ -359,6 +378,6 @@ static inline void mavlink_msg_rc_channels_raw_decode(const mavlink_message_t* m
rc_channels_raw->port = mavlink_msg_rc_channels_raw_get_port(msg);
rc_channels_raw->rssi = mavlink_msg_rc_channels_raw_get_rssi(msg);
#else
memcpy(rc_channels_raw, _MAV_PAYLOAD(msg), 22);
memcpy(rc_channels_raw, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN);
#endif
}

View File

@ -5,14 +5,14 @@
typedef struct __mavlink_rc_channels_scaled_t
{
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
int16_t chan1_scaled; ///< RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan2_scaled; ///< RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan3_scaled; ///< RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan4_scaled; ///< RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan5_scaled; ///< RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan6_scaled; ///< RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan7_scaled; ///< RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan8_scaled; ///< RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
int16_t chan1_scaled; ///< RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan2_scaled; ///< RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan3_scaled; ///< RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan4_scaled; ///< RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan5_scaled; ///< RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan6_scaled; ///< RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan7_scaled; ///< RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
int16_t chan8_scaled; ///< RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
uint8_t port; ///< Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
uint8_t rssi; ///< Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
} mavlink_rc_channels_scaled_t;
@ -20,6 +20,9 @@ typedef struct __mavlink_rc_channels_scaled_t
#define MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN 22
#define MAVLINK_MSG_ID_34_LEN 22
#define MAVLINK_MSG_ID_RC_CHANNELS_SCALED_CRC 237
#define MAVLINK_MSG_ID_34_CRC 237
#define MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED { \
@ -48,14 +51,14 @@ typedef struct __mavlink_rc_channels_scaled_t
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, ui
uint32_t time_boot_ms, uint8_t port, int16_t chan1_scaled, int16_t chan2_scaled, int16_t chan3_scaled, int16_t chan4_scaled, int16_t chan5_scaled, int16_t chan6_scaled, int16_t chan7_scaled, int16_t chan8_scaled, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, ui
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, ui
packet.port = port;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_SCALED;
return mavlink_finalize_message(msg, system_id, component_id, 22, 237);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
}
/**
@ -106,14 +113,14 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, ui
* @param msg The MAVLink message to compress the data into
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_chan(uint8_t system_i
uint32_t time_boot_ms,uint8_t port,int16_t chan1_scaled,int16_t chan2_scaled,int16_t chan3_scaled,int16_t chan4_scaled,int16_t chan5_scaled,int16_t chan6_scaled,int16_t chan7_scaled,int16_t chan8_scaled,uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_chan(uint8_t system_i
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_chan(uint8_t system_i
packet.port = port;
packet.rssi = rssi;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_SCALED;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 237);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
}
/**
@ -176,14 +187,14 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_encode(uint8_t system_id,
*
* @param time_boot_ms Timestamp (milliseconds since system boot)
* @param port Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @param chan1_scaled RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan2_scaled RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan3_scaled RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan4_scaled RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan5_scaled RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan6_scaled RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan7_scaled RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param chan8_scaled RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
* @param rssi Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_encode(uint8_t system_id,
static inline void mavlink_msg_rc_channels_scaled_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t port, int16_t chan1_scaled, int16_t chan2_scaled, int16_t chan3_scaled, int16_t chan4_scaled, int16_t chan5_scaled, int16_t chan6_scaled, int16_t chan7_scaled, int16_t chan8_scaled, uint8_t rssi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, chan1_scaled);
_mav_put_int16_t(buf, 6, chan2_scaled);
@ -204,7 +215,11 @@ static inline void mavlink_msg_rc_channels_scaled_send(mavlink_channel_t chan, u
_mav_put_uint8_t(buf, 20, port);
_mav_put_uint8_t(buf, 21, rssi);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, buf, 22, 237);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, buf, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, buf, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
#else
mavlink_rc_channels_scaled_t packet;
packet.time_boot_ms = time_boot_ms;
@ -219,7 +234,11 @@ static inline void mavlink_msg_rc_channels_scaled_send(mavlink_channel_t chan, u
packet.port = port;
packet.rssi = rssi;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, (const char *)&packet, 22, 237);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RC_CHANNELS_SCALED, (const char *)&packet, MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
#endif
}
@ -251,7 +270,7 @@ static inline uint8_t mavlink_msg_rc_channels_scaled_get_port(const mavlink_mess
/**
* @brief Get field chan1_scaled from rc_channels_scaled message
*
* @return RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan1_scaled(const mavlink_message_t* msg)
{
@ -261,7 +280,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan1_scaled(const mavl
/**
* @brief Get field chan2_scaled from rc_channels_scaled message
*
* @return RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan2_scaled(const mavlink_message_t* msg)
{
@ -271,7 +290,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan2_scaled(const mavl
/**
* @brief Get field chan3_scaled from rc_channels_scaled message
*
* @return RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan3_scaled(const mavlink_message_t* msg)
{
@ -281,7 +300,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan3_scaled(const mavl
/**
* @brief Get field chan4_scaled from rc_channels_scaled message
*
* @return RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan4_scaled(const mavlink_message_t* msg)
{
@ -291,7 +310,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan4_scaled(const mavl
/**
* @brief Get field chan5_scaled from rc_channels_scaled message
*
* @return RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan5_scaled(const mavlink_message_t* msg)
{
@ -301,7 +320,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan5_scaled(const mavl
/**
* @brief Get field chan6_scaled from rc_channels_scaled message
*
* @return RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan6_scaled(const mavlink_message_t* msg)
{
@ -311,7 +330,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan6_scaled(const mavl
/**
* @brief Get field chan7_scaled from rc_channels_scaled message
*
* @return RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan7_scaled(const mavlink_message_t* msg)
{
@ -321,7 +340,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan7_scaled(const mavl
/**
* @brief Get field chan8_scaled from rc_channels_scaled message
*
* @return RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) 32767.
* @return RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX.
*/
static inline int16_t mavlink_msg_rc_channels_scaled_get_chan8_scaled(const mavlink_message_t* msg)
{
@ -359,6 +378,6 @@ static inline void mavlink_msg_rc_channels_scaled_decode(const mavlink_message_t
rc_channels_scaled->port = mavlink_msg_rc_channels_scaled_get_port(msg);
rc_channels_scaled->rssi = mavlink_msg_rc_channels_scaled_get_rssi(msg);
#else
memcpy(rc_channels_scaled, _MAV_PAYLOAD(msg), 22);
memcpy(rc_channels_scaled, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_request_data_stream_t
#define MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN 6
#define MAVLINK_MSG_ID_66_LEN 6
#define MAVLINK_MSG_ID_REQUEST_DATA_STREAM_CRC 148
#define MAVLINK_MSG_ID_66_CRC 148
#define MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, u
uint8_t target_system, uint8_t target_component, uint8_t req_stream_id, uint16_t req_message_rate, uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, u
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_REQUEST_DATA_STREAM;
return mavlink_finalize_message(msg, system_id, component_id, 6, 148);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_request_data_stream_pack_chan(uint8_t system_
uint8_t target_system,uint8_t target_component,uint8_t req_stream_id,uint16_t req_message_rate,uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_request_data_stream_pack_chan(uint8_t system_
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 6);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_REQUEST_DATA_STREAM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 6, 148);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_request_data_stream_encode(uint8_t system_id,
static inline void mavlink_msg_request_data_stream_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t req_stream_id, uint16_t req_message_rate, uint8_t start_stop)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[6];
char buf[MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN];
_mav_put_uint16_t(buf, 0, req_message_rate);
_mav_put_uint8_t(buf, 2, target_system);
_mav_put_uint8_t(buf, 3, target_component);
_mav_put_uint8_t(buf, 4, req_stream_id);
_mav_put_uint8_t(buf, 5, start_stop);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, buf, 6, 148);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, buf, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, buf, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
#else
mavlink_request_data_stream_t packet;
packet.req_message_rate = req_message_rate;
@ -153,7 +168,11 @@ static inline void mavlink_msg_request_data_stream_send(mavlink_channel_t chan,
packet.req_stream_id = req_stream_id;
packet.start_stop = start_stop;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, (const char *)&packet, 6, 148);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, (const char *)&packet, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_DATA_STREAM, (const char *)&packet, MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_request_data_stream_decode(const mavlink_message_
request_data_stream->req_stream_id = mavlink_msg_request_data_stream_get_req_stream_id(msg);
request_data_stream->start_stop = mavlink_msg_request_data_stream_get_start_stop(msg);
#else
memcpy(request_data_stream, _MAV_PAYLOAD(msg), 6);
memcpy(request_data_stream, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_REQUEST_DATA_STREAM_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_roll_pitch_yaw_rates_thrust_setpoint_t
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN 20
#define MAVLINK_MSG_ID_80_LEN 20
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_CRC 127
#define MAVLINK_MSG_ID_80_CRC 127
#define MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_pack(uin
uint32_t time_boot_ms, float roll_rate, float pitch_rate, float yaw_rate, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_rate);
_mav_put_float(buf, 8, pitch_rate);
_mav_put_float(buf, 12, yaw_rate);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_rates_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_pack(uin
packet.yaw_rate = yaw_rate;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 20, 127);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_pack_cha
uint32_t time_boot_ms,float roll_rate,float pitch_rate,float yaw_rate,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_rate);
_mav_put_float(buf, 8, pitch_rate);
_mav_put_float(buf, 12, yaw_rate);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_rates_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_pack_cha
packet.yaw_rate = yaw_rate;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 127);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_encode(u
static inline void mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll_rate, float pitch_rate, float yaw_rate, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_rate);
_mav_put_float(buf, 8, pitch_rate);
_mav_put_float(buf, 12, yaw_rate);
_mav_put_float(buf, 16, thrust);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, buf, 20, 127);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
#else
mavlink_roll_pitch_yaw_rates_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -153,7 +168,11 @@ static inline void mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_send(mavlink
packet.yaw_rate = yaw_rate;
packet.thrust = thrust;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, (const char *)&packet, 20, 127);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_decode(const
roll_pitch_yaw_rates_thrust_setpoint->yaw_rate = mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_get_yaw_rate(msg);
roll_pitch_yaw_rates_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_rates_thrust_setpoint_get_thrust(msg);
#else
memcpy(roll_pitch_yaw_rates_thrust_setpoint, _MAV_PAYLOAD(msg), 20);
memcpy(roll_pitch_yaw_rates_thrust_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ROLL_PITCH_YAW_RATES_THRUST_SETPOINT_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_roll_pitch_yaw_speed_thrust_setpoint_t
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN 20
#define MAVLINK_MSG_ID_59_LEN 20
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_CRC 238
#define MAVLINK_MSG_ID_59_CRC 238
#define MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(uin
uint32_t time_boot_ms, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(uin
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 20, 238);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_cha
uint32_t time_boot_ms,float roll_speed,float pitch_speed,float yaw_speed,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_cha
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 238);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_encode(u
static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll_speed);
_mav_put_float(buf, 8, pitch_speed);
_mav_put_float(buf, 12, yaw_speed);
_mav_put_float(buf, 16, thrust);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, buf, 20, 238);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
#else
mavlink_roll_pitch_yaw_speed_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -153,7 +168,11 @@ static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_send(mavlink
packet.yaw_speed = yaw_speed;
packet.thrust = thrust;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, (const char *)&packet, 20, 238);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(const
roll_pitch_yaw_speed_thrust_setpoint->yaw_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_yaw_speed(msg);
roll_pitch_yaw_speed_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_thrust(msg);
#else
memcpy(roll_pitch_yaw_speed_thrust_setpoint, _MAV_PAYLOAD(msg), 20);
memcpy(roll_pitch_yaw_speed_thrust_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT_LEN);
#endif
}

View File

@ -14,6 +14,9 @@ typedef struct __mavlink_roll_pitch_yaw_thrust_setpoint_t
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN 20
#define MAVLINK_MSG_ID_58_LEN 20
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_CRC 239
#define MAVLINK_MSG_ID_58_CRC 239
#define MAVLINK_MESSAGE_INFO_ROLL_PITCH_YAW_THRUST_SETPOINT { \
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(uint8_t s
uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(uint8_t s
packet.yaw = yaw;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 20, 239);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(uint
uint32_t time_boot_ms,float roll,float pitch,float yaw,float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(uint
packet.yaw = yaw;
packet.thrust = thrust;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 20);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 239);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
}
/**
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_encode(uint8_t
static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float thrust)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[20];
char buf[MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, roll);
_mav_put_float(buf, 8, pitch);
_mav_put_float(buf, 12, yaw);
_mav_put_float(buf, 16, thrust);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, buf, 20, 239);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, buf, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
#else
mavlink_roll_pitch_yaw_thrust_setpoint_t packet;
packet.time_boot_ms = time_boot_ms;
@ -153,7 +168,11 @@ static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_send(mavlink_chann
packet.yaw = yaw;
packet.thrust = thrust;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, (const char *)&packet, 20, 239);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
#endif
}
@ -227,6 +246,6 @@ static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(const mavli
roll_pitch_yaw_thrust_setpoint->yaw = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_yaw(msg);
roll_pitch_yaw_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_thrust(msg);
#else
memcpy(roll_pitch_yaw_thrust_setpoint, _MAV_PAYLOAD(msg), 20);
memcpy(roll_pitch_yaw_thrust_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_safety_allowed_area_t
#define MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN 25
#define MAVLINK_MSG_ID_55_LEN 25
#define MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_CRC 3
#define MAVLINK_MSG_ID_55_CRC 3
#define MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack(uint8_t system_id, u
uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack(uint8_t system_id, u
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack(uint8_t system_id, u
packet.p2z = p2z;
packet.frame = frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;
return mavlink_finalize_message(msg, system_id, component_id, 25, 3);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack_chan(uint8_t system_
uint8_t frame,float p1x,float p1y,float p1z,float p2x,float p2y,float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack_chan(uint8_t system_
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_safety_allowed_area_pack_chan(uint8_t system_
packet.p2z = p2z;
packet.frame = frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 25);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 25, 3);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_safety_allowed_area_encode(uint8_t system_id,
static inline void mavlink_msg_safety_allowed_area_send(mavlink_channel_t chan, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[25];
char buf[MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -164,7 +175,11 @@ static inline void mavlink_msg_safety_allowed_area_send(mavlink_channel_t chan,
_mav_put_float(buf, 20, p2z);
_mav_put_uint8_t(buf, 24, frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, buf, 25, 3);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
#else
mavlink_safety_allowed_area_t packet;
packet.p1x = p1x;
@ -175,7 +190,11 @@ static inline void mavlink_msg_safety_allowed_area_send(mavlink_channel_t chan,
packet.p2z = p2z;
packet.frame = frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, (const char *)&packet, 25, 3);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, (const char *)&packet, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA, (const char *)&packet, MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_safety_allowed_area_decode(const mavlink_message_
safety_allowed_area->p2z = mavlink_msg_safety_allowed_area_get_p2z(msg);
safety_allowed_area->frame = mavlink_msg_safety_allowed_area_get_frame(msg);
#else
memcpy(safety_allowed_area, _MAV_PAYLOAD(msg), 25);
memcpy(safety_allowed_area, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA_LEN);
#endif
}

View File

@ -18,6 +18,9 @@ typedef struct __mavlink_safety_set_allowed_area_t
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27
#define MAVLINK_MSG_ID_54_LEN 27
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC 15
#define MAVLINK_MSG_ID_54_CRC 15
#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA { \
@ -57,7 +60,7 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_i
uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -68,7 +71,7 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_i
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 27);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
@ -81,11 +84,15 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_i
packet.target_component = target_component;
packet.frame = frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 27);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
return mavlink_finalize_message(msg, system_id, component_id, 27, 15);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
}
/**
@ -110,7 +117,7 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t sys
uint8_t target_system,uint8_t target_component,uint8_t frame,float p1x,float p1y,float p1z,float p2x,float p2y,float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -121,7 +128,7 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t sys
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 27);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
@ -134,11 +141,15 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t sys
packet.target_component = target_component;
packet.frame = frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 27);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 27, 15);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
}
/**
@ -173,7 +184,7 @@ static inline uint16_t mavlink_msg_safety_set_allowed_area_encode(uint8_t system
static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame, float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[27];
char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
_mav_put_float(buf, 0, p1x);
_mav_put_float(buf, 4, p1y);
_mav_put_float(buf, 8, p1z);
@ -184,7 +195,11 @@ static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t ch
_mav_put_uint8_t(buf, 25, target_component);
_mav_put_uint8_t(buf, 26, frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, 27, 15);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
#else
mavlink_safety_set_allowed_area_t packet;
packet.p1x = p1x;
@ -197,7 +212,11 @@ static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t ch
packet.target_component = target_component;
packet.frame = frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)&packet, 27, 15);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)&packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (const char *)&packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
#endif
}
@ -315,6 +334,6 @@ static inline void mavlink_msg_safety_set_allowed_area_decode(const mavlink_mess
safety_set_allowed_area->target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
safety_set_allowed_area->frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
#else
memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), 27);
memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
#endif
}

View File

@ -19,6 +19,9 @@ typedef struct __mavlink_scaled_imu_t
#define MAVLINK_MSG_ID_SCALED_IMU_LEN 22
#define MAVLINK_MSG_ID_26_LEN 22
#define MAVLINK_MSG_ID_SCALED_IMU_CRC 170
#define MAVLINK_MSG_ID_26_CRC 170
#define MAVLINK_MESSAGE_INFO_SCALED_IMU { \
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_scaled_imu_pack(uint8_t system_id, uint8_t co
uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_SCALED_IMU_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_scaled_imu_pack(uint8_t system_id, uint8_t co
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_scaled_imu_pack(uint8_t system_id, uint8_t co
packet.ymag = ymag;
packet.zmag = zmag;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SCALED_IMU;
return mavlink_finalize_message(msg, system_id, component_id, 22, 170);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_IMU_LEN, MAVLINK_MSG_ID_SCALED_IMU_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
}
/**
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_scaled_imu_pack_chan(uint8_t system_id, uint8
uint32_t time_boot_ms,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_SCALED_IMU_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_scaled_imu_pack_chan(uint8_t system_id, uint8
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_scaled_imu_pack_chan(uint8_t system_id, uint8
packet.ymag = ymag;
packet.zmag = zmag;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 22);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SCALED_IMU;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 22, 170);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_IMU_LEN, MAVLINK_MSG_ID_SCALED_IMU_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
}
/**
@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_scaled_imu_encode(uint8_t system_id, uint8_t
static inline void mavlink_msg_scaled_imu_send(mavlink_channel_t chan, uint32_t time_boot_ms, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[22];
char buf[MAVLINK_MSG_ID_SCALED_IMU_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_int16_t(buf, 4, xacc);
_mav_put_int16_t(buf, 6, yacc);
@ -194,7 +205,11 @@ static inline void mavlink_msg_scaled_imu_send(mavlink_channel_t chan, uint32_t
_mav_put_int16_t(buf, 18, ymag);
_mav_put_int16_t(buf, 20, zmag);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, buf, 22, 170);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, buf, MAVLINK_MSG_ID_SCALED_IMU_LEN, MAVLINK_MSG_ID_SCALED_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, buf, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
#else
mavlink_scaled_imu_t packet;
packet.time_boot_ms = time_boot_ms;
@ -208,7 +223,11 @@ static inline void mavlink_msg_scaled_imu_send(mavlink_channel_t chan, uint32_t
packet.ymag = ymag;
packet.zmag = zmag;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, (const char *)&packet, 22, 170);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, (const char *)&packet, MAVLINK_MSG_ID_SCALED_IMU_LEN, MAVLINK_MSG_ID_SCALED_IMU_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_IMU, (const char *)&packet, MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
#endif
}
@ -337,6 +356,6 @@ static inline void mavlink_msg_scaled_imu_decode(const mavlink_message_t* msg, m
scaled_imu->ymag = mavlink_msg_scaled_imu_get_ymag(msg);
scaled_imu->zmag = mavlink_msg_scaled_imu_get_zmag(msg);
#else
memcpy(scaled_imu, _MAV_PAYLOAD(msg), 22);
memcpy(scaled_imu, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SCALED_IMU_LEN);
#endif
}

View File

@ -13,6 +13,9 @@ typedef struct __mavlink_scaled_pressure_t
#define MAVLINK_MSG_ID_SCALED_PRESSURE_LEN 14
#define MAVLINK_MSG_ID_29_LEN 14
#define MAVLINK_MSG_ID_SCALED_PRESSURE_CRC 115
#define MAVLINK_MSG_ID_29_CRC 115
#define MAVLINK_MESSAGE_INFO_SCALED_PRESSURE { \
@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_scaled_pressure_pack(uint8_t system_id, uint8
uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_SCALED_PRESSURE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_scaled_pressure_pack(uint8_t system_id, uint8
packet.press_diff = press_diff;
packet.temperature = temperature;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE;
return mavlink_finalize_message(msg, system_id, component_id, 14, 115);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
}
/**
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_scaled_pressure_pack_chan(uint8_t system_id,
uint32_t time_boot_ms,float press_abs,float press_diff,int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_SCALED_PRESSURE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_scaled_pressure_pack_chan(uint8_t system_id,
packet.press_diff = press_diff;
packet.temperature = temperature;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 14);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SCALED_PRESSURE;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 115);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
}
/**
@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_scaled_pressure_encode(uint8_t system_id, uin
static inline void mavlink_msg_scaled_pressure_send(mavlink_channel_t chan, uint32_t time_boot_ms, float press_abs, float press_diff, int16_t temperature)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[14];
char buf[MAVLINK_MSG_ID_SCALED_PRESSURE_LEN];
_mav_put_uint32_t(buf, 0, time_boot_ms);
_mav_put_float(buf, 4, press_abs);
_mav_put_float(buf, 8, press_diff);
_mav_put_int16_t(buf, 12, temperature);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, buf, 14, 115);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, buf, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, buf, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
#else
mavlink_scaled_pressure_t packet;
packet.time_boot_ms = time_boot_ms;
@ -142,7 +157,11 @@ static inline void mavlink_msg_scaled_pressure_send(mavlink_channel_t chan, uint
packet.press_diff = press_diff;
packet.temperature = temperature;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, (const char *)&packet, 14, 115);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, (const char *)&packet, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN, MAVLINK_MSG_ID_SCALED_PRESSURE_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCALED_PRESSURE, (const char *)&packet, MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
#endif
}
@ -205,6 +224,6 @@ static inline void mavlink_msg_scaled_pressure_decode(const mavlink_message_t* m
scaled_pressure->press_diff = mavlink_msg_scaled_pressure_get_press_diff(msg);
scaled_pressure->temperature = mavlink_msg_scaled_pressure_get_temperature(msg);
#else
memcpy(scaled_pressure, _MAV_PAYLOAD(msg), 14);
memcpy(scaled_pressure, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SCALED_PRESSURE_LEN);
#endif
}

View File

@ -19,6 +19,9 @@ typedef struct __mavlink_servo_output_raw_t
#define MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN 21
#define MAVLINK_MSG_ID_36_LEN 21
#define MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_CRC 222
#define MAVLINK_MSG_ID_36_CRC 222
#define MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW { \
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack(uint8_t system_id, uint
uint32_t time_usec, uint8_t port, uint16_t servo1_raw, uint16_t servo2_raw, uint16_t servo3_raw, uint16_t servo4_raw, uint16_t servo5_raw, uint16_t servo6_raw, uint16_t servo7_raw, uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
char buf[MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack(uint8_t system_id, uint
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack(uint8_t system_id, uint
packet.servo8_raw = servo8_raw;
packet.port = port;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SERVO_OUTPUT_RAW;
return mavlink_finalize_message(msg, system_id, component_id, 21, 222);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
}
/**
@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack_chan(uint8_t system_id,
uint32_t time_usec,uint8_t port,uint16_t servo1_raw,uint16_t servo2_raw,uint16_t servo3_raw,uint16_t servo4_raw,uint16_t servo5_raw,uint16_t servo6_raw,uint16_t servo7_raw,uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
char buf[MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack_chan(uint8_t system_id,
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 21);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_servo_output_raw_pack_chan(uint8_t system_id,
packet.servo8_raw = servo8_raw;
packet.port = port;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 21);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SERVO_OUTPUT_RAW;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 21, 222);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
}
/**
@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_servo_output_raw_encode(uint8_t system_id, ui
static inline void mavlink_msg_servo_output_raw_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t port, uint16_t servo1_raw, uint16_t servo2_raw, uint16_t servo3_raw, uint16_t servo4_raw, uint16_t servo5_raw, uint16_t servo6_raw, uint16_t servo7_raw, uint16_t servo8_raw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[21];
char buf[MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN];
_mav_put_uint32_t(buf, 0, time_usec);
_mav_put_uint16_t(buf, 4, servo1_raw);
_mav_put_uint16_t(buf, 6, servo2_raw);
@ -194,7 +205,11 @@ static inline void mavlink_msg_servo_output_raw_send(mavlink_channel_t chan, uin
_mav_put_uint16_t(buf, 18, servo8_raw);
_mav_put_uint8_t(buf, 20, port);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, buf, 21, 222);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, buf, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, buf, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
#else
mavlink_servo_output_raw_t packet;
packet.time_usec = time_usec;
@ -208,7 +223,11 @@ static inline void mavlink_msg_servo_output_raw_send(mavlink_channel_t chan, uin
packet.servo8_raw = servo8_raw;
packet.port = port;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, (const char *)&packet, 21, 222);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, (const char *)&packet, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW, (const char *)&packet, MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
#endif
}
@ -337,6 +356,6 @@ static inline void mavlink_msg_servo_output_raw_decode(const mavlink_message_t*
servo_output_raw->servo8_raw = mavlink_msg_servo_output_raw_get_servo8_raw(msg);
servo_output_raw->port = mavlink_msg_servo_output_raw_get_port(msg);
#else
memcpy(servo_output_raw, _MAV_PAYLOAD(msg), 21);
memcpy(servo_output_raw, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN);
#endif
}

View File

@ -4,9 +4,9 @@
typedef struct __mavlink_set_global_position_setpoint_int_t
{
int32_t latitude; ///< WGS84 Latitude position in degrees * 1E7
int32_t longitude; ///< WGS84 Longitude position in degrees * 1E7
int32_t altitude; ///< WGS84 Altitude in meters * 1000 (positive for up)
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
int32_t longitude; ///< Longitude (WGS84), in degrees * 1E7
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
int16_t yaw; ///< Desired yaw angle in degrees * 100
uint8_t coordinate_frame; ///< Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
} mavlink_set_global_position_setpoint_int_t;
@ -14,6 +14,9 @@ typedef struct __mavlink_set_global_position_setpoint_int_t
#define MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN 15
#define MAVLINK_MSG_ID_53_LEN 15
#define MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_CRC 33
#define MAVLINK_MSG_ID_53_CRC 33
#define MAVLINK_MESSAGE_INFO_SET_GLOBAL_POSITION_SETPOINT_INT { \
@ -35,9 +38,9 @@ typedef struct __mavlink_set_global_position_setpoint_int_t
* @param msg The MAVLink message to compress the data into
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -45,14 +48,14 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack(uint8_t
uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -61,11 +64,15 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack(uint8_t
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message(msg, system_id, component_id, 15, 33);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}
/**
@ -75,9 +82,9 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack(uint8_t
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
* @return length of the message in bytes (excluding serial stream start sign)
*/
@ -86,14 +93,14 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack_chan(ui
uint8_t coordinate_frame,int32_t latitude,int32_t longitude,int32_t altitude,int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -102,11 +109,15 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_pack_chan(ui
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 15);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 15, 33);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}
/**
@ -127,9 +138,9 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_encode(uint8
* @param chan MAVLink channel to send the message
*
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
* @param latitude WGS84 Latitude position in degrees * 1E7
* @param longitude WGS84 Longitude position in degrees * 1E7
* @param altitude WGS84 Altitude in meters * 1000 (positive for up)
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84), in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @param yaw Desired yaw angle in degrees * 100
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -137,14 +148,18 @@ static inline uint16_t mavlink_msg_set_global_position_setpoint_int_encode(uint8
static inline void mavlink_msg_set_global_position_setpoint_int_send(mavlink_channel_t chan, uint8_t coordinate_frame, int32_t latitude, int32_t longitude, int32_t altitude, int16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[15];
char buf[MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_int16_t(buf, 12, yaw);
_mav_put_uint8_t(buf, 14, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, buf, 15, 33);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, buf, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, buf, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
#else
mavlink_set_global_position_setpoint_int_t packet;
packet.latitude = latitude;
@ -153,7 +168,11 @@ static inline void mavlink_msg_set_global_position_setpoint_int_send(mavlink_cha
packet.yaw = yaw;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, 15, 33);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT, (const char *)&packet, MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
#endif
}
@ -175,7 +194,7 @@ static inline uint8_t mavlink_msg_set_global_position_setpoint_int_get_coordinat
/**
* @brief Get field latitude from set_global_position_setpoint_int message
*
* @return WGS84 Latitude position in degrees * 1E7
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_latitude(const mavlink_message_t* msg)
{
@ -185,7 +204,7 @@ static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_latitude(
/**
* @brief Get field longitude from set_global_position_setpoint_int message
*
* @return WGS84 Longitude position in degrees * 1E7
* @return Longitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_longitude(const mavlink_message_t* msg)
{
@ -195,7 +214,7 @@ static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_longitude
/**
* @brief Get field altitude from set_global_position_setpoint_int message
*
* @return WGS84 Altitude in meters * 1000 (positive for up)
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_set_global_position_setpoint_int_get_altitude(const mavlink_message_t* msg)
{
@ -227,6 +246,6 @@ static inline void mavlink_msg_set_global_position_setpoint_int_decode(const mav
set_global_position_setpoint_int->yaw = mavlink_msg_set_global_position_setpoint_int_get_yaw(msg);
set_global_position_setpoint_int->coordinate_frame = mavlink_msg_set_global_position_setpoint_int_get_coordinate_frame(msg);
#else
memcpy(set_global_position_setpoint_int, _MAV_PAYLOAD(msg), 15);
memcpy(set_global_position_setpoint_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SET_GLOBAL_POSITION_SETPOINT_INT_LEN);
#endif
}

View File

@ -4,15 +4,18 @@
typedef struct __mavlink_set_gps_global_origin_t
{
int32_t latitude; ///< global position * 1E7
int32_t longitude; ///< global position * 1E7
int32_t altitude; ///< global position * 1000
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
int32_t longitude; ///< Longitude (WGS84, in degrees * 1E7
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
uint8_t target_system; ///< System ID
} mavlink_set_gps_global_origin_t;
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN 13
#define MAVLINK_MSG_ID_48_LEN 13
#define MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC 41
#define MAVLINK_MSG_ID_48_CRC 41
#define MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN { \
@ -33,22 +36,22 @@ typedef struct __mavlink_set_gps_global_origin_t
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
packet.altitude = altitude;
packet.target_system = target_system;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message(msg, system_id, component_id, 13, 41);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
}
/**
@ -70,9 +77,9 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste
uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t syste
packet.altitude = altitude;
packet.target_system = target_system;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 13);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 13, 41);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
}
/**
@ -119,22 +130,26 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode(uint8_t system_i
* @param chan MAVLink channel to send the message
*
* @param target_system System ID
* @param latitude global position * 1E7
* @param longitude global position * 1E7
* @param altitude global position * 1000
* @param latitude Latitude (WGS84), in degrees * 1E7
* @param longitude Longitude (WGS84, in degrees * 1E7
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[13];
char buf[MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN];
_mav_put_int32_t(buf, 0, latitude);
_mav_put_int32_t(buf, 4, longitude);
_mav_put_int32_t(buf, 8, altitude);
_mav_put_uint8_t(buf, 12, target_system);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, 13, 41);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, buf, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
#else
mavlink_set_gps_global_origin_t packet;
packet.latitude = latitude;
@ -142,7 +157,11 @@ static inline void mavlink_msg_set_gps_global_origin_send(mavlink_channel_t chan
packet.altitude = altitude;
packet.target_system = target_system;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, 13, 41);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN, (const char *)&packet, MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
#endif
}
@ -164,7 +183,7 @@ static inline uint8_t mavlink_msg_set_gps_global_origin_get_target_system(const
/**
* @brief Get field latitude from set_gps_global_origin message
*
* @return global position * 1E7
* @return Latitude (WGS84), in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_latitude(const mavlink_message_t* msg)
{
@ -174,7 +193,7 @@ static inline int32_t mavlink_msg_set_gps_global_origin_get_latitude(const mavli
/**
* @brief Get field longitude from set_gps_global_origin message
*
* @return global position * 1E7
* @return Longitude (WGS84, in degrees * 1E7
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_longitude(const mavlink_message_t* msg)
{
@ -184,7 +203,7 @@ static inline int32_t mavlink_msg_set_gps_global_origin_get_longitude(const mavl
/**
* @brief Get field altitude from set_gps_global_origin message
*
* @return global position * 1000
* @return Altitude (WGS84), in meters * 1000 (positive for up)
*/
static inline int32_t mavlink_msg_set_gps_global_origin_get_altitude(const mavlink_message_t* msg)
{
@ -205,6 +224,6 @@ static inline void mavlink_msg_set_gps_global_origin_decode(const mavlink_messag
set_gps_global_origin->altitude = mavlink_msg_set_gps_global_origin_get_altitude(msg);
set_gps_global_origin->target_system = mavlink_msg_set_gps_global_origin_get_target_system(msg);
#else
memcpy(set_gps_global_origin, _MAV_PAYLOAD(msg), 13);
memcpy(set_gps_global_origin, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN_LEN);
#endif
}

View File

@ -16,6 +16,9 @@ typedef struct __mavlink_set_local_position_setpoint_t
#define MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN 19
#define MAVLINK_MSG_ID_50_LEN 19
#define MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_CRC 214
#define MAVLINK_MSG_ID_50_CRC 214
#define MAVLINK_MESSAGE_INFO_SET_LOCAL_POSITION_SETPOINT { \
@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack(uint8_t syst
uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
char buf[MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack(uint8_t syst
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 19);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack(uint8_t syst
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 19);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message(msg, system_id, component_id, 19, 214);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_CRC);
#else
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
}
/**
@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack_chan(uint8_t
uint8_t target_system,uint8_t target_component,uint8_t coordinate_frame,float x,float y,float z,float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
char buf[MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack_chan(uint8_t
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 19);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_pack_chan(uint8_t
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 19);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 19, 214);
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_CRC);
#else
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
}
/**
@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_set_local_position_setpoint_encode(uint8_t sy
static inline void mavlink_msg_set_local_position_setpoint_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t coordinate_frame, float x, float y, float z, float yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[19];
char buf[MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN];
_mav_put_float(buf, 0, x);
_mav_put_float(buf, 4, y);
_mav_put_float(buf, 8, z);
@ -164,7 +175,11 @@ static inline void mavlink_msg_set_local_position_setpoint_send(mavlink_channel_
_mav_put_uint8_t(buf, 17, target_component);
_mav_put_uint8_t(buf, 18, coordinate_frame);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, buf, 19, 214);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, buf, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
#else
mavlink_set_local_position_setpoint_t packet;
packet.x = x;
@ -175,7 +190,11 @@ static inline void mavlink_msg_set_local_position_setpoint_send(mavlink_channel_
packet.target_component = target_component;
packet.coordinate_frame = coordinate_frame;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, (const char *)&packet, 19, 214);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_CRC);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT, (const char *)&packet, MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
#endif
}
@ -271,6 +290,6 @@ static inline void mavlink_msg_set_local_position_setpoint_decode(const mavlink_
set_local_position_setpoint->target_component = mavlink_msg_set_local_position_setpoint_get_target_component(msg);
set_local_position_setpoint->coordinate_frame = mavlink_msg_set_local_position_setpoint_get_coordinate_frame(msg);
#else
memcpy(set_local_position_setpoint, _MAV_PAYLOAD(msg), 19);
memcpy(set_local_position_setpoint, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SET_LOCAL_POSITION_SETPOINT_LEN);
#endif
}

Some files were not shown because too many files have changed in this diff Show More