Commit 45d924df authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/39a898e45fa1a62e495b896d94c0d2b27abb1638
parent ece64b70
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
#pragma once
// MESSAGE RAW_RPM PACKING
#define MAVLINK_MSG_ID_RAW_RPM 339
MAVPACKED(
typedef struct __mavlink_raw_rpm_t {
float frequency; /*< [rpm] Indicated rate*/
uint8_t index; /*< Index of this RPM sensor (0-indexed)*/
}) mavlink_raw_rpm_t;
#define MAVLINK_MSG_ID_RAW_RPM_LEN 5
#define MAVLINK_MSG_ID_RAW_RPM_MIN_LEN 5
#define MAVLINK_MSG_ID_339_LEN 5
#define MAVLINK_MSG_ID_339_MIN_LEN 5
#define MAVLINK_MSG_ID_RAW_RPM_CRC 199
#define MAVLINK_MSG_ID_339_CRC 199
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_RAW_RPM { \
339, \
"RAW_RPM", \
2, \
{ { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_raw_rpm_t, index) }, \
{ "frequency", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_raw_rpm_t, frequency) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_RAW_RPM { \
"RAW_RPM", \
2, \
{ { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_raw_rpm_t, index) }, \
{ "frequency", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_raw_rpm_t, frequency) }, \
} \
}
#endif
/**
* @brief Pack a raw_rpm 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 index Index of this RPM sensor (0-indexed)
* @param frequency [rpm] Indicated rate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_rpm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t index, float frequency)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RAW_RPM_LEN];
_mav_put_float(buf, 0, frequency);
_mav_put_uint8_t(buf, 4, index);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_RPM_LEN);
#else
mavlink_raw_rpm_t packet;
packet.frequency = frequency;
packet.index = index;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_RPM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_RPM;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
}
/**
* @brief Pack a raw_rpm 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 index Index of this RPM sensor (0-indexed)
* @param frequency [rpm] Indicated rate
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_raw_rpm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t index,float frequency)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RAW_RPM_LEN];
_mav_put_float(buf, 0, frequency);
_mav_put_uint8_t(buf, 4, index);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RAW_RPM_LEN);
#else
mavlink_raw_rpm_t packet;
packet.frequency = frequency;
packet.index = index;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_RPM_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_RAW_RPM;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
}
/**
* @brief Encode a raw_rpm 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 raw_rpm C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_raw_rpm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_raw_rpm_t* raw_rpm)
{
return mavlink_msg_raw_rpm_pack(system_id, component_id, msg, raw_rpm->index, raw_rpm->frequency);
}
/**
* @brief Encode a raw_rpm 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 raw_rpm C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_raw_rpm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_raw_rpm_t* raw_rpm)
{
return mavlink_msg_raw_rpm_pack_chan(system_id, component_id, chan, msg, raw_rpm->index, raw_rpm->frequency);
}
/**
* @brief Send a raw_rpm message
* @param chan MAVLink channel to send the message
*
* @param index Index of this RPM sensor (0-indexed)
* @param frequency [rpm] Indicated rate
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_raw_rpm_send(mavlink_channel_t chan, uint8_t index, float frequency)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_RAW_RPM_LEN];
_mav_put_float(buf, 0, frequency);
_mav_put_uint8_t(buf, 4, index);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, buf, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
#else
mavlink_raw_rpm_t packet;
packet.frequency = frequency;
packet.index = index;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (const char *)&packet, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
#endif
}
/**
* @brief Send a raw_rpm message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_raw_rpm_send_struct(mavlink_channel_t chan, const mavlink_raw_rpm_t* raw_rpm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_raw_rpm_send(chan, raw_rpm->index, raw_rpm->frequency);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (const char *)raw_rpm, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
#endif
}
#if MAVLINK_MSG_ID_RAW_RPM_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_raw_rpm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, float frequency)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, frequency);
_mav_put_uint8_t(buf, 4, index);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, buf, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
#else
mavlink_raw_rpm_t *packet = (mavlink_raw_rpm_t *)msgbuf;
packet->frequency = frequency;
packet->index = index;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (const char *)packet, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
#endif
}
#endif
#endif
// MESSAGE RAW_RPM UNPACKING
/**
* @brief Get field index from raw_rpm message
*
* @return Index of this RPM sensor (0-indexed)
*/
static inline uint8_t mavlink_msg_raw_rpm_get_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 4);
}
/**
* @brief Get field frequency from raw_rpm message
*
* @return [rpm] Indicated rate
*/
static inline float mavlink_msg_raw_rpm_get_frequency(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Decode a raw_rpm message into a struct
*
* @param msg The message to decode
* @param raw_rpm C-struct to decode the message contents into
*/
static inline void mavlink_msg_raw_rpm_decode(const mavlink_message_t* msg, mavlink_raw_rpm_t* raw_rpm)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
raw_rpm->frequency = mavlink_msg_raw_rpm_get_frequency(msg);
raw_rpm->index = mavlink_msg_raw_rpm_get_index(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_RAW_RPM_LEN? msg->len : MAVLINK_MSG_ID_RAW_RPM_LEN;
memset(raw_rpm, 0, MAVLINK_MSG_ID_RAW_RPM_LEN);
memcpy(raw_rpm, _MAV_PAYLOAD(msg), len);
#endif
}
......@@ -10863,6 +10863,61 @@ static void mavlink_test_isbd_link_status(uint8_t system_id, uint8_t component_i
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_raw_rpm(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RAW_RPM >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_raw_rpm_t packet_in = {
17.0,17
};
mavlink_raw_rpm_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.frequency = packet_in.frequency;
packet1.index = packet_in.index;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_RAW_RPM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RAW_RPM_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_rpm_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_raw_rpm_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_rpm_pack(system_id, component_id, &msg , packet1.index , packet1.frequency );
mavlink_msg_raw_rpm_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_rpm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.index , packet1.frequency );
mavlink_msg_raw_rpm_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_to_send_buffer(buffer, &msg);
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
}
mavlink_msg_raw_rpm_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_raw_rpm_send(MAVLINK_COMM_1 , packet1.index , packet1.frequency );
mavlink_msg_raw_rpm_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_utm_global_position(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
......@@ -12239,6 +12294,7 @@ static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink
mavlink_test_trajectory_representation_bezier(system_id, component_id, last_msg);
mavlink_test_cellular_status(system_id, component_id, last_msg);
mavlink_test_isbd_link_status(system_id, component_id, last_msg);
mavlink_test_raw_rpm(system_id, component_id, last_msg);
mavlink_test_utm_global_position(system_id, component_id, last_msg);
mavlink_test_debug_float_array(system_id, component_id, last_msg);
mavlink_test_orbit_execution_status(system_id, component_id, last_msg);
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -6402,6 +6402,11 @@
<field type="uint8_t" name="tx_session_pending">1: Transmission session pending, 0: No transmission session pending.</field>
<field type="uint8_t" name="rx_session_pending">1: Receiving session pending, 0: No receiving session pending.</field>
</message>
<message id="339" name="RAW_RPM">
<description>RPM sensor data message.</description>
<field type="uint8_t" name="index">Index of this RPM sensor (0-indexed)</field>
<field type="float" name="frequency" units="rpm">Indicated rate</field>
</message>
<message id="340" name="UTM_GLOBAL_POSITION">
<wip/>
<!-- This message is work-in-progress it can therefore change, and should NOT be used in stable production environments -->
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Apr 27 2020"
#define MAVLINK_BUILD_DATE "Tue Apr 28 2020"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment