add new messages
This commit is contained in:
@@ -0,0 +1,363 @@
|
||||
#pragma once
|
||||
// MESSAGE EMB_ATMO_COM PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_EMB_ATMO_COM 20101
|
||||
|
||||
MAVPACKED(
|
||||
typedef struct __mavlink_emb_atmo_com_t {
|
||||
uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/
|
||||
float Airspeed; /*< Magnitude of air velocity [m/s]*/
|
||||
float beta; /*< Sideslip angle [deg]*/
|
||||
float alpha; /*< Angle of attack [deg]*/
|
||||
float ps; /*< Static pressure [Pa]*/
|
||||
float qbar; /*< Dynamic pressure [Pa]*/
|
||||
uint8_t seq; /*< sequeue index*/
|
||||
}) mavlink_emb_atmo_com_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_EMB_ATMO_COM_LEN 25
|
||||
#define MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN 25
|
||||
#define MAVLINK_MSG_ID_20101_LEN 25
|
||||
#define MAVLINK_MSG_ID_20101_MIN_LEN 25
|
||||
|
||||
#define MAVLINK_MSG_ID_EMB_ATMO_COM_CRC 87
|
||||
#define MAVLINK_MSG_ID_20101_CRC 87
|
||||
|
||||
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_EMB_ATMO_COM { \
|
||||
20101, \
|
||||
"EMB_ATMO_COM", \
|
||||
7, \
|
||||
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_emb_atmo_com_t, time_boot_ms) }, \
|
||||
{ "Airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_emb_atmo_com_t, Airspeed) }, \
|
||||
{ "beta", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_emb_atmo_com_t, beta) }, \
|
||||
{ "alpha", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_emb_atmo_com_t, alpha) }, \
|
||||
{ "ps", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_emb_atmo_com_t, ps) }, \
|
||||
{ "qbar", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_emb_atmo_com_t, qbar) }, \
|
||||
{ "seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_emb_atmo_com_t, seq) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_EMB_ATMO_COM { \
|
||||
"EMB_ATMO_COM", \
|
||||
7, \
|
||||
{ { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_emb_atmo_com_t, time_boot_ms) }, \
|
||||
{ "Airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_emb_atmo_com_t, Airspeed) }, \
|
||||
{ "beta", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_emb_atmo_com_t, beta) }, \
|
||||
{ "alpha", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_emb_atmo_com_t, alpha) }, \
|
||||
{ "ps", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_emb_atmo_com_t, ps) }, \
|
||||
{ "qbar", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_emb_atmo_com_t, qbar) }, \
|
||||
{ "seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_emb_atmo_com_t, seq) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a emb_atmo_com 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_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param Airspeed Magnitude of air velocity [m/s]
|
||||
* @param beta Sideslip angle [deg]
|
||||
* @param alpha Angle of attack [deg]
|
||||
* @param ps Static pressure [Pa]
|
||||
* @param qbar Dynamic pressure [Pa]
|
||||
* @param seq sequeue index
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_emb_atmo_com_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, float Airspeed, float beta, float alpha, float ps, float qbar, uint8_t seq)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_EMB_ATMO_COM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, Airspeed);
|
||||
_mav_put_float(buf, 8, beta);
|
||||
_mav_put_float(buf, 12, alpha);
|
||||
_mav_put_float(buf, 16, ps);
|
||||
_mav_put_float(buf, 20, qbar);
|
||||
_mav_put_uint8_t(buf, 24, seq);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN);
|
||||
#else
|
||||
mavlink_emb_atmo_com_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.Airspeed = Airspeed;
|
||||
packet.beta = beta;
|
||||
packet.alpha = alpha;
|
||||
packet.ps = ps;
|
||||
packet.qbar = qbar;
|
||||
packet.seq = seq;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EMB_ATMO_COM;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a emb_atmo_com 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 will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param Airspeed Magnitude of air velocity [m/s]
|
||||
* @param beta Sideslip angle [deg]
|
||||
* @param alpha Angle of attack [deg]
|
||||
* @param ps Static pressure [Pa]
|
||||
* @param qbar Dynamic pressure [Pa]
|
||||
* @param seq sequeue index
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_emb_atmo_com_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms,float Airspeed,float beta,float alpha,float ps,float qbar,uint8_t seq)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_EMB_ATMO_COM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, Airspeed);
|
||||
_mav_put_float(buf, 8, beta);
|
||||
_mav_put_float(buf, 12, alpha);
|
||||
_mav_put_float(buf, 16, ps);
|
||||
_mav_put_float(buf, 20, qbar);
|
||||
_mav_put_uint8_t(buf, 24, seq);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN);
|
||||
#else
|
||||
mavlink_emb_atmo_com_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.Airspeed = Airspeed;
|
||||
packet.beta = beta;
|
||||
packet.alpha = alpha;
|
||||
packet.ps = ps;
|
||||
packet.qbar = qbar;
|
||||
packet.seq = seq;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EMB_ATMO_COM;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a emb_atmo_com struct
|
||||
*
|
||||
* @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 emb_atmo_com C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_emb_atmo_com_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_emb_atmo_com_t* emb_atmo_com)
|
||||
{
|
||||
return mavlink_msg_emb_atmo_com_pack(system_id, component_id, msg, emb_atmo_com->time_boot_ms, emb_atmo_com->Airspeed, emb_atmo_com->beta, emb_atmo_com->alpha, emb_atmo_com->ps, emb_atmo_com->qbar, emb_atmo_com->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a emb_atmo_com struct 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 will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param emb_atmo_com C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_emb_atmo_com_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_emb_atmo_com_t* emb_atmo_com)
|
||||
{
|
||||
return mavlink_msg_emb_atmo_com_pack_chan(system_id, component_id, chan, msg, emb_atmo_com->time_boot_ms, emb_atmo_com->Airspeed, emb_atmo_com->beta, emb_atmo_com->alpha, emb_atmo_com->ps, emb_atmo_com->qbar, emb_atmo_com->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a emb_atmo_com message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param Airspeed Magnitude of air velocity [m/s]
|
||||
* @param beta Sideslip angle [deg]
|
||||
* @param alpha Angle of attack [deg]
|
||||
* @param ps Static pressure [Pa]
|
||||
* @param qbar Dynamic pressure [Pa]
|
||||
* @param seq sequeue index
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_emb_atmo_com_send(mavlink_channel_t chan, uint32_t time_boot_ms, float Airspeed, float beta, float alpha, float ps, float qbar, uint8_t seq)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_EMB_ATMO_COM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, Airspeed);
|
||||
_mav_put_float(buf, 8, beta);
|
||||
_mav_put_float(buf, 12, alpha);
|
||||
_mav_put_float(buf, 16, ps);
|
||||
_mav_put_float(buf, 20, qbar);
|
||||
_mav_put_uint8_t(buf, 24, seq);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EMB_ATMO_COM, buf, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
#else
|
||||
mavlink_emb_atmo_com_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.Airspeed = Airspeed;
|
||||
packet.beta = beta;
|
||||
packet.alpha = alpha;
|
||||
packet.ps = ps;
|
||||
packet.qbar = qbar;
|
||||
packet.seq = seq;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EMB_ATMO_COM, (const char *)&packet, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a emb_atmo_com message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_emb_atmo_com_send_struct(mavlink_channel_t chan, const mavlink_emb_atmo_com_t* emb_atmo_com)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_emb_atmo_com_send(chan, emb_atmo_com->time_boot_ms, emb_atmo_com->Airspeed, emb_atmo_com->beta, emb_atmo_com->alpha, emb_atmo_com->ps, emb_atmo_com->qbar, emb_atmo_com->seq);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EMB_ATMO_COM, (const char *)emb_atmo_com, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_EMB_ATMO_COM_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
||||
/*
|
||||
This varient of _send() can be used to save stack space by re-using
|
||||
memory from the receive buffer. The caller provides a
|
||||
mavlink_message_t which is the size of a full mavlink message. This
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
static inline void mavlink_msg_emb_atmo_com_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, float Airspeed, float beta, float alpha, float ps, float qbar, uint8_t seq)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, Airspeed);
|
||||
_mav_put_float(buf, 8, beta);
|
||||
_mav_put_float(buf, 12, alpha);
|
||||
_mav_put_float(buf, 16, ps);
|
||||
_mav_put_float(buf, 20, qbar);
|
||||
_mav_put_uint8_t(buf, 24, seq);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EMB_ATMO_COM, buf, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
#else
|
||||
mavlink_emb_atmo_com_t *packet = (mavlink_emb_atmo_com_t *)msgbuf;
|
||||
packet->time_boot_ms = time_boot_ms;
|
||||
packet->Airspeed = Airspeed;
|
||||
packet->beta = beta;
|
||||
packet->alpha = alpha;
|
||||
packet->ps = ps;
|
||||
packet->qbar = qbar;
|
||||
packet->seq = seq;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EMB_ATMO_COM, (const char *)packet, MAVLINK_MSG_ID_EMB_ATMO_COM_MIN_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN, MAVLINK_MSG_ID_EMB_ATMO_COM_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE EMB_ATMO_COM UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time_boot_ms from emb_atmo_com message
|
||||
*
|
||||
* @return Timestamp (milliseconds since system boot)
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_emb_atmo_com_get_time_boot_ms(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field Airspeed from emb_atmo_com message
|
||||
*
|
||||
* @return Magnitude of air velocity [m/s]
|
||||
*/
|
||||
static inline float mavlink_msg_emb_atmo_com_get_Airspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field beta from emb_atmo_com message
|
||||
*
|
||||
* @return Sideslip angle [deg]
|
||||
*/
|
||||
static inline float mavlink_msg_emb_atmo_com_get_beta(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field alpha from emb_atmo_com message
|
||||
*
|
||||
* @return Angle of attack [deg]
|
||||
*/
|
||||
static inline float mavlink_msg_emb_atmo_com_get_alpha(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ps from emb_atmo_com message
|
||||
*
|
||||
* @return Static pressure [Pa]
|
||||
*/
|
||||
static inline float mavlink_msg_emb_atmo_com_get_ps(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field qbar from emb_atmo_com message
|
||||
*
|
||||
* @return Dynamic pressure [Pa]
|
||||
*/
|
||||
static inline float mavlink_msg_emb_atmo_com_get_qbar(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field seq from emb_atmo_com message
|
||||
*
|
||||
* @return sequeue index
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_emb_atmo_com_get_seq(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a emb_atmo_com message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param emb_atmo_com C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_emb_atmo_com_decode(const mavlink_message_t* msg, mavlink_emb_atmo_com_t* emb_atmo_com)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
emb_atmo_com->time_boot_ms = mavlink_msg_emb_atmo_com_get_time_boot_ms(msg);
|
||||
emb_atmo_com->Airspeed = mavlink_msg_emb_atmo_com_get_Airspeed(msg);
|
||||
emb_atmo_com->beta = mavlink_msg_emb_atmo_com_get_beta(msg);
|
||||
emb_atmo_com->alpha = mavlink_msg_emb_atmo_com_get_alpha(msg);
|
||||
emb_atmo_com->ps = mavlink_msg_emb_atmo_com_get_ps(msg);
|
||||
emb_atmo_com->qbar = mavlink_msg_emb_atmo_com_get_qbar(msg);
|
||||
emb_atmo_com->seq = mavlink_msg_emb_atmo_com_get_seq(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_EMB_ATMO_COM_LEN? msg->len : MAVLINK_MSG_ID_EMB_ATMO_COM_LEN;
|
||||
memset(emb_atmo_com, 0, MAVLINK_MSG_ID_EMB_ATMO_COM_LEN);
|
||||
memcpy(emb_atmo_com, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user