autogenerated headers for rev https://github.com/mavlink/mavlink/tree/6484834917efebc03f7f0326474fc235c2f5e000
This commit is contained in:
@@ -25,10 +25,10 @@ typedef struct __mavlink_heartbeat_t {
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_HEARTBEAT { \
|
||||
0, \
|
||||
"HEARTBEAT", \
|
||||
6, \
|
||||
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
|
||||
0, \
|
||||
"HEARTBEAT", \
|
||||
6, \
|
||||
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
|
||||
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_heartbeat_t, type) }, \
|
||||
{ "autopilot", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_heartbeat_t, autopilot) }, \
|
||||
{ "base_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_heartbeat_t, base_mode) }, \
|
||||
@@ -38,9 +38,9 @@ typedef struct __mavlink_heartbeat_t {
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_HEARTBEAT { \
|
||||
"HEARTBEAT", \
|
||||
6, \
|
||||
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
|
||||
"HEARTBEAT", \
|
||||
6, \
|
||||
{ { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_heartbeat_t, custom_mode) }, \
|
||||
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_heartbeat_t, type) }, \
|
||||
{ "autopilot", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_heartbeat_t, autopilot) }, \
|
||||
{ "base_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_heartbeat_t, base_mode) }, \
|
||||
@@ -64,31 +64,31 @@ typedef struct __mavlink_heartbeat_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t type, uint8_t autopilot, uint8_t base_mode, uint32_t custom_mode, uint8_t system_status)
|
||||
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[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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HEARTBEAT_LEN);
|
||||
#else
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HEARTBEAT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
|
||||
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
}
|
||||
|
||||
@@ -106,32 +106,32 @@ static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t com
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t type,uint8_t autopilot,uint8_t base_mode,uint32_t custom_mode,uint8_t system_status)
|
||||
mavlink_message_t* msg,
|
||||
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[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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HEARTBEAT_LEN);
|
||||
#else
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HEARTBEAT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
|
||||
msg->msgid = MAVLINK_MSG_ID_HEARTBEAT;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_heartbeat_t* heartbeat)
|
||||
{
|
||||
return mavlink_msg_heartbeat_pack(system_id, component_id, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
return mavlink_msg_heartbeat_pack(system_id, component_id, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,7 +159,7 @@ static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t c
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_heartbeat_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_heartbeat_t* heartbeat)
|
||||
{
|
||||
return mavlink_msg_heartbeat_pack_chan(system_id, component_id, chan, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
return mavlink_msg_heartbeat_pack_chan(system_id, component_id, chan, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,23 +177,23 @@ static inline uint16_t mavlink_msg_heartbeat_encode_chan(uint8_t system_id, uint
|
||||
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[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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
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);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
#else
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
mavlink_heartbeat_t packet;
|
||||
packet.custom_mode = custom_mode;
|
||||
packet.type = type;
|
||||
packet.autopilot = autopilot;
|
||||
packet.base_mode = base_mode;
|
||||
packet.system_status = system_status;
|
||||
packet.mavlink_version = 2;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)&packet, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
#endif
|
||||
@@ -224,23 +224,23 @@ static inline void mavlink_msg_heartbeat_send_struct(mavlink_channel_t chan, con
|
||||
static inline void mavlink_msg_heartbeat_send_buf(mavlink_message_t *msgbuf, 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 = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, custom_mode);
|
||||
_mav_put_uint8_t(buf, 4, type);
|
||||
_mav_put_uint8_t(buf, 5, autopilot);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, custom_mode);
|
||||
_mav_put_uint8_t(buf, 4, type);
|
||||
_mav_put_uint8_t(buf, 5, autopilot);
|
||||
_mav_put_uint8_t(buf, 6, base_mode);
|
||||
_mav_put_uint8_t(buf, 7, system_status);
|
||||
_mav_put_uint8_t(buf, 8, 2);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, buf, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
#else
|
||||
mavlink_heartbeat_t *packet = (mavlink_heartbeat_t *)msgbuf;
|
||||
packet->custom_mode = custom_mode;
|
||||
packet->type = type;
|
||||
packet->autopilot = autopilot;
|
||||
packet->base_mode = base_mode;
|
||||
packet->system_status = system_status;
|
||||
packet->mavlink_version = 2;
|
||||
mavlink_heartbeat_t *packet = (mavlink_heartbeat_t *)msgbuf;
|
||||
packet->custom_mode = custom_mode;
|
||||
packet->type = type;
|
||||
packet->autopilot = autopilot;
|
||||
packet->base_mode = base_mode;
|
||||
packet->system_status = system_status;
|
||||
packet->mavlink_version = 2;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HEARTBEAT, (const char *)packet, MAVLINK_MSG_ID_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_HEARTBEAT_LEN, MAVLINK_MSG_ID_HEARTBEAT_CRC);
|
||||
#endif
|
||||
@@ -259,7 +259,7 @@ static inline void mavlink_msg_heartbeat_send_buf(mavlink_message_t *msgbuf, mav
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 4);
|
||||
return _MAV_RETURN_uint8_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -269,7 +269,7 @@ static inline uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t* ms
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_heartbeat_get_autopilot(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 5);
|
||||
return _MAV_RETURN_uint8_t(msg, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +279,7 @@ static inline uint8_t mavlink_msg_heartbeat_get_autopilot(const mavlink_message_
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 6);
|
||||
return _MAV_RETURN_uint8_t(msg, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,7 +289,7 @@ static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_heartbeat_get_custom_mode(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -299,7 +299,7 @@ static inline uint32_t mavlink_msg_heartbeat_get_custom_mode(const mavlink_messa
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_heartbeat_get_system_status(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 7);
|
||||
return _MAV_RETURN_uint8_t(msg, 7);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,7 +309,7 @@ static inline uint8_t mavlink_msg_heartbeat_get_system_status(const mavlink_mess
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_heartbeat_get_mavlink_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 8);
|
||||
return _MAV_RETURN_uint8_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -321,15 +321,15 @@ static inline uint8_t mavlink_msg_heartbeat_get_mavlink_version(const mavlink_me
|
||||
static inline void mavlink_msg_heartbeat_decode(const mavlink_message_t* msg, mavlink_heartbeat_t* heartbeat)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
heartbeat->custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
|
||||
heartbeat->type = mavlink_msg_heartbeat_get_type(msg);
|
||||
heartbeat->autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
|
||||
heartbeat->base_mode = mavlink_msg_heartbeat_get_base_mode(msg);
|
||||
heartbeat->system_status = mavlink_msg_heartbeat_get_system_status(msg);
|
||||
heartbeat->mavlink_version = mavlink_msg_heartbeat_get_mavlink_version(msg);
|
||||
heartbeat->custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
|
||||
heartbeat->type = mavlink_msg_heartbeat_get_type(msg);
|
||||
heartbeat->autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
|
||||
heartbeat->base_mode = mavlink_msg_heartbeat_get_base_mode(msg);
|
||||
heartbeat->system_status = mavlink_msg_heartbeat_get_system_status(msg);
|
||||
heartbeat->mavlink_version = mavlink_msg_heartbeat_get_mavlink_version(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_HEARTBEAT_LEN? msg->len : MAVLINK_MSG_ID_HEARTBEAT_LEN;
|
||||
memset(heartbeat, 0, MAVLINK_MSG_ID_HEARTBEAT_LEN);
|
||||
memcpy(heartbeat, _MAV_PAYLOAD(msg), len);
|
||||
memcpy(heartbeat, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user