autogenerated headers for rev https://github.com/mavlink/mavlink/tree/6484834917efebc03f7f0326474fc235c2f5e000
This commit is contained in:
@@ -25,10 +25,10 @@ typedef struct __mavlink_uav_status_t {
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_UAV_STATUS { \
|
||||
193, \
|
||||
"UAV_STATUS", \
|
||||
6, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
|
||||
193, \
|
||||
"UAV_STATUS", \
|
||||
6, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_uav_status_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_uav_status_t, altitude) }, \
|
||||
{ "speed", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_uav_status_t, speed) }, \
|
||||
@@ -38,9 +38,9 @@ typedef struct __mavlink_uav_status_t {
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_UAV_STATUS { \
|
||||
"UAV_STATUS", \
|
||||
6, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
|
||||
"UAV_STATUS", \
|
||||
6, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_uav_status_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_uav_status_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_uav_status_t, altitude) }, \
|
||||
{ "speed", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_uav_status_t, speed) }, \
|
||||
@@ -65,31 +65,31 @@ typedef struct __mavlink_uav_status_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_uav_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
|
||||
uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAV_STATUS_LEN);
|
||||
#else
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAV_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
|
||||
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
}
|
||||
|
||||
@@ -108,32 +108,32 @@ static inline uint16_t mavlink_msg_uav_status_pack(uint8_t system_id, uint8_t co
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_uav_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target,float latitude,float longitude,float altitude,float speed,float course)
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target,float latitude,float longitude,float altitude,float speed,float course)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAV_STATUS_LEN);
|
||||
#else
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAV_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
|
||||
msg->msgid = MAVLINK_MSG_ID_UAV_STATUS;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ static inline uint16_t mavlink_msg_uav_status_pack_chan(uint8_t system_id, uint8
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_uav_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uav_status_t* uav_status)
|
||||
{
|
||||
return mavlink_msg_uav_status_pack(system_id, component_id, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
|
||||
return mavlink_msg_uav_status_pack(system_id, component_id, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,7 +161,7 @@ static inline uint16_t mavlink_msg_uav_status_encode(uint8_t system_id, uint8_t
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_uav_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uav_status_t* uav_status)
|
||||
{
|
||||
return mavlink_msg_uav_status_pack_chan(system_id, component_id, chan, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
|
||||
return mavlink_msg_uav_status_pack_chan(system_id, component_id, chan, msg, uav_status->target, uav_status->latitude, uav_status->longitude, uav_status->altitude, uav_status->speed, uav_status->course);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,23 +180,23 @@ static inline uint16_t mavlink_msg_uav_status_encode_chan(uint8_t system_id, uin
|
||||
static inline void mavlink_msg_uav_status_send(mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
char buf[MAVLINK_MSG_ID_UAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, buf, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
#else
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
mavlink_uav_status_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.speed = speed;
|
||||
packet.course = course;
|
||||
packet.target = target;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, (const char *)&packet, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
#endif
|
||||
@@ -227,23 +227,23 @@ static inline void mavlink_msg_uav_status_send_struct(mavlink_channel_t chan, co
|
||||
static inline void mavlink_msg_uav_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target, float latitude, float longitude, float altitude, float speed, float course)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, latitude);
|
||||
_mav_put_float(buf, 4, longitude);
|
||||
_mav_put_float(buf, 8, altitude);
|
||||
_mav_put_float(buf, 12, speed);
|
||||
_mav_put_float(buf, 16, course);
|
||||
_mav_put_uint8_t(buf, 20, target);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, buf, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
#else
|
||||
mavlink_uav_status_t *packet = (mavlink_uav_status_t *)msgbuf;
|
||||
packet->latitude = latitude;
|
||||
packet->longitude = longitude;
|
||||
packet->altitude = altitude;
|
||||
packet->speed = speed;
|
||||
packet->course = course;
|
||||
packet->target = target;
|
||||
mavlink_uav_status_t *packet = (mavlink_uav_status_t *)msgbuf;
|
||||
packet->latitude = latitude;
|
||||
packet->longitude = longitude;
|
||||
packet->altitude = altitude;
|
||||
packet->speed = speed;
|
||||
packet->course = course;
|
||||
packet->target = target;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAV_STATUS, (const char *)packet, MAVLINK_MSG_ID_UAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAV_STATUS_LEN, MAVLINK_MSG_ID_UAV_STATUS_CRC);
|
||||
#endif
|
||||
@@ -262,7 +262,7 @@ static inline void mavlink_msg_uav_status_send_buf(mavlink_message_t *msgbuf, ma
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_uav_status_get_target(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 20);
|
||||
return _MAV_RETURN_uint8_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,7 +272,7 @@ static inline uint8_t mavlink_msg_uav_status_get_target(const mavlink_message_t*
|
||||
*/
|
||||
static inline float mavlink_msg_uav_status_get_latitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,7 +282,7 @@ static inline float mavlink_msg_uav_status_get_latitude(const mavlink_message_t*
|
||||
*/
|
||||
static inline float mavlink_msg_uav_status_get_longitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,7 +292,7 @@ static inline float mavlink_msg_uav_status_get_longitude(const mavlink_message_t
|
||||
*/
|
||||
static inline float mavlink_msg_uav_status_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,7 +302,7 @@ static inline float mavlink_msg_uav_status_get_altitude(const mavlink_message_t*
|
||||
*/
|
||||
static inline float mavlink_msg_uav_status_get_speed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -312,7 +312,7 @@ static inline float mavlink_msg_uav_status_get_speed(const mavlink_message_t* ms
|
||||
*/
|
||||
static inline float mavlink_msg_uav_status_get_course(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,15 +324,15 @@ static inline float mavlink_msg_uav_status_get_course(const mavlink_message_t* m
|
||||
static inline void mavlink_msg_uav_status_decode(const mavlink_message_t* msg, mavlink_uav_status_t* uav_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
uav_status->latitude = mavlink_msg_uav_status_get_latitude(msg);
|
||||
uav_status->longitude = mavlink_msg_uav_status_get_longitude(msg);
|
||||
uav_status->altitude = mavlink_msg_uav_status_get_altitude(msg);
|
||||
uav_status->speed = mavlink_msg_uav_status_get_speed(msg);
|
||||
uav_status->course = mavlink_msg_uav_status_get_course(msg);
|
||||
uav_status->target = mavlink_msg_uav_status_get_target(msg);
|
||||
uav_status->latitude = mavlink_msg_uav_status_get_latitude(msg);
|
||||
uav_status->longitude = mavlink_msg_uav_status_get_longitude(msg);
|
||||
uav_status->altitude = mavlink_msg_uav_status_get_altitude(msg);
|
||||
uav_status->speed = mavlink_msg_uav_status_get_speed(msg);
|
||||
uav_status->course = mavlink_msg_uav_status_get_course(msg);
|
||||
uav_status->target = mavlink_msg_uav_status_get_target(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_UAV_STATUS_LEN? msg->len : MAVLINK_MSG_ID_UAV_STATUS_LEN;
|
||||
memset(uav_status, 0, MAVLINK_MSG_ID_UAV_STATUS_LEN);
|
||||
memcpy(uav_status, _MAV_PAYLOAD(msg), len);
|
||||
memcpy(uav_status, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user