This commit is contained in:
PX4BuildBot
2024-12-03 22:53:35 +00:00
parent 7dba41a8cd
commit 1178a8331b
69 changed files with 4641 additions and 73 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_ASLUAV.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_ASLUAV_XML_HASH 3936883450436150134
#define MAVLINK_ASLUAV_XML_HASH 2524448736018163603
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 3936883450436150134
#define MAVLINK_PRIMARY_XML_HASH 2524448736018163603
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_AVSSUAS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_AVSSUAS_XML_HASH -2442418339061915474
#define MAVLINK_AVSSUAS_XML_HASH -5388890558920453154
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -2442418339061915474
#define MAVLINK_PRIMARY_XML_HASH -5388890558920453154
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+4 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 8376585287212785654
#define MAVLINK_PRIMARY_XML_HASH 7987182536684289275
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 5869063498420946589
#define MAVLINK_PRIMARY_XML_HASH -4311378975566210157
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
@@ -0,0 +1,405 @@
#pragma once
// MESSAGE ESC_TELEMETRY_13_TO_16 PACKING
#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16 11040
typedef struct __mavlink_esc_telemetry_13_to_16_t {
uint16_t voltage[4]; /*< [cV] Voltage.*/
uint16_t current[4]; /*< [cA] Current.*/
uint16_t totalcurrent[4]; /*< [mAh] Total current.*/
uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/
uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/
uint8_t temperature[4]; /*< [degC] Temperature.*/
} mavlink_esc_telemetry_13_to_16_t;
#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN 44
#define MAVLINK_MSG_ID_11040_LEN 44
#define MAVLINK_MSG_ID_11040_MIN_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC 132
#define MAVLINK_MSG_ID_11040_CRC 132
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_VOLTAGE_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_CURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_TOTALCURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_RPM_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_COUNT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_TEMPERATURE_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16 { \
11040, \
"ESC_TELEMETRY_13_TO_16", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_13_to_16_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_13_to_16_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_13_to_16_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_13_to_16_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_13_to_16_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_13_to_16_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16 { \
"ESC_TELEMETRY_13_TO_16", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_13_to_16_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_13_to_16_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_13_to_16_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_13_to_16_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_13_to_16_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_13_to_16_t, count) }, \
} \
}
#endif
/**
* @brief Pack a esc_telemetry_13_to_16 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#else
mavlink_esc_telemetry_13_to_16_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
}
/**
* @brief Pack a esc_telemetry_13_to_16 message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#else
mavlink_esc_telemetry_13_to_16_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#endif
}
/**
* @brief Pack a esc_telemetry_13_to_16 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#else
mavlink_esc_telemetry_13_to_16_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
}
/**
* @brief Encode a esc_telemetry_13_to_16 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 esc_telemetry_13_to_16 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16)
{
return mavlink_msg_esc_telemetry_13_to_16_pack(system_id, component_id, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count);
}
/**
* @brief Encode a esc_telemetry_13_to_16 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 esc_telemetry_13_to_16 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16)
{
return mavlink_msg_esc_telemetry_13_to_16_pack_chan(system_id, component_id, chan, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count);
}
/**
* @brief Encode a esc_telemetry_13_to_16 struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param esc_telemetry_13_to_16 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16)
{
return mavlink_msg_esc_telemetry_13_to_16_pack_status(system_id, component_id, _status, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count);
}
/**
* @brief Send a esc_telemetry_13_to_16 message
* @param chan MAVLink channel to send the message
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_esc_telemetry_13_to_16_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#else
mavlink_esc_telemetry_13_to_16_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#endif
}
/**
* @brief Send a esc_telemetry_13_to_16 message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_esc_telemetry_13_to_16_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_13_to_16_send(chan, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)esc_telemetry_13_to_16, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#endif
}
#if MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_esc_telemetry_13_to_16_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#else
mavlink_esc_telemetry_13_to_16_t *packet = (mavlink_esc_telemetry_13_to_16_t *)msgbuf;
mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC);
#endif
}
#endif
#endif
// MESSAGE ESC_TELEMETRY_13_TO_16 UNPACKING
/**
* @brief Get field temperature from esc_telemetry_13_to_16 message
*
* @return [degC] Temperature.
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_temperature(const mavlink_message_t* msg, uint8_t *temperature)
{
return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40);
}
/**
* @brief Get field voltage from esc_telemetry_13_to_16 message
*
* @return [cV] Voltage.
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_voltage(const mavlink_message_t* msg, uint16_t *voltage)
{
return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0);
}
/**
* @brief Get field current from esc_telemetry_13_to_16 message
*
* @return [cA] Current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_current(const mavlink_message_t* msg, uint16_t *current)
{
return _MAV_RETURN_uint16_t_array(msg, current, 4, 8);
}
/**
* @brief Get field totalcurrent from esc_telemetry_13_to_16 message
*
* @return [mAh] Total current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent)
{
return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16);
}
/**
* @brief Get field rpm from esc_telemetry_13_to_16 message
*
* @return [rpm] RPM (eRPM).
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_rpm(const mavlink_message_t* msg, uint16_t *rpm)
{
return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24);
}
/**
* @brief Get field count from esc_telemetry_13_to_16 message
*
* @return count of telemetry packets received (wraps at 65535).
*/
static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_count(const mavlink_message_t* msg, uint16_t *count)
{
return _MAV_RETURN_uint16_t_array(msg, count, 4, 32);
}
/**
* @brief Decode a esc_telemetry_13_to_16 message into a struct
*
* @param msg The message to decode
* @param esc_telemetry_13_to_16 C-struct to decode the message contents into
*/
static inline void mavlink_msg_esc_telemetry_13_to_16_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_13_to_16_get_voltage(msg, esc_telemetry_13_to_16->voltage);
mavlink_msg_esc_telemetry_13_to_16_get_current(msg, esc_telemetry_13_to_16->current);
mavlink_msg_esc_telemetry_13_to_16_get_totalcurrent(msg, esc_telemetry_13_to_16->totalcurrent);
mavlink_msg_esc_telemetry_13_to_16_get_rpm(msg, esc_telemetry_13_to_16->rpm);
mavlink_msg_esc_telemetry_13_to_16_get_count(msg, esc_telemetry_13_to_16->count);
mavlink_msg_esc_telemetry_13_to_16_get_temperature(msg, esc_telemetry_13_to_16->temperature);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN;
memset(esc_telemetry_13_to_16, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN);
memcpy(esc_telemetry_13_to_16, _MAV_PAYLOAD(msg), len);
#endif
}
@@ -0,0 +1,405 @@
#pragma once
// MESSAGE ESC_TELEMETRY_17_TO_20 PACKING
#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20 11041
typedef struct __mavlink_esc_telemetry_17_to_20_t {
uint16_t voltage[4]; /*< [cV] Voltage.*/
uint16_t current[4]; /*< [cA] Current.*/
uint16_t totalcurrent[4]; /*< [mAh] Total current.*/
uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/
uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/
uint8_t temperature[4]; /*< [degC] Temperature.*/
} mavlink_esc_telemetry_17_to_20_t;
#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN 44
#define MAVLINK_MSG_ID_11041_LEN 44
#define MAVLINK_MSG_ID_11041_MIN_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC 208
#define MAVLINK_MSG_ID_11041_CRC 208
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_VOLTAGE_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_CURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_TOTALCURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_RPM_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_COUNT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_TEMPERATURE_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20 { \
11041, \
"ESC_TELEMETRY_17_TO_20", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_17_to_20_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_17_to_20_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_17_to_20_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_17_to_20_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_17_to_20_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_17_to_20_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20 { \
"ESC_TELEMETRY_17_TO_20", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_17_to_20_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_17_to_20_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_17_to_20_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_17_to_20_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_17_to_20_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_17_to_20_t, count) }, \
} \
}
#endif
/**
* @brief Pack a esc_telemetry_17_to_20 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#else
mavlink_esc_telemetry_17_to_20_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
}
/**
* @brief Pack a esc_telemetry_17_to_20 message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#else
mavlink_esc_telemetry_17_to_20_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#endif
}
/**
* @brief Pack a esc_telemetry_17_to_20 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#else
mavlink_esc_telemetry_17_to_20_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
}
/**
* @brief Encode a esc_telemetry_17_to_20 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 esc_telemetry_17_to_20 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20)
{
return mavlink_msg_esc_telemetry_17_to_20_pack(system_id, component_id, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count);
}
/**
* @brief Encode a esc_telemetry_17_to_20 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 esc_telemetry_17_to_20 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20)
{
return mavlink_msg_esc_telemetry_17_to_20_pack_chan(system_id, component_id, chan, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count);
}
/**
* @brief Encode a esc_telemetry_17_to_20 struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param esc_telemetry_17_to_20 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20)
{
return mavlink_msg_esc_telemetry_17_to_20_pack_status(system_id, component_id, _status, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count);
}
/**
* @brief Send a esc_telemetry_17_to_20 message
* @param chan MAVLink channel to send the message
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_esc_telemetry_17_to_20_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#else
mavlink_esc_telemetry_17_to_20_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#endif
}
/**
* @brief Send a esc_telemetry_17_to_20 message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_esc_telemetry_17_to_20_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_17_to_20_send(chan, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)esc_telemetry_17_to_20, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#endif
}
#if MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_esc_telemetry_17_to_20_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#else
mavlink_esc_telemetry_17_to_20_t *packet = (mavlink_esc_telemetry_17_to_20_t *)msgbuf;
mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC);
#endif
}
#endif
#endif
// MESSAGE ESC_TELEMETRY_17_TO_20 UNPACKING
/**
* @brief Get field temperature from esc_telemetry_17_to_20 message
*
* @return [degC] Temperature.
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_temperature(const mavlink_message_t* msg, uint8_t *temperature)
{
return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40);
}
/**
* @brief Get field voltage from esc_telemetry_17_to_20 message
*
* @return [cV] Voltage.
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_voltage(const mavlink_message_t* msg, uint16_t *voltage)
{
return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0);
}
/**
* @brief Get field current from esc_telemetry_17_to_20 message
*
* @return [cA] Current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_current(const mavlink_message_t* msg, uint16_t *current)
{
return _MAV_RETURN_uint16_t_array(msg, current, 4, 8);
}
/**
* @brief Get field totalcurrent from esc_telemetry_17_to_20 message
*
* @return [mAh] Total current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent)
{
return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16);
}
/**
* @brief Get field rpm from esc_telemetry_17_to_20 message
*
* @return [rpm] RPM (eRPM).
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_rpm(const mavlink_message_t* msg, uint16_t *rpm)
{
return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24);
}
/**
* @brief Get field count from esc_telemetry_17_to_20 message
*
* @return count of telemetry packets received (wraps at 65535).
*/
static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_count(const mavlink_message_t* msg, uint16_t *count)
{
return _MAV_RETURN_uint16_t_array(msg, count, 4, 32);
}
/**
* @brief Decode a esc_telemetry_17_to_20 message into a struct
*
* @param msg The message to decode
* @param esc_telemetry_17_to_20 C-struct to decode the message contents into
*/
static inline void mavlink_msg_esc_telemetry_17_to_20_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_17_to_20_get_voltage(msg, esc_telemetry_17_to_20->voltage);
mavlink_msg_esc_telemetry_17_to_20_get_current(msg, esc_telemetry_17_to_20->current);
mavlink_msg_esc_telemetry_17_to_20_get_totalcurrent(msg, esc_telemetry_17_to_20->totalcurrent);
mavlink_msg_esc_telemetry_17_to_20_get_rpm(msg, esc_telemetry_17_to_20->rpm);
mavlink_msg_esc_telemetry_17_to_20_get_count(msg, esc_telemetry_17_to_20->count);
mavlink_msg_esc_telemetry_17_to_20_get_temperature(msg, esc_telemetry_17_to_20->temperature);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN;
memset(esc_telemetry_17_to_20, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN);
memcpy(esc_telemetry_17_to_20, _MAV_PAYLOAD(msg), len);
#endif
}
@@ -0,0 +1,405 @@
#pragma once
// MESSAGE ESC_TELEMETRY_21_TO_24 PACKING
#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24 11042
typedef struct __mavlink_esc_telemetry_21_to_24_t {
uint16_t voltage[4]; /*< [cV] Voltage.*/
uint16_t current[4]; /*< [cA] Current.*/
uint16_t totalcurrent[4]; /*< [mAh] Total current.*/
uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/
uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/
uint8_t temperature[4]; /*< [degC] Temperature.*/
} mavlink_esc_telemetry_21_to_24_t;
#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN 44
#define MAVLINK_MSG_ID_11042_LEN 44
#define MAVLINK_MSG_ID_11042_MIN_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC 201
#define MAVLINK_MSG_ID_11042_CRC 201
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_VOLTAGE_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_CURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_TOTALCURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_RPM_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_COUNT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_TEMPERATURE_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24 { \
11042, \
"ESC_TELEMETRY_21_TO_24", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_21_to_24_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_21_to_24_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_21_to_24_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_21_to_24_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_21_to_24_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_21_to_24_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24 { \
"ESC_TELEMETRY_21_TO_24", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_21_to_24_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_21_to_24_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_21_to_24_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_21_to_24_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_21_to_24_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_21_to_24_t, count) }, \
} \
}
#endif
/**
* @brief Pack a esc_telemetry_21_to_24 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#else
mavlink_esc_telemetry_21_to_24_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
}
/**
* @brief Pack a esc_telemetry_21_to_24 message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#else
mavlink_esc_telemetry_21_to_24_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#endif
}
/**
* @brief Pack a esc_telemetry_21_to_24 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#else
mavlink_esc_telemetry_21_to_24_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
}
/**
* @brief Encode a esc_telemetry_21_to_24 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 esc_telemetry_21_to_24 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24)
{
return mavlink_msg_esc_telemetry_21_to_24_pack(system_id, component_id, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count);
}
/**
* @brief Encode a esc_telemetry_21_to_24 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 esc_telemetry_21_to_24 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24)
{
return mavlink_msg_esc_telemetry_21_to_24_pack_chan(system_id, component_id, chan, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count);
}
/**
* @brief Encode a esc_telemetry_21_to_24 struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param esc_telemetry_21_to_24 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24)
{
return mavlink_msg_esc_telemetry_21_to_24_pack_status(system_id, component_id, _status, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count);
}
/**
* @brief Send a esc_telemetry_21_to_24 message
* @param chan MAVLink channel to send the message
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_esc_telemetry_21_to_24_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#else
mavlink_esc_telemetry_21_to_24_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#endif
}
/**
* @brief Send a esc_telemetry_21_to_24 message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_esc_telemetry_21_to_24_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_21_to_24_send(chan, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)esc_telemetry_21_to_24, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#endif
}
#if MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_esc_telemetry_21_to_24_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#else
mavlink_esc_telemetry_21_to_24_t *packet = (mavlink_esc_telemetry_21_to_24_t *)msgbuf;
mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC);
#endif
}
#endif
#endif
// MESSAGE ESC_TELEMETRY_21_TO_24 UNPACKING
/**
* @brief Get field temperature from esc_telemetry_21_to_24 message
*
* @return [degC] Temperature.
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_temperature(const mavlink_message_t* msg, uint8_t *temperature)
{
return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40);
}
/**
* @brief Get field voltage from esc_telemetry_21_to_24 message
*
* @return [cV] Voltage.
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_voltage(const mavlink_message_t* msg, uint16_t *voltage)
{
return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0);
}
/**
* @brief Get field current from esc_telemetry_21_to_24 message
*
* @return [cA] Current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_current(const mavlink_message_t* msg, uint16_t *current)
{
return _MAV_RETURN_uint16_t_array(msg, current, 4, 8);
}
/**
* @brief Get field totalcurrent from esc_telemetry_21_to_24 message
*
* @return [mAh] Total current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent)
{
return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16);
}
/**
* @brief Get field rpm from esc_telemetry_21_to_24 message
*
* @return [rpm] RPM (eRPM).
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_rpm(const mavlink_message_t* msg, uint16_t *rpm)
{
return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24);
}
/**
* @brief Get field count from esc_telemetry_21_to_24 message
*
* @return count of telemetry packets received (wraps at 65535).
*/
static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_count(const mavlink_message_t* msg, uint16_t *count)
{
return _MAV_RETURN_uint16_t_array(msg, count, 4, 32);
}
/**
* @brief Decode a esc_telemetry_21_to_24 message into a struct
*
* @param msg The message to decode
* @param esc_telemetry_21_to_24 C-struct to decode the message contents into
*/
static inline void mavlink_msg_esc_telemetry_21_to_24_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_21_to_24_get_voltage(msg, esc_telemetry_21_to_24->voltage);
mavlink_msg_esc_telemetry_21_to_24_get_current(msg, esc_telemetry_21_to_24->current);
mavlink_msg_esc_telemetry_21_to_24_get_totalcurrent(msg, esc_telemetry_21_to_24->totalcurrent);
mavlink_msg_esc_telemetry_21_to_24_get_rpm(msg, esc_telemetry_21_to_24->rpm);
mavlink_msg_esc_telemetry_21_to_24_get_count(msg, esc_telemetry_21_to_24->count);
mavlink_msg_esc_telemetry_21_to_24_get_temperature(msg, esc_telemetry_21_to_24->temperature);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN;
memset(esc_telemetry_21_to_24, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN);
memcpy(esc_telemetry_21_to_24, _MAV_PAYLOAD(msg), len);
#endif
}
@@ -0,0 +1,405 @@
#pragma once
// MESSAGE ESC_TELEMETRY_25_TO_28 PACKING
#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28 11043
typedef struct __mavlink_esc_telemetry_25_to_28_t {
uint16_t voltage[4]; /*< [cV] Voltage.*/
uint16_t current[4]; /*< [cA] Current.*/
uint16_t totalcurrent[4]; /*< [mAh] Total current.*/
uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/
uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/
uint8_t temperature[4]; /*< [degC] Temperature.*/
} mavlink_esc_telemetry_25_to_28_t;
#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN 44
#define MAVLINK_MSG_ID_11043_LEN 44
#define MAVLINK_MSG_ID_11043_MIN_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC 193
#define MAVLINK_MSG_ID_11043_CRC 193
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_VOLTAGE_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_CURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_TOTALCURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_RPM_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_COUNT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_TEMPERATURE_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28 { \
11043, \
"ESC_TELEMETRY_25_TO_28", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_25_to_28_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_25_to_28_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_25_to_28_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_25_to_28_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_25_to_28_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_25_to_28_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28 { \
"ESC_TELEMETRY_25_TO_28", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_25_to_28_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_25_to_28_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_25_to_28_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_25_to_28_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_25_to_28_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_25_to_28_t, count) }, \
} \
}
#endif
/**
* @brief Pack a esc_telemetry_25_to_28 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#else
mavlink_esc_telemetry_25_to_28_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
}
/**
* @brief Pack a esc_telemetry_25_to_28 message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#else
mavlink_esc_telemetry_25_to_28_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#endif
}
/**
* @brief Pack a esc_telemetry_25_to_28 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#else
mavlink_esc_telemetry_25_to_28_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
}
/**
* @brief Encode a esc_telemetry_25_to_28 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 esc_telemetry_25_to_28 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28)
{
return mavlink_msg_esc_telemetry_25_to_28_pack(system_id, component_id, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count);
}
/**
* @brief Encode a esc_telemetry_25_to_28 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 esc_telemetry_25_to_28 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28)
{
return mavlink_msg_esc_telemetry_25_to_28_pack_chan(system_id, component_id, chan, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count);
}
/**
* @brief Encode a esc_telemetry_25_to_28 struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param esc_telemetry_25_to_28 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28)
{
return mavlink_msg_esc_telemetry_25_to_28_pack_status(system_id, component_id, _status, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count);
}
/**
* @brief Send a esc_telemetry_25_to_28 message
* @param chan MAVLink channel to send the message
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_esc_telemetry_25_to_28_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#else
mavlink_esc_telemetry_25_to_28_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#endif
}
/**
* @brief Send a esc_telemetry_25_to_28 message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_esc_telemetry_25_to_28_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_25_to_28_send(chan, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)esc_telemetry_25_to_28, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#endif
}
#if MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_esc_telemetry_25_to_28_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#else
mavlink_esc_telemetry_25_to_28_t *packet = (mavlink_esc_telemetry_25_to_28_t *)msgbuf;
mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC);
#endif
}
#endif
#endif
// MESSAGE ESC_TELEMETRY_25_TO_28 UNPACKING
/**
* @brief Get field temperature from esc_telemetry_25_to_28 message
*
* @return [degC] Temperature.
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_temperature(const mavlink_message_t* msg, uint8_t *temperature)
{
return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40);
}
/**
* @brief Get field voltage from esc_telemetry_25_to_28 message
*
* @return [cV] Voltage.
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_voltage(const mavlink_message_t* msg, uint16_t *voltage)
{
return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0);
}
/**
* @brief Get field current from esc_telemetry_25_to_28 message
*
* @return [cA] Current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_current(const mavlink_message_t* msg, uint16_t *current)
{
return _MAV_RETURN_uint16_t_array(msg, current, 4, 8);
}
/**
* @brief Get field totalcurrent from esc_telemetry_25_to_28 message
*
* @return [mAh] Total current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent)
{
return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16);
}
/**
* @brief Get field rpm from esc_telemetry_25_to_28 message
*
* @return [rpm] RPM (eRPM).
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_rpm(const mavlink_message_t* msg, uint16_t *rpm)
{
return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24);
}
/**
* @brief Get field count from esc_telemetry_25_to_28 message
*
* @return count of telemetry packets received (wraps at 65535).
*/
static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_count(const mavlink_message_t* msg, uint16_t *count)
{
return _MAV_RETURN_uint16_t_array(msg, count, 4, 32);
}
/**
* @brief Decode a esc_telemetry_25_to_28 message into a struct
*
* @param msg The message to decode
* @param esc_telemetry_25_to_28 C-struct to decode the message contents into
*/
static inline void mavlink_msg_esc_telemetry_25_to_28_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_25_to_28_get_voltage(msg, esc_telemetry_25_to_28->voltage);
mavlink_msg_esc_telemetry_25_to_28_get_current(msg, esc_telemetry_25_to_28->current);
mavlink_msg_esc_telemetry_25_to_28_get_totalcurrent(msg, esc_telemetry_25_to_28->totalcurrent);
mavlink_msg_esc_telemetry_25_to_28_get_rpm(msg, esc_telemetry_25_to_28->rpm);
mavlink_msg_esc_telemetry_25_to_28_get_count(msg, esc_telemetry_25_to_28->count);
mavlink_msg_esc_telemetry_25_to_28_get_temperature(msg, esc_telemetry_25_to_28->temperature);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN;
memset(esc_telemetry_25_to_28, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN);
memcpy(esc_telemetry_25_to_28, _MAV_PAYLOAD(msg), len);
#endif
}
@@ -0,0 +1,405 @@
#pragma once
// MESSAGE ESC_TELEMETRY_29_TO_32 PACKING
#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32 11044
typedef struct __mavlink_esc_telemetry_29_to_32_t {
uint16_t voltage[4]; /*< [cV] Voltage.*/
uint16_t current[4]; /*< [cA] Current.*/
uint16_t totalcurrent[4]; /*< [mAh] Total current.*/
uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/
uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/
uint8_t temperature[4]; /*< [degC] Temperature.*/
} mavlink_esc_telemetry_29_to_32_t;
#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN 44
#define MAVLINK_MSG_ID_11044_LEN 44
#define MAVLINK_MSG_ID_11044_MIN_LEN 44
#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC 189
#define MAVLINK_MSG_ID_11044_CRC 189
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_VOLTAGE_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_CURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_TOTALCURRENT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_RPM_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_COUNT_LEN 4
#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_TEMPERATURE_LEN 4
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32 { \
11044, \
"ESC_TELEMETRY_29_TO_32", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_29_to_32_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_29_to_32_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_29_to_32_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_29_to_32_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_29_to_32_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_29_to_32_t, count) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32 { \
"ESC_TELEMETRY_29_TO_32", \
6, \
{ { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_29_to_32_t, temperature) }, \
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_29_to_32_t, voltage) }, \
{ "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_29_to_32_t, current) }, \
{ "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_29_to_32_t, totalcurrent) }, \
{ "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_29_to_32_t, rpm) }, \
{ "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_29_to_32_t, count) }, \
} \
}
#endif
/**
* @brief Pack a esc_telemetry_29_to_32 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#else
mavlink_esc_telemetry_29_to_32_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
}
/**
* @brief Pack a esc_telemetry_29_to_32 message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#else
mavlink_esc_telemetry_29_to_32_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#endif
}
/**
* @brief Pack a esc_telemetry_29_to_32 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 temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#else
mavlink_esc_telemetry_29_to_32_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
}
/**
* @brief Encode a esc_telemetry_29_to_32 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 esc_telemetry_29_to_32 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32)
{
return mavlink_msg_esc_telemetry_29_to_32_pack(system_id, component_id, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count);
}
/**
* @brief Encode a esc_telemetry_29_to_32 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 esc_telemetry_29_to_32 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32)
{
return mavlink_msg_esc_telemetry_29_to_32_pack_chan(system_id, component_id, chan, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count);
}
/**
* @brief Encode a esc_telemetry_29_to_32 struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param esc_telemetry_29_to_32 C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32)
{
return mavlink_msg_esc_telemetry_29_to_32_pack_status(system_id, component_id, _status, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count);
}
/**
* @brief Send a esc_telemetry_29_to_32 message
* @param chan MAVLink channel to send the message
*
* @param temperature [degC] Temperature.
* @param voltage [cV] Voltage.
* @param current [cA] Current.
* @param totalcurrent [mAh] Total current.
* @param rpm [rpm] RPM (eRPM).
* @param count count of telemetry packets received (wraps at 65535).
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_esc_telemetry_29_to_32_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN];
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#else
mavlink_esc_telemetry_29_to_32_t packet;
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#endif
}
/**
* @brief Send a esc_telemetry_29_to_32 message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_esc_telemetry_29_to_32_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_29_to_32_send(chan, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)esc_telemetry_29_to_32, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#endif
}
#if MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_esc_telemetry_29_to_32_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint16_t_array(buf, 0, voltage, 4);
_mav_put_uint16_t_array(buf, 8, current, 4);
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
_mav_put_uint16_t_array(buf, 24, rpm, 4);
_mav_put_uint16_t_array(buf, 32, count, 4);
_mav_put_uint8_t_array(buf, 40, temperature, 4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#else
mavlink_esc_telemetry_29_to_32_t *packet = (mavlink_esc_telemetry_29_to_32_t *)msgbuf;
mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4);
mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4);
mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC);
#endif
}
#endif
#endif
// MESSAGE ESC_TELEMETRY_29_TO_32 UNPACKING
/**
* @brief Get field temperature from esc_telemetry_29_to_32 message
*
* @return [degC] Temperature.
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_temperature(const mavlink_message_t* msg, uint8_t *temperature)
{
return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40);
}
/**
* @brief Get field voltage from esc_telemetry_29_to_32 message
*
* @return [cV] Voltage.
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_voltage(const mavlink_message_t* msg, uint16_t *voltage)
{
return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0);
}
/**
* @brief Get field current from esc_telemetry_29_to_32 message
*
* @return [cA] Current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_current(const mavlink_message_t* msg, uint16_t *current)
{
return _MAV_RETURN_uint16_t_array(msg, current, 4, 8);
}
/**
* @brief Get field totalcurrent from esc_telemetry_29_to_32 message
*
* @return [mAh] Total current.
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent)
{
return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16);
}
/**
* @brief Get field rpm from esc_telemetry_29_to_32 message
*
* @return [rpm] RPM (eRPM).
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_rpm(const mavlink_message_t* msg, uint16_t *rpm)
{
return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24);
}
/**
* @brief Get field count from esc_telemetry_29_to_32 message
*
* @return count of telemetry packets received (wraps at 65535).
*/
static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_count(const mavlink_message_t* msg, uint16_t *count)
{
return _MAV_RETURN_uint16_t_array(msg, count, 4, 32);
}
/**
* @brief Decode a esc_telemetry_29_to_32 message into a struct
*
* @param msg The message to decode
* @param esc_telemetry_29_to_32 C-struct to decode the message contents into
*/
static inline void mavlink_msg_esc_telemetry_29_to_32_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_esc_telemetry_29_to_32_get_voltage(msg, esc_telemetry_29_to_32->voltage);
mavlink_msg_esc_telemetry_29_to_32_get_current(msg, esc_telemetry_29_to_32->current);
mavlink_msg_esc_telemetry_29_to_32_get_totalcurrent(msg, esc_telemetry_29_to_32->totalcurrent);
mavlink_msg_esc_telemetry_29_to_32_get_rpm(msg, esc_telemetry_29_to_32->rpm);
mavlink_msg_esc_telemetry_29_to_32_get_count(msg, esc_telemetry_29_to_32->count);
mavlink_msg_esc_telemetry_29_to_32_get_temperature(msg, esc_telemetry_29_to_32->temperature);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN;
memset(esc_telemetry_29_to_32, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN);
memcpy(esc_telemetry_29_to_32, _MAV_PAYLOAD(msg), len);
#endif
}
+418
View File
@@ -0,0 +1,418 @@
#pragma once
// MESSAGE SECURE_COMMAND PACKING
#define MAVLINK_MSG_ID_SECURE_COMMAND 11004
typedef struct __mavlink_secure_command_t {
uint32_t sequence; /*< Sequence ID for tagging reply.*/
uint32_t operation; /*< Operation being requested.*/
uint8_t target_system; /*< System ID.*/
uint8_t target_component; /*< Component ID.*/
uint8_t data_length; /*< Data length.*/
uint8_t sig_length; /*< Signature length.*/
uint8_t data[220]; /*< Signed data.*/
} mavlink_secure_command_t;
#define MAVLINK_MSG_ID_SECURE_COMMAND_LEN 232
#define MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN 232
#define MAVLINK_MSG_ID_11004_LEN 232
#define MAVLINK_MSG_ID_11004_MIN_LEN 232
#define MAVLINK_MSG_ID_SECURE_COMMAND_CRC 11
#define MAVLINK_MSG_ID_11004_CRC 11
#define MAVLINK_MSG_SECURE_COMMAND_FIELD_DATA_LEN 220
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND { \
11004, \
"SECURE_COMMAND", \
7, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_t, target_component) }, \
{ "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_t, sequence) }, \
{ "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_t, operation) }, \
{ "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_secure_command_t, data_length) }, \
{ "sig_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_secure_command_t, sig_length) }, \
{ "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 12, offsetof(mavlink_secure_command_t, data) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND { \
"SECURE_COMMAND", \
7, \
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_t, target_system) }, \
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_t, target_component) }, \
{ "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_t, sequence) }, \
{ "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_t, operation) }, \
{ "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_secure_command_t, data_length) }, \
{ "sig_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_secure_command_t, sig_length) }, \
{ "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 12, offsetof(mavlink_secure_command_t, data) }, \
} \
}
#endif
/**
* @brief Pack a secure_command 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 target_system System ID.
* @param target_component Component ID.
* @param sequence Sequence ID for tagging reply.
* @param operation Operation being requested.
* @param data_length Data length.
* @param sig_length Signature length.
* @param data Signed data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, data_length);
_mav_put_uint8_t(buf, 11, sig_length);
_mav_put_uint8_t_array(buf, 12, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#else
mavlink_secure_command_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.target_system = target_system;
packet.target_component = target_component;
packet.data_length = data_length;
packet.sig_length = sig_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
}
/**
* @brief Pack a secure_command message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param target_system System ID.
* @param target_component Component ID.
* @param sequence Sequence ID for tagging reply.
* @param operation Operation being requested.
* @param data_length Data length.
* @param sig_length Signature length.
* @param data Signed data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, data_length);
_mav_put_uint8_t(buf, 11, sig_length);
_mav_put_uint8_t_array(buf, 12, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#else
mavlink_secure_command_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.target_system = target_system;
packet.target_component = target_component;
packet.data_length = data_length;
packet.sig_length = sig_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#endif
}
/**
* @brief Pack a secure_command 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 target_system System ID.
* @param target_component Component ID.
* @param sequence Sequence ID for tagging reply.
* @param operation Operation being requested.
* @param data_length Data length.
* @param sig_length Signature length.
* @param data Signed data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint8_t target_system,uint8_t target_component,uint32_t sequence,uint32_t operation,uint8_t data_length,uint8_t sig_length,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, data_length);
_mav_put_uint8_t(buf, 11, sig_length);
_mav_put_uint8_t_array(buf, 12, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#else
mavlink_secure_command_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.target_system = target_system;
packet.target_component = target_component;
packet.data_length = data_length;
packet.sig_length = sig_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
}
/**
* @brief Encode a secure_command 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 secure_command C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command)
{
return mavlink_msg_secure_command_pack(system_id, component_id, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data);
}
/**
* @brief Encode a secure_command 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 secure_command C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command)
{
return mavlink_msg_secure_command_pack_chan(system_id, component_id, chan, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data);
}
/**
* @brief Encode a secure_command struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param secure_command C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command)
{
return mavlink_msg_secure_command_pack_status(system_id, component_id, _status, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data);
}
/**
* @brief Send a secure_command message
* @param chan MAVLink channel to send the message
*
* @param target_system System ID.
* @param target_component Component ID.
* @param sequence Sequence ID for tagging reply.
* @param operation Operation being requested.
* @param data_length Data length.
* @param sig_length Signature length.
* @param data Signed data.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_secure_command_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, data_length);
_mav_put_uint8_t(buf, 11, sig_length);
_mav_put_uint8_t_array(buf, 12, data, 220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, buf, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#else
mavlink_secure_command_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.target_system = target_system;
packet.target_component = target_component;
packet.data_length = data_length;
packet.sig_length = sig_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)&packet, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#endif
}
/**
* @brief Send a secure_command message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_secure_command_send_struct(mavlink_channel_t chan, const mavlink_secure_command_t* secure_command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_secure_command_send(chan, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)secure_command, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#endif
}
#if MAVLINK_MSG_ID_SECURE_COMMAND_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_secure_command_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, target_system);
_mav_put_uint8_t(buf, 9, target_component);
_mav_put_uint8_t(buf, 10, data_length);
_mav_put_uint8_t(buf, 11, sig_length);
_mav_put_uint8_t_array(buf, 12, data, 220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, buf, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#else
mavlink_secure_command_t *packet = (mavlink_secure_command_t *)msgbuf;
packet->sequence = sequence;
packet->operation = operation;
packet->target_system = target_system;
packet->target_component = target_component;
packet->data_length = data_length;
packet->sig_length = sig_length;
mav_array_memcpy(packet->data, data, sizeof(uint8_t)*220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)packet, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC);
#endif
}
#endif
#endif
// MESSAGE SECURE_COMMAND UNPACKING
/**
* @brief Get field target_system from secure_command message
*
* @return System ID.
*/
static inline uint8_t mavlink_msg_secure_command_get_target_system(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field target_component from secure_command message
*
* @return Component ID.
*/
static inline uint8_t mavlink_msg_secure_command_get_target_component(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
* @brief Get field sequence from secure_command message
*
* @return Sequence ID for tagging reply.
*/
static inline uint32_t mavlink_msg_secure_command_get_sequence(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field operation from secure_command message
*
* @return Operation being requested.
*/
static inline uint32_t mavlink_msg_secure_command_get_operation(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field data_length from secure_command message
*
* @return Data length.
*/
static inline uint8_t mavlink_msg_secure_command_get_data_length(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 10);
}
/**
* @brief Get field sig_length from secure_command message
*
* @return Signature length.
*/
static inline uint8_t mavlink_msg_secure_command_get_sig_length(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 11);
}
/**
* @brief Get field data from secure_command message
*
* @return Signed data.
*/
static inline uint16_t mavlink_msg_secure_command_get_data(const mavlink_message_t* msg, uint8_t *data)
{
return _MAV_RETURN_uint8_t_array(msg, data, 220, 12);
}
/**
* @brief Decode a secure_command message into a struct
*
* @param msg The message to decode
* @param secure_command C-struct to decode the message contents into
*/
static inline void mavlink_msg_secure_command_decode(const mavlink_message_t* msg, mavlink_secure_command_t* secure_command)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
secure_command->sequence = mavlink_msg_secure_command_get_sequence(msg);
secure_command->operation = mavlink_msg_secure_command_get_operation(msg);
secure_command->target_system = mavlink_msg_secure_command_get_target_system(msg);
secure_command->target_component = mavlink_msg_secure_command_get_target_component(msg);
secure_command->data_length = mavlink_msg_secure_command_get_data_length(msg);
secure_command->sig_length = mavlink_msg_secure_command_get_sig_length(msg);
mavlink_msg_secure_command_get_data(msg, secure_command->data);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SECURE_COMMAND_LEN? msg->len : MAVLINK_MSG_ID_SECURE_COMMAND_LEN;
memset(secure_command, 0, MAVLINK_MSG_ID_SECURE_COMMAND_LEN);
memcpy(secure_command, _MAV_PAYLOAD(msg), len);
#endif
}
@@ -0,0 +1,362 @@
#pragma once
// MESSAGE SECURE_COMMAND_REPLY PACKING
#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY 11005
typedef struct __mavlink_secure_command_reply_t {
uint32_t sequence; /*< Sequence ID from request.*/
uint32_t operation; /*< Operation that was requested.*/
uint8_t result; /*< Result of command.*/
uint8_t data_length; /*< Data length.*/
uint8_t data[220]; /*< Reply data.*/
} mavlink_secure_command_reply_t;
#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN 230
#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN 230
#define MAVLINK_MSG_ID_11005_LEN 230
#define MAVLINK_MSG_ID_11005_MIN_LEN 230
#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC 93
#define MAVLINK_MSG_ID_11005_CRC 93
#define MAVLINK_MSG_SECURE_COMMAND_REPLY_FIELD_DATA_LEN 220
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY { \
11005, \
"SECURE_COMMAND_REPLY", \
5, \
{ { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_reply_t, sequence) }, \
{ "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_reply_t, operation) }, \
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_reply_t, result) }, \
{ "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_reply_t, data_length) }, \
{ "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 10, offsetof(mavlink_secure_command_reply_t, data) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY { \
"SECURE_COMMAND_REPLY", \
5, \
{ { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_reply_t, sequence) }, \
{ "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_reply_t, operation) }, \
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_reply_t, result) }, \
{ "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_reply_t, data_length) }, \
{ "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 10, offsetof(mavlink_secure_command_reply_t, data) }, \
} \
}
#endif
/**
* @brief Pack a secure_command_reply 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 sequence Sequence ID from request.
* @param operation Operation that was requested.
* @param result Result of command.
* @param data_length Data length.
* @param data Reply data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_reply_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, result);
_mav_put_uint8_t(buf, 9, data_length);
_mav_put_uint8_t_array(buf, 10, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#else
mavlink_secure_command_reply_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.result = result;
packet.data_length = data_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
}
/**
* @brief Pack a secure_command_reply message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param sequence Sequence ID from request.
* @param operation Operation that was requested.
* @param result Result of command.
* @param data_length Data length.
* @param data Reply data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, result);
_mav_put_uint8_t(buf, 9, data_length);
_mav_put_uint8_t_array(buf, 10, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#else
mavlink_secure_command_reply_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.result = result;
packet.data_length = data_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#endif
}
/**
* @brief Pack a secure_command_reply 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 sequence Sequence ID from request.
* @param operation Operation that was requested.
* @param result Result of command.
* @param data_length Data length.
* @param data Reply data.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_secure_command_reply_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t sequence,uint32_t operation,uint8_t result,uint8_t data_length,const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, result);
_mav_put_uint8_t(buf, 9, data_length);
_mav_put_uint8_t_array(buf, 10, data, 220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#else
mavlink_secure_command_reply_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.result = result;
packet.data_length = data_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
}
/**
* @brief Encode a secure_command_reply 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 secure_command_reply C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_reply_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply)
{
return mavlink_msg_secure_command_reply_pack(system_id, component_id, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data);
}
/**
* @brief Encode a secure_command_reply 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 secure_command_reply C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_reply_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply)
{
return mavlink_msg_secure_command_reply_pack_chan(system_id, component_id, chan, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data);
}
/**
* @brief Encode a secure_command_reply struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param secure_command_reply C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_secure_command_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply)
{
return mavlink_msg_secure_command_reply_pack_status(system_id, component_id, _status, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data);
}
/**
* @brief Send a secure_command_reply message
* @param chan MAVLink channel to send the message
*
* @param sequence Sequence ID from request.
* @param operation Operation that was requested.
* @param result Result of command.
* @param data_length Data length.
* @param data Reply data.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_secure_command_reply_send(mavlink_channel_t chan, uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN];
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, result);
_mav_put_uint8_t(buf, 9, data_length);
_mav_put_uint8_t_array(buf, 10, data, 220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#else
mavlink_secure_command_reply_t packet;
packet.sequence = sequence;
packet.operation = operation;
packet.result = result;
packet.data_length = data_length;
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)&packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#endif
}
/**
* @brief Send a secure_command_reply message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_secure_command_reply_send_struct(mavlink_channel_t chan, const mavlink_secure_command_reply_t* secure_command_reply)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_secure_command_reply_send(chan, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)secure_command_reply, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#endif
}
#if MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_secure_command_reply_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_uint32_t(buf, 0, sequence);
_mav_put_uint32_t(buf, 4, operation);
_mav_put_uint8_t(buf, 8, result);
_mav_put_uint8_t(buf, 9, data_length);
_mav_put_uint8_t_array(buf, 10, data, 220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#else
mavlink_secure_command_reply_t *packet = (mavlink_secure_command_reply_t *)msgbuf;
packet->sequence = sequence;
packet->operation = operation;
packet->result = result;
packet->data_length = data_length;
mav_array_memcpy(packet->data, data, sizeof(uint8_t)*220);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC);
#endif
}
#endif
#endif
// MESSAGE SECURE_COMMAND_REPLY UNPACKING
/**
* @brief Get field sequence from secure_command_reply message
*
* @return Sequence ID from request.
*/
static inline uint32_t mavlink_msg_secure_command_reply_get_sequence(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
}
/**
* @brief Get field operation from secure_command_reply message
*
* @return Operation that was requested.
*/
static inline uint32_t mavlink_msg_secure_command_reply_get_operation(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 4);
}
/**
* @brief Get field result from secure_command_reply message
*
* @return Result of command.
*/
static inline uint8_t mavlink_msg_secure_command_reply_get_result(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 8);
}
/**
* @brief Get field data_length from secure_command_reply message
*
* @return Data length.
*/
static inline uint8_t mavlink_msg_secure_command_reply_get_data_length(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 9);
}
/**
* @brief Get field data from secure_command_reply message
*
* @return Reply data.
*/
static inline uint16_t mavlink_msg_secure_command_reply_get_data(const mavlink_message_t* msg, uint8_t *data)
{
return _MAV_RETURN_uint8_t_array(msg, data, 220, 10);
}
/**
* @brief Decode a secure_command_reply message into a struct
*
* @param msg The message to decode
* @param secure_command_reply C-struct to decode the message contents into
*/
static inline void mavlink_msg_secure_command_reply_decode(const mavlink_message_t* msg, mavlink_secure_command_reply_t* secure_command_reply)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
secure_command_reply->sequence = mavlink_msg_secure_command_reply_get_sequence(msg);
secure_command_reply->operation = mavlink_msg_secure_command_reply_get_operation(msg);
secure_command_reply->result = mavlink_msg_secure_command_reply_get_result(msg);
secure_command_reply->data_length = mavlink_msg_secure_command_reply_get_data_length(msg);
mavlink_msg_secure_command_reply_get_data(msg, secure_command_reply->data);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN? msg->len : MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN;
memset(secure_command_reply, 0, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN);
memcpy(secure_command_reply, _MAV_PAYLOAD(msg), len);
#endif
}
+458
View File
@@ -15,6 +15,7 @@ extern "C" {
static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_uAvionix(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_icarous(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_loweheiser(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_cubepilot(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_csAirLink(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_ardupilotmega(uint8_t, uint8_t, mavlink_message_t *last_msg);
@@ -24,6 +25,7 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me
mavlink_test_common(system_id, component_id, last_msg);
mavlink_test_uAvionix(system_id, component_id, last_msg);
mavlink_test_icarous(system_id, component_id, last_msg);
mavlink_test_loweheiser(system_id, component_id, last_msg);
mavlink_test_cubepilot(system_id, component_id, last_msg);
mavlink_test_csAirLink(system_id, component_id, last_msg);
mavlink_test_ardupilotmega(system_id, component_id, last_msg);
@@ -33,6 +35,7 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me
#include "../common/testsuite.h"
#include "../uAvionix/testsuite.h"
#include "../icarous/testsuite.h"
#include "../loweheiser/testsuite.h"
#include "../cubepilot/testsuite.h"
#include "../csAirLink/testsuite.h"
@@ -3371,6 +3374,134 @@ static void mavlink_test_device_op_write_reply(uint8_t system_id, uint8_t compon
#endif
}
static void mavlink_test_secure_command(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_SECURE_COMMAND >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_secure_command_t packet_in = {
963497464,963497672,29,96,163,230,{ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4 }
};
mavlink_secure_command_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.sequence = packet_in.sequence;
packet1.operation = packet_in.operation;
packet1.target_system = packet_in.target_system;
packet1.target_component = packet_in.target_component;
packet1.data_length = packet_in.data_length;
packet1.sig_length = packet_in.sig_length;
mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*220);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_secure_command_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.operation , packet1.data_length , packet1.sig_length , packet1.data );
mavlink_msg_secure_command_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.operation , packet1.data_length , packet1.sig_length , packet1.data );
mavlink_msg_secure_command_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_secure_command_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.sequence , packet1.operation , packet1.data_length , packet1.sig_length , packet1.data );
mavlink_msg_secure_command_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("SECURE_COMMAND") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_SECURE_COMMAND) != NULL);
#endif
}
static void mavlink_test_secure_command_reply(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_SECURE_COMMAND_REPLY >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_secure_command_reply_t packet_in = {
963497464,963497672,29,96,{ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126 }
};
mavlink_secure_command_reply_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.sequence = packet_in.sequence;
packet1.operation = packet_in.operation;
packet1.result = packet_in.result;
packet1.data_length = packet_in.data_length;
mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*220);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_reply_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_secure_command_reply_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_reply_pack(system_id, component_id, &msg , packet1.sequence , packet1.operation , packet1.result , packet1.data_length , packet1.data );
mavlink_msg_secure_command_reply_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_reply_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sequence , packet1.operation , packet1.result , packet1.data_length , packet1.data );
mavlink_msg_secure_command_reply_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_secure_command_reply_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_secure_command_reply_send(MAVLINK_COMM_1 , packet1.sequence , packet1.operation , packet1.result , packet1.data_length , packet1.data );
mavlink_msg_secure_command_reply_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("SECURE_COMMAND_REPLY") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_SECURE_COMMAND_REPLY) != NULL);
#endif
}
static void mavlink_test_adap_tuning(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
@@ -4213,6 +4344,326 @@ static void mavlink_test_mcu_status(uint8_t system_id, uint8_t component_id, mav
#endif
}
static void mavlink_test_esc_telemetry_13_to_16(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_ESC_TELEMETRY_13_TO_16 >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_esc_telemetry_13_to_16_t packet_in = {
{ 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 }
};
mavlink_esc_telemetry_13_to_16_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_13_to_16_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_esc_telemetry_13_to_16_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_13_to_16_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_13_to_16_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_13_to_16_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_13_to_16_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_esc_telemetry_13_to_16_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_13_to_16_send(MAVLINK_COMM_1 , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_13_to_16_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("ESC_TELEMETRY_13_TO_16") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16) != NULL);
#endif
}
static void mavlink_test_esc_telemetry_17_to_20(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_ESC_TELEMETRY_17_TO_20 >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_esc_telemetry_17_to_20_t packet_in = {
{ 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 }
};
mavlink_esc_telemetry_17_to_20_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_17_to_20_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_esc_telemetry_17_to_20_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_17_to_20_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_17_to_20_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_17_to_20_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_17_to_20_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_esc_telemetry_17_to_20_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_17_to_20_send(MAVLINK_COMM_1 , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_17_to_20_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("ESC_TELEMETRY_17_TO_20") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20) != NULL);
#endif
}
static void mavlink_test_esc_telemetry_21_to_24(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_ESC_TELEMETRY_21_TO_24 >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_esc_telemetry_21_to_24_t packet_in = {
{ 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 }
};
mavlink_esc_telemetry_21_to_24_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_21_to_24_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_esc_telemetry_21_to_24_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_21_to_24_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_21_to_24_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_21_to_24_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_21_to_24_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_esc_telemetry_21_to_24_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_21_to_24_send(MAVLINK_COMM_1 , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_21_to_24_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("ESC_TELEMETRY_21_TO_24") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24) != NULL);
#endif
}
static void mavlink_test_esc_telemetry_25_to_28(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_ESC_TELEMETRY_25_TO_28 >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_esc_telemetry_25_to_28_t packet_in = {
{ 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 }
};
mavlink_esc_telemetry_25_to_28_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_25_to_28_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_esc_telemetry_25_to_28_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_25_to_28_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_25_to_28_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_25_to_28_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_25_to_28_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_esc_telemetry_25_to_28_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_25_to_28_send(MAVLINK_COMM_1 , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_25_to_28_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("ESC_TELEMETRY_25_TO_28") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28) != NULL);
#endif
}
static void mavlink_test_esc_telemetry_29_to_32(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_ESC_TELEMETRY_29_TO_32 >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_esc_telemetry_29_to_32_t packet_in = {
{ 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 }
};
mavlink_esc_telemetry_29_to_32_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4);
mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_29_to_32_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_esc_telemetry_29_to_32_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_29_to_32_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_29_to_32_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_29_to_32_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_29_to_32_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_esc_telemetry_29_to_32_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_esc_telemetry_29_to_32_send(MAVLINK_COMM_1 , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count );
mavlink_msg_esc_telemetry_29_to_32_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("ESC_TELEMETRY_29_TO_32") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32) != NULL);
#endif
}
static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_sensor_offsets(system_id, component_id, last_msg);
@@ -4267,6 +4718,8 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
mavlink_test_device_op_read_reply(system_id, component_id, last_msg);
mavlink_test_device_op_write(system_id, component_id, last_msg);
mavlink_test_device_op_write_reply(system_id, component_id, last_msg);
mavlink_test_secure_command(system_id, component_id, last_msg);
mavlink_test_secure_command_reply(system_id, component_id, last_msg);
mavlink_test_adap_tuning(system_id, component_id, last_msg);
mavlink_test_vision_position_delta(system_id, component_id, last_msg);
mavlink_test_aoa_ssa(system_id, component_id, last_msg);
@@ -4280,6 +4733,11 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
mavlink_test_obstacle_distance_3d(system_id, component_id, last_msg);
mavlink_test_water_depth(system_id, component_id, last_msg);
mavlink_test_mcu_status(system_id, component_id, last_msg);
mavlink_test_esc_telemetry_13_to_16(system_id, component_id, last_msg);
mavlink_test_esc_telemetry_17_to_20(system_id, component_id, last_msg);
mavlink_test_esc_telemetry_21_to_24(system_id, component_id, last_msg);
mavlink_test_esc_telemetry_25_to_28(system_id, component_id, last_msg);
mavlink_test_esc_telemetry_29_to_32(system_id, component_id, last_msg);
}
#ifdef __cplusplus
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_COMMON.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_COMMON_XML_HASH 5443744658089064833
#define MAVLINK_COMMON_XML_HASH -295229644044947738
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 5443744658089064833
#define MAVLINK_PRIMARY_XML_HASH -295229644044947738
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_CSAIRLINK.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_CSAIRLINK_XML_HASH 7123670349247683883
#define MAVLINK_CSAIRLINK_XML_HASH 614659619501012681
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 7123670349247683883
#define MAVLINK_PRIMARY_XML_HASH 614659619501012681
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 100
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_CUBEPILOT.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_CUBEPILOT_XML_HASH 8092915854610118312
#define MAVLINK_CUBEPILOT_XML_HASH -6790428705955743070
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 8092915854610118312
#define MAVLINK_PRIMARY_XML_HASH -6790428705955743070
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_DEVELOPMENT.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_DEVELOPMENT_XML_HASH -5444534755342294963
#define MAVLINK_DEVELOPMENT_XML_HASH 7723984798995158132
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -5444534755342294963
#define MAVLINK_PRIMARY_XML_HASH 7723984798995158132
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_ICAROUS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_ICAROUS_XML_HASH -9215396470671321894
#define MAVLINK_ICAROUS_XML_HASH 5784479449490863017
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -9215396470671321894
#define MAVLINK_PRIMARY_XML_HASH 5784479449490863017
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 46
+66
View File
@@ -0,0 +1,66 @@
/** @file
* @brief MAVLink comm protocol generated from loweheiser.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_LOWEHEISER_H
#define MAVLINK_LOWEHEISER_H
#ifndef MAVLINK_H
#error Wrong include order: MAVLINK_LOWEHEISER.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_LOWEHEISER_XML_HASH 7942851631530844266
#ifdef __cplusplus
extern "C" {
#endif
// MESSAGE LENGTHS AND CRCS
#ifndef MAVLINK_MESSAGE_LENGTHS
#define MAVLINK_MESSAGE_LENGTHS {}
#endif
#ifndef MAVLINK_MESSAGE_CRCS
#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {10151, 195, 85, 85, 0, 0, 0}}
#endif
#include "../protocol.h"
#define MAVLINK_ENABLED_LOWEHEISER
// ENUM DEFINITIONS
// MAVLINK VERSION
#ifndef MAVLINK_VERSION
#define MAVLINK_VERSION 2
#endif
#if (MAVLINK_VERSION == 0)
#undef MAVLINK_VERSION
#define MAVLINK_VERSION 2
#endif
// MESSAGE DEFINITIONS
#include "./mavlink_msg_loweheiser_gov_efi.h"
// base include
#include "../minimal/minimal.h"
#if MAVLINK_LOWEHEISER_XML_HASH == MAVLINK_PRIMARY_XML_HASH
# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI}
# define MAVLINK_MESSAGE_NAMES {{ "HEARTBEAT", 0 }, { "LOWEHEISER_GOV_EFI", 10151 }, { "PROTOCOL_VERSION", 300 }}
# if MAVLINK_COMMAND_24BIT
# include "../mavlink_get_info.h"
# endif
#endif
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // MAVLINK_LOWEHEISER_H
+34
View File
@@ -0,0 +1,34 @@
/** @file
* @brief MAVLink comm protocol built from loweheiser.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 7942851631530844266
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
#endif
#ifndef MAVLINK_ENDIAN
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
#endif
#ifndef MAVLINK_ALIGNED_FIELDS
#define MAVLINK_ALIGNED_FIELDS 1
#endif
#ifndef MAVLINK_CRC_EXTRA
#define MAVLINK_CRC_EXTRA 1
#endif
#ifndef MAVLINK_COMMAND_24BIT
#define MAVLINK_COMMAND_24BIT 1
#endif
#include "version.h"
#include "loweheiser.h"
#endif // MAVLINK_H
+876
View File
@@ -0,0 +1,876 @@
#pragma once
// MESSAGE LOWEHEISER_GOV_EFI PACKING
#define MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI 10151
typedef struct __mavlink_loweheiser_gov_efi_t {
float volt_batt; /*< [V] Generator Battery voltage.*/
float curr_batt; /*< [A] Generator Battery current.*/
float curr_gen; /*< [A] Current being produced by generator.*/
float curr_rot; /*< [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)*/
float fuel_level; /*< [l] Generator fuel remaining in litres.*/
float throttle; /*< [%] Throttle Output.*/
uint32_t runtime; /*< [s] Seconds this generator has run since it was rebooted.*/
int32_t until_maintenance; /*< [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.*/
float rectifier_temp; /*< [degC] The Temperature of the rectifier.*/
float generator_temp; /*< [degC] The temperature of the mechanical motor, fuel cell core or generator.*/
float efi_batt; /*< [V] EFI Supply Voltage.*/
float efi_rpm; /*< [rpm] Motor RPM.*/
float efi_pw; /*< [ms] Injector pulse-width in miliseconds.*/
float efi_fuel_flow; /*< Fuel flow rate in litres/hour.*/
float efi_fuel_consumed; /*< [l] Fuel consumed.*/
float efi_baro; /*< [kPa] Atmospheric pressure.*/
float efi_mat; /*< [degC] Manifold Air Temperature.*/
float efi_clt; /*< [degC] Cylinder Head Temperature.*/
float efi_tps; /*< [%] Throttle Position.*/
float efi_exhaust_gas_temperature; /*< [degC] Exhaust gas temperature.*/
uint16_t generator_status; /*< Generator status.*/
uint16_t efi_status; /*< EFI status.*/
uint8_t efi_index; /*< EFI index.*/
} mavlink_loweheiser_gov_efi_t;
#define MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN 85
#define MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN 85
#define MAVLINK_MSG_ID_10151_LEN 85
#define MAVLINK_MSG_ID_10151_MIN_LEN 85
#define MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC 195
#define MAVLINK_MSG_ID_10151_CRC 195
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI { \
10151, \
"LOWEHEISER_GOV_EFI", \
23, \
{ { "volt_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_loweheiser_gov_efi_t, volt_batt) }, \
{ "curr_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_loweheiser_gov_efi_t, curr_batt) }, \
{ "curr_gen", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_loweheiser_gov_efi_t, curr_gen) }, \
{ "curr_rot", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_loweheiser_gov_efi_t, curr_rot) }, \
{ "fuel_level", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_loweheiser_gov_efi_t, fuel_level) }, \
{ "throttle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_loweheiser_gov_efi_t, throttle) }, \
{ "runtime", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_loweheiser_gov_efi_t, runtime) }, \
{ "until_maintenance", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_loweheiser_gov_efi_t, until_maintenance) }, \
{ "rectifier_temp", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_loweheiser_gov_efi_t, rectifier_temp) }, \
{ "generator_temp", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_loweheiser_gov_efi_t, generator_temp) }, \
{ "efi_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_loweheiser_gov_efi_t, efi_batt) }, \
{ "efi_rpm", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_loweheiser_gov_efi_t, efi_rpm) }, \
{ "efi_pw", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_loweheiser_gov_efi_t, efi_pw) }, \
{ "efi_fuel_flow", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_loweheiser_gov_efi_t, efi_fuel_flow) }, \
{ "efi_fuel_consumed", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_loweheiser_gov_efi_t, efi_fuel_consumed) }, \
{ "efi_baro", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_loweheiser_gov_efi_t, efi_baro) }, \
{ "efi_mat", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_loweheiser_gov_efi_t, efi_mat) }, \
{ "efi_clt", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_loweheiser_gov_efi_t, efi_clt) }, \
{ "efi_tps", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_loweheiser_gov_efi_t, efi_tps) }, \
{ "efi_exhaust_gas_temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_loweheiser_gov_efi_t, efi_exhaust_gas_temperature) }, \
{ "efi_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_loweheiser_gov_efi_t, efi_index) }, \
{ "generator_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_loweheiser_gov_efi_t, generator_status) }, \
{ "efi_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 82, offsetof(mavlink_loweheiser_gov_efi_t, efi_status) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI { \
"LOWEHEISER_GOV_EFI", \
23, \
{ { "volt_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_loweheiser_gov_efi_t, volt_batt) }, \
{ "curr_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_loweheiser_gov_efi_t, curr_batt) }, \
{ "curr_gen", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_loweheiser_gov_efi_t, curr_gen) }, \
{ "curr_rot", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_loweheiser_gov_efi_t, curr_rot) }, \
{ "fuel_level", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_loweheiser_gov_efi_t, fuel_level) }, \
{ "throttle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_loweheiser_gov_efi_t, throttle) }, \
{ "runtime", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_loweheiser_gov_efi_t, runtime) }, \
{ "until_maintenance", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_loweheiser_gov_efi_t, until_maintenance) }, \
{ "rectifier_temp", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_loweheiser_gov_efi_t, rectifier_temp) }, \
{ "generator_temp", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_loweheiser_gov_efi_t, generator_temp) }, \
{ "efi_batt", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_loweheiser_gov_efi_t, efi_batt) }, \
{ "efi_rpm", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_loweheiser_gov_efi_t, efi_rpm) }, \
{ "efi_pw", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_loweheiser_gov_efi_t, efi_pw) }, \
{ "efi_fuel_flow", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_loweheiser_gov_efi_t, efi_fuel_flow) }, \
{ "efi_fuel_consumed", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_loweheiser_gov_efi_t, efi_fuel_consumed) }, \
{ "efi_baro", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_loweheiser_gov_efi_t, efi_baro) }, \
{ "efi_mat", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_loweheiser_gov_efi_t, efi_mat) }, \
{ "efi_clt", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_loweheiser_gov_efi_t, efi_clt) }, \
{ "efi_tps", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_loweheiser_gov_efi_t, efi_tps) }, \
{ "efi_exhaust_gas_temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_loweheiser_gov_efi_t, efi_exhaust_gas_temperature) }, \
{ "efi_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_loweheiser_gov_efi_t, efi_index) }, \
{ "generator_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_loweheiser_gov_efi_t, generator_status) }, \
{ "efi_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 82, offsetof(mavlink_loweheiser_gov_efi_t, efi_status) }, \
} \
}
#endif
/**
* @brief Pack a loweheiser_gov_efi 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 volt_batt [V] Generator Battery voltage.
* @param curr_batt [A] Generator Battery current.
* @param curr_gen [A] Current being produced by generator.
* @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)
* @param fuel_level [l] Generator fuel remaining in litres.
* @param throttle [%] Throttle Output.
* @param runtime [s] Seconds this generator has run since it was rebooted.
* @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.
* @param rectifier_temp [degC] The Temperature of the rectifier.
* @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator.
* @param efi_batt [V] EFI Supply Voltage.
* @param efi_rpm [rpm] Motor RPM.
* @param efi_pw [ms] Injector pulse-width in miliseconds.
* @param efi_fuel_flow Fuel flow rate in litres/hour.
* @param efi_fuel_consumed [l] Fuel consumed.
* @param efi_baro [kPa] Atmospheric pressure.
* @param efi_mat [degC] Manifold Air Temperature.
* @param efi_clt [degC] Cylinder Head Temperature.
* @param efi_tps [%] Throttle Position.
* @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature.
* @param efi_index EFI index.
* @param generator_status Generator status.
* @param efi_status EFI status.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN];
_mav_put_float(buf, 0, volt_batt);
_mav_put_float(buf, 4, curr_batt);
_mav_put_float(buf, 8, curr_gen);
_mav_put_float(buf, 12, curr_rot);
_mav_put_float(buf, 16, fuel_level);
_mav_put_float(buf, 20, throttle);
_mav_put_uint32_t(buf, 24, runtime);
_mav_put_int32_t(buf, 28, until_maintenance);
_mav_put_float(buf, 32, rectifier_temp);
_mav_put_float(buf, 36, generator_temp);
_mav_put_float(buf, 40, efi_batt);
_mav_put_float(buf, 44, efi_rpm);
_mav_put_float(buf, 48, efi_pw);
_mav_put_float(buf, 52, efi_fuel_flow);
_mav_put_float(buf, 56, efi_fuel_consumed);
_mav_put_float(buf, 60, efi_baro);
_mav_put_float(buf, 64, efi_mat);
_mav_put_float(buf, 68, efi_clt);
_mav_put_float(buf, 72, efi_tps);
_mav_put_float(buf, 76, efi_exhaust_gas_temperature);
_mav_put_uint16_t(buf, 80, generator_status);
_mav_put_uint16_t(buf, 82, efi_status);
_mav_put_uint8_t(buf, 84, efi_index);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#else
mavlink_loweheiser_gov_efi_t packet;
packet.volt_batt = volt_batt;
packet.curr_batt = curr_batt;
packet.curr_gen = curr_gen;
packet.curr_rot = curr_rot;
packet.fuel_level = fuel_level;
packet.throttle = throttle;
packet.runtime = runtime;
packet.until_maintenance = until_maintenance;
packet.rectifier_temp = rectifier_temp;
packet.generator_temp = generator_temp;
packet.efi_batt = efi_batt;
packet.efi_rpm = efi_rpm;
packet.efi_pw = efi_pw;
packet.efi_fuel_flow = efi_fuel_flow;
packet.efi_fuel_consumed = efi_fuel_consumed;
packet.efi_baro = efi_baro;
packet.efi_mat = efi_mat;
packet.efi_clt = efi_clt;
packet.efi_tps = efi_tps;
packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature;
packet.generator_status = generator_status;
packet.efi_status = efi_status;
packet.efi_index = efi_index;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI;
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
}
/**
* @brief Pack a loweheiser_gov_efi message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
*
* @param volt_batt [V] Generator Battery voltage.
* @param curr_batt [A] Generator Battery current.
* @param curr_gen [A] Current being produced by generator.
* @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)
* @param fuel_level [l] Generator fuel remaining in litres.
* @param throttle [%] Throttle Output.
* @param runtime [s] Seconds this generator has run since it was rebooted.
* @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.
* @param rectifier_temp [degC] The Temperature of the rectifier.
* @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator.
* @param efi_batt [V] EFI Supply Voltage.
* @param efi_rpm [rpm] Motor RPM.
* @param efi_pw [ms] Injector pulse-width in miliseconds.
* @param efi_fuel_flow Fuel flow rate in litres/hour.
* @param efi_fuel_consumed [l] Fuel consumed.
* @param efi_baro [kPa] Atmospheric pressure.
* @param efi_mat [degC] Manifold Air Temperature.
* @param efi_clt [degC] Cylinder Head Temperature.
* @param efi_tps [%] Throttle Position.
* @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature.
* @param efi_index EFI index.
* @param generator_status Generator status.
* @param efi_status EFI status.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN];
_mav_put_float(buf, 0, volt_batt);
_mav_put_float(buf, 4, curr_batt);
_mav_put_float(buf, 8, curr_gen);
_mav_put_float(buf, 12, curr_rot);
_mav_put_float(buf, 16, fuel_level);
_mav_put_float(buf, 20, throttle);
_mav_put_uint32_t(buf, 24, runtime);
_mav_put_int32_t(buf, 28, until_maintenance);
_mav_put_float(buf, 32, rectifier_temp);
_mav_put_float(buf, 36, generator_temp);
_mav_put_float(buf, 40, efi_batt);
_mav_put_float(buf, 44, efi_rpm);
_mav_put_float(buf, 48, efi_pw);
_mav_put_float(buf, 52, efi_fuel_flow);
_mav_put_float(buf, 56, efi_fuel_consumed);
_mav_put_float(buf, 60, efi_baro);
_mav_put_float(buf, 64, efi_mat);
_mav_put_float(buf, 68, efi_clt);
_mav_put_float(buf, 72, efi_tps);
_mav_put_float(buf, 76, efi_exhaust_gas_temperature);
_mav_put_uint16_t(buf, 80, generator_status);
_mav_put_uint16_t(buf, 82, efi_status);
_mav_put_uint8_t(buf, 84, efi_index);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#else
mavlink_loweheiser_gov_efi_t packet;
packet.volt_batt = volt_batt;
packet.curr_batt = curr_batt;
packet.curr_gen = curr_gen;
packet.curr_rot = curr_rot;
packet.fuel_level = fuel_level;
packet.throttle = throttle;
packet.runtime = runtime;
packet.until_maintenance = until_maintenance;
packet.rectifier_temp = rectifier_temp;
packet.generator_temp = generator_temp;
packet.efi_batt = efi_batt;
packet.efi_rpm = efi_rpm;
packet.efi_pw = efi_pw;
packet.efi_fuel_flow = efi_fuel_flow;
packet.efi_fuel_consumed = efi_fuel_consumed;
packet.efi_baro = efi_baro;
packet.efi_mat = efi_mat;
packet.efi_clt = efi_clt;
packet.efi_tps = efi_tps;
packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature;
packet.generator_status = generator_status;
packet.efi_status = efi_status;
packet.efi_index = efi_index;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI;
#if MAVLINK_CRC_EXTRA
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#else
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#endif
}
/**
* @brief Pack a loweheiser_gov_efi 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 volt_batt [V] Generator Battery voltage.
* @param curr_batt [A] Generator Battery current.
* @param curr_gen [A] Current being produced by generator.
* @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)
* @param fuel_level [l] Generator fuel remaining in litres.
* @param throttle [%] Throttle Output.
* @param runtime [s] Seconds this generator has run since it was rebooted.
* @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.
* @param rectifier_temp [degC] The Temperature of the rectifier.
* @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator.
* @param efi_batt [V] EFI Supply Voltage.
* @param efi_rpm [rpm] Motor RPM.
* @param efi_pw [ms] Injector pulse-width in miliseconds.
* @param efi_fuel_flow Fuel flow rate in litres/hour.
* @param efi_fuel_consumed [l] Fuel consumed.
* @param efi_baro [kPa] Atmospheric pressure.
* @param efi_mat [degC] Manifold Air Temperature.
* @param efi_clt [degC] Cylinder Head Temperature.
* @param efi_tps [%] Throttle Position.
* @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature.
* @param efi_index EFI index.
* @param generator_status Generator status.
* @param efi_status EFI status.
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
float volt_batt,float curr_batt,float curr_gen,float curr_rot,float fuel_level,float throttle,uint32_t runtime,int32_t until_maintenance,float rectifier_temp,float generator_temp,float efi_batt,float efi_rpm,float efi_pw,float efi_fuel_flow,float efi_fuel_consumed,float efi_baro,float efi_mat,float efi_clt,float efi_tps,float efi_exhaust_gas_temperature,uint8_t efi_index,uint16_t generator_status,uint16_t efi_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN];
_mav_put_float(buf, 0, volt_batt);
_mav_put_float(buf, 4, curr_batt);
_mav_put_float(buf, 8, curr_gen);
_mav_put_float(buf, 12, curr_rot);
_mav_put_float(buf, 16, fuel_level);
_mav_put_float(buf, 20, throttle);
_mav_put_uint32_t(buf, 24, runtime);
_mav_put_int32_t(buf, 28, until_maintenance);
_mav_put_float(buf, 32, rectifier_temp);
_mav_put_float(buf, 36, generator_temp);
_mav_put_float(buf, 40, efi_batt);
_mav_put_float(buf, 44, efi_rpm);
_mav_put_float(buf, 48, efi_pw);
_mav_put_float(buf, 52, efi_fuel_flow);
_mav_put_float(buf, 56, efi_fuel_consumed);
_mav_put_float(buf, 60, efi_baro);
_mav_put_float(buf, 64, efi_mat);
_mav_put_float(buf, 68, efi_clt);
_mav_put_float(buf, 72, efi_tps);
_mav_put_float(buf, 76, efi_exhaust_gas_temperature);
_mav_put_uint16_t(buf, 80, generator_status);
_mav_put_uint16_t(buf, 82, efi_status);
_mav_put_uint8_t(buf, 84, efi_index);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#else
mavlink_loweheiser_gov_efi_t packet;
packet.volt_batt = volt_batt;
packet.curr_batt = curr_batt;
packet.curr_gen = curr_gen;
packet.curr_rot = curr_rot;
packet.fuel_level = fuel_level;
packet.throttle = throttle;
packet.runtime = runtime;
packet.until_maintenance = until_maintenance;
packet.rectifier_temp = rectifier_temp;
packet.generator_temp = generator_temp;
packet.efi_batt = efi_batt;
packet.efi_rpm = efi_rpm;
packet.efi_pw = efi_pw;
packet.efi_fuel_flow = efi_fuel_flow;
packet.efi_fuel_consumed = efi_fuel_consumed;
packet.efi_baro = efi_baro;
packet.efi_mat = efi_mat;
packet.efi_clt = efi_clt;
packet.efi_tps = efi_tps;
packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature;
packet.generator_status = generator_status;
packet.efi_status = efi_status;
packet.efi_index = efi_index;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
#endif
msg->msgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI;
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
}
/**
* @brief Encode a loweheiser_gov_efi 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 loweheiser_gov_efi C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi)
{
return mavlink_msg_loweheiser_gov_efi_pack(system_id, component_id, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status);
}
/**
* @brief Encode a loweheiser_gov_efi 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 loweheiser_gov_efi C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi)
{
return mavlink_msg_loweheiser_gov_efi_pack_chan(system_id, component_id, chan, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status);
}
/**
* @brief Encode a loweheiser_gov_efi struct with provided status structure
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param status MAVLink status structure
* @param msg The MAVLink message to compress the data into
* @param loweheiser_gov_efi C-struct to read the message contents from
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi)
{
return mavlink_msg_loweheiser_gov_efi_pack_status(system_id, component_id, _status, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status);
}
/**
* @brief Send a loweheiser_gov_efi message
* @param chan MAVLink channel to send the message
*
* @param volt_batt [V] Generator Battery voltage.
* @param curr_batt [A] Generator Battery current.
* @param curr_gen [A] Current being produced by generator.
* @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)
* @param fuel_level [l] Generator fuel remaining in litres.
* @param throttle [%] Throttle Output.
* @param runtime [s] Seconds this generator has run since it was rebooted.
* @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.
* @param rectifier_temp [degC] The Temperature of the rectifier.
* @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator.
* @param efi_batt [V] EFI Supply Voltage.
* @param efi_rpm [rpm] Motor RPM.
* @param efi_pw [ms] Injector pulse-width in miliseconds.
* @param efi_fuel_flow Fuel flow rate in litres/hour.
* @param efi_fuel_consumed [l] Fuel consumed.
* @param efi_baro [kPa] Atmospheric pressure.
* @param efi_mat [degC] Manifold Air Temperature.
* @param efi_clt [degC] Cylinder Head Temperature.
* @param efi_tps [%] Throttle Position.
* @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature.
* @param efi_index EFI index.
* @param generator_status Generator status.
* @param efi_status EFI status.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_loweheiser_gov_efi_send(mavlink_channel_t chan, float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN];
_mav_put_float(buf, 0, volt_batt);
_mav_put_float(buf, 4, curr_batt);
_mav_put_float(buf, 8, curr_gen);
_mav_put_float(buf, 12, curr_rot);
_mav_put_float(buf, 16, fuel_level);
_mav_put_float(buf, 20, throttle);
_mav_put_uint32_t(buf, 24, runtime);
_mav_put_int32_t(buf, 28, until_maintenance);
_mav_put_float(buf, 32, rectifier_temp);
_mav_put_float(buf, 36, generator_temp);
_mav_put_float(buf, 40, efi_batt);
_mav_put_float(buf, 44, efi_rpm);
_mav_put_float(buf, 48, efi_pw);
_mav_put_float(buf, 52, efi_fuel_flow);
_mav_put_float(buf, 56, efi_fuel_consumed);
_mav_put_float(buf, 60, efi_baro);
_mav_put_float(buf, 64, efi_mat);
_mav_put_float(buf, 68, efi_clt);
_mav_put_float(buf, 72, efi_tps);
_mav_put_float(buf, 76, efi_exhaust_gas_temperature);
_mav_put_uint16_t(buf, 80, generator_status);
_mav_put_uint16_t(buf, 82, efi_status);
_mav_put_uint8_t(buf, 84, efi_index);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#else
mavlink_loweheiser_gov_efi_t packet;
packet.volt_batt = volt_batt;
packet.curr_batt = curr_batt;
packet.curr_gen = curr_gen;
packet.curr_rot = curr_rot;
packet.fuel_level = fuel_level;
packet.throttle = throttle;
packet.runtime = runtime;
packet.until_maintenance = until_maintenance;
packet.rectifier_temp = rectifier_temp;
packet.generator_temp = generator_temp;
packet.efi_batt = efi_batt;
packet.efi_rpm = efi_rpm;
packet.efi_pw = efi_pw;
packet.efi_fuel_flow = efi_fuel_flow;
packet.efi_fuel_consumed = efi_fuel_consumed;
packet.efi_baro = efi_baro;
packet.efi_mat = efi_mat;
packet.efi_clt = efi_clt;
packet.efi_tps = efi_tps;
packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature;
packet.generator_status = generator_status;
packet.efi_status = efi_status;
packet.efi_index = efi_index;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)&packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#endif
}
/**
* @brief Send a loweheiser_gov_efi message
* @param chan MAVLink channel to send the message
* @param struct The MAVLink struct to serialize
*/
static inline void mavlink_msg_loweheiser_gov_efi_send_struct(mavlink_channel_t chan, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_loweheiser_gov_efi_send(chan, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)loweheiser_gov_efi, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#endif
}
#if MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
This variant 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_loweheiser_gov_efi_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
_mav_put_float(buf, 0, volt_batt);
_mav_put_float(buf, 4, curr_batt);
_mav_put_float(buf, 8, curr_gen);
_mav_put_float(buf, 12, curr_rot);
_mav_put_float(buf, 16, fuel_level);
_mav_put_float(buf, 20, throttle);
_mav_put_uint32_t(buf, 24, runtime);
_mav_put_int32_t(buf, 28, until_maintenance);
_mav_put_float(buf, 32, rectifier_temp);
_mav_put_float(buf, 36, generator_temp);
_mav_put_float(buf, 40, efi_batt);
_mav_put_float(buf, 44, efi_rpm);
_mav_put_float(buf, 48, efi_pw);
_mav_put_float(buf, 52, efi_fuel_flow);
_mav_put_float(buf, 56, efi_fuel_consumed);
_mav_put_float(buf, 60, efi_baro);
_mav_put_float(buf, 64, efi_mat);
_mav_put_float(buf, 68, efi_clt);
_mav_put_float(buf, 72, efi_tps);
_mav_put_float(buf, 76, efi_exhaust_gas_temperature);
_mav_put_uint16_t(buf, 80, generator_status);
_mav_put_uint16_t(buf, 82, efi_status);
_mav_put_uint8_t(buf, 84, efi_index);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#else
mavlink_loweheiser_gov_efi_t *packet = (mavlink_loweheiser_gov_efi_t *)msgbuf;
packet->volt_batt = volt_batt;
packet->curr_batt = curr_batt;
packet->curr_gen = curr_gen;
packet->curr_rot = curr_rot;
packet->fuel_level = fuel_level;
packet->throttle = throttle;
packet->runtime = runtime;
packet->until_maintenance = until_maintenance;
packet->rectifier_temp = rectifier_temp;
packet->generator_temp = generator_temp;
packet->efi_batt = efi_batt;
packet->efi_rpm = efi_rpm;
packet->efi_pw = efi_pw;
packet->efi_fuel_flow = efi_fuel_flow;
packet->efi_fuel_consumed = efi_fuel_consumed;
packet->efi_baro = efi_baro;
packet->efi_mat = efi_mat;
packet->efi_clt = efi_clt;
packet->efi_tps = efi_tps;
packet->efi_exhaust_gas_temperature = efi_exhaust_gas_temperature;
packet->generator_status = generator_status;
packet->efi_status = efi_status;
packet->efi_index = efi_index;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC);
#endif
}
#endif
#endif
// MESSAGE LOWEHEISER_GOV_EFI UNPACKING
/**
* @brief Get field volt_batt from loweheiser_gov_efi message
*
* @return [V] Generator Battery voltage.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_volt_batt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 0);
}
/**
* @brief Get field curr_batt from loweheiser_gov_efi message
*
* @return [A] Generator Battery current.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_curr_batt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 4);
}
/**
* @brief Get field curr_gen from loweheiser_gov_efi message
*
* @return [A] Current being produced by generator.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_curr_gen(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
}
/**
* @brief Get field curr_rot from loweheiser_gov_efi message
*
* @return [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt)
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_curr_rot(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 12);
}
/**
* @brief Get field fuel_level from loweheiser_gov_efi message
*
* @return [l] Generator fuel remaining in litres.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_fuel_level(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 16);
}
/**
* @brief Get field throttle from loweheiser_gov_efi message
*
* @return [%] Throttle Output.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_throttle(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 20);
}
/**
* @brief Get field runtime from loweheiser_gov_efi message
*
* @return [s] Seconds this generator has run since it was rebooted.
*/
static inline uint32_t mavlink_msg_loweheiser_gov_efi_get_runtime(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 24);
}
/**
* @brief Get field until_maintenance from loweheiser_gov_efi message
*
* @return [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.
*/
static inline int32_t mavlink_msg_loweheiser_gov_efi_get_until_maintenance(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 28);
}
/**
* @brief Get field rectifier_temp from loweheiser_gov_efi message
*
* @return [degC] The Temperature of the rectifier.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_rectifier_temp(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 32);
}
/**
* @brief Get field generator_temp from loweheiser_gov_efi message
*
* @return [degC] The temperature of the mechanical motor, fuel cell core or generator.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_generator_temp(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 36);
}
/**
* @brief Get field efi_batt from loweheiser_gov_efi message
*
* @return [V] EFI Supply Voltage.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_batt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 40);
}
/**
* @brief Get field efi_rpm from loweheiser_gov_efi message
*
* @return [rpm] Motor RPM.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_rpm(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 44);
}
/**
* @brief Get field efi_pw from loweheiser_gov_efi message
*
* @return [ms] Injector pulse-width in miliseconds.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_pw(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 48);
}
/**
* @brief Get field efi_fuel_flow from loweheiser_gov_efi message
*
* @return Fuel flow rate in litres/hour.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_fuel_flow(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 52);
}
/**
* @brief Get field efi_fuel_consumed from loweheiser_gov_efi message
*
* @return [l] Fuel consumed.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_fuel_consumed(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 56);
}
/**
* @brief Get field efi_baro from loweheiser_gov_efi message
*
* @return [kPa] Atmospheric pressure.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_baro(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 60);
}
/**
* @brief Get field efi_mat from loweheiser_gov_efi message
*
* @return [degC] Manifold Air Temperature.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_mat(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 64);
}
/**
* @brief Get field efi_clt from loweheiser_gov_efi message
*
* @return [degC] Cylinder Head Temperature.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_clt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 68);
}
/**
* @brief Get field efi_tps from loweheiser_gov_efi message
*
* @return [%] Throttle Position.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_tps(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 72);
}
/**
* @brief Get field efi_exhaust_gas_temperature from loweheiser_gov_efi message
*
* @return [degC] Exhaust gas temperature.
*/
static inline float mavlink_msg_loweheiser_gov_efi_get_efi_exhaust_gas_temperature(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 76);
}
/**
* @brief Get field efi_index from loweheiser_gov_efi message
*
* @return EFI index.
*/
static inline uint8_t mavlink_msg_loweheiser_gov_efi_get_efi_index(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 84);
}
/**
* @brief Get field generator_status from loweheiser_gov_efi message
*
* @return Generator status.
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_get_generator_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 80);
}
/**
* @brief Get field efi_status from loweheiser_gov_efi message
*
* @return EFI status.
*/
static inline uint16_t mavlink_msg_loweheiser_gov_efi_get_efi_status(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 82);
}
/**
* @brief Decode a loweheiser_gov_efi message into a struct
*
* @param msg The message to decode
* @param loweheiser_gov_efi C-struct to decode the message contents into
*/
static inline void mavlink_msg_loweheiser_gov_efi_decode(const mavlink_message_t* msg, mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
loweheiser_gov_efi->volt_batt = mavlink_msg_loweheiser_gov_efi_get_volt_batt(msg);
loweheiser_gov_efi->curr_batt = mavlink_msg_loweheiser_gov_efi_get_curr_batt(msg);
loweheiser_gov_efi->curr_gen = mavlink_msg_loweheiser_gov_efi_get_curr_gen(msg);
loweheiser_gov_efi->curr_rot = mavlink_msg_loweheiser_gov_efi_get_curr_rot(msg);
loweheiser_gov_efi->fuel_level = mavlink_msg_loweheiser_gov_efi_get_fuel_level(msg);
loweheiser_gov_efi->throttle = mavlink_msg_loweheiser_gov_efi_get_throttle(msg);
loweheiser_gov_efi->runtime = mavlink_msg_loweheiser_gov_efi_get_runtime(msg);
loweheiser_gov_efi->until_maintenance = mavlink_msg_loweheiser_gov_efi_get_until_maintenance(msg);
loweheiser_gov_efi->rectifier_temp = mavlink_msg_loweheiser_gov_efi_get_rectifier_temp(msg);
loweheiser_gov_efi->generator_temp = mavlink_msg_loweheiser_gov_efi_get_generator_temp(msg);
loweheiser_gov_efi->efi_batt = mavlink_msg_loweheiser_gov_efi_get_efi_batt(msg);
loweheiser_gov_efi->efi_rpm = mavlink_msg_loweheiser_gov_efi_get_efi_rpm(msg);
loweheiser_gov_efi->efi_pw = mavlink_msg_loweheiser_gov_efi_get_efi_pw(msg);
loweheiser_gov_efi->efi_fuel_flow = mavlink_msg_loweheiser_gov_efi_get_efi_fuel_flow(msg);
loweheiser_gov_efi->efi_fuel_consumed = mavlink_msg_loweheiser_gov_efi_get_efi_fuel_consumed(msg);
loweheiser_gov_efi->efi_baro = mavlink_msg_loweheiser_gov_efi_get_efi_baro(msg);
loweheiser_gov_efi->efi_mat = mavlink_msg_loweheiser_gov_efi_get_efi_mat(msg);
loweheiser_gov_efi->efi_clt = mavlink_msg_loweheiser_gov_efi_get_efi_clt(msg);
loweheiser_gov_efi->efi_tps = mavlink_msg_loweheiser_gov_efi_get_efi_tps(msg);
loweheiser_gov_efi->efi_exhaust_gas_temperature = mavlink_msg_loweheiser_gov_efi_get_efi_exhaust_gas_temperature(msg);
loweheiser_gov_efi->generator_status = mavlink_msg_loweheiser_gov_efi_get_generator_status(msg);
loweheiser_gov_efi->efi_status = mavlink_msg_loweheiser_gov_efi_get_efi_status(msg);
loweheiser_gov_efi->efi_index = mavlink_msg_loweheiser_gov_efi_get_efi_index(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN? msg->len : MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN;
memset(loweheiser_gov_efi, 0, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN);
memcpy(loweheiser_gov_efi, _MAV_PAYLOAD(msg), len);
#endif
}
+117
View File
@@ -0,0 +1,117 @@
/** @file
* @brief MAVLink comm protocol testsuite generated from loweheiser.xml
* @see https://mavlink.io/en/
*/
#pragma once
#ifndef LOWEHEISER_TESTSUITE_H
#define LOWEHEISER_TESTSUITE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MAVLINK_TEST_ALL
#define MAVLINK_TEST_ALL
static void mavlink_test_minimal(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_loweheiser(uint8_t, uint8_t, mavlink_message_t *last_msg);
static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_minimal(system_id, component_id, last_msg);
mavlink_test_loweheiser(system_id, component_id, last_msg);
}
#endif
#include "../minimal/testsuite.h"
static void mavlink_test_loweheiser_gov_efi(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_LOWEHEISER_GOV_EFI >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_loweheiser_gov_efi_t packet_in = {
17.0,45.0,73.0,101.0,129.0,157.0,963498712,963498920,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,21395,21499,1
};
mavlink_loweheiser_gov_efi_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.volt_batt = packet_in.volt_batt;
packet1.curr_batt = packet_in.curr_batt;
packet1.curr_gen = packet_in.curr_gen;
packet1.curr_rot = packet_in.curr_rot;
packet1.fuel_level = packet_in.fuel_level;
packet1.throttle = packet_in.throttle;
packet1.runtime = packet_in.runtime;
packet1.until_maintenance = packet_in.until_maintenance;
packet1.rectifier_temp = packet_in.rectifier_temp;
packet1.generator_temp = packet_in.generator_temp;
packet1.efi_batt = packet_in.efi_batt;
packet1.efi_rpm = packet_in.efi_rpm;
packet1.efi_pw = packet_in.efi_pw;
packet1.efi_fuel_flow = packet_in.efi_fuel_flow;
packet1.efi_fuel_consumed = packet_in.efi_fuel_consumed;
packet1.efi_baro = packet_in.efi_baro;
packet1.efi_mat = packet_in.efi_mat;
packet1.efi_clt = packet_in.efi_clt;
packet1.efi_tps = packet_in.efi_tps;
packet1.efi_exhaust_gas_temperature = packet_in.efi_exhaust_gas_temperature;
packet1.generator_status = packet_in.generator_status;
packet1.efi_status = packet_in.efi_status;
packet1.efi_index = packet_in.efi_index;
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_loweheiser_gov_efi_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_loweheiser_gov_efi_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_loweheiser_gov_efi_pack(system_id, component_id, &msg , packet1.volt_batt , packet1.curr_batt , packet1.curr_gen , packet1.curr_rot , packet1.fuel_level , packet1.throttle , packet1.runtime , packet1.until_maintenance , packet1.rectifier_temp , packet1.generator_temp , packet1.efi_batt , packet1.efi_rpm , packet1.efi_pw , packet1.efi_fuel_flow , packet1.efi_fuel_consumed , packet1.efi_baro , packet1.efi_mat , packet1.efi_clt , packet1.efi_tps , packet1.efi_exhaust_gas_temperature , packet1.efi_index , packet1.generator_status , packet1.efi_status );
mavlink_msg_loweheiser_gov_efi_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_loweheiser_gov_efi_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.volt_batt , packet1.curr_batt , packet1.curr_gen , packet1.curr_rot , packet1.fuel_level , packet1.throttle , packet1.runtime , packet1.until_maintenance , packet1.rectifier_temp , packet1.generator_temp , packet1.efi_batt , packet1.efi_rpm , packet1.efi_pw , packet1.efi_fuel_flow , packet1.efi_fuel_consumed , packet1.efi_baro , packet1.efi_mat , packet1.efi_clt , packet1.efi_tps , packet1.efi_exhaust_gas_temperature , packet1.efi_index , packet1.generator_status , packet1.efi_status );
mavlink_msg_loweheiser_gov_efi_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_loweheiser_gov_efi_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_loweheiser_gov_efi_send(MAVLINK_COMM_1 , packet1.volt_batt , packet1.curr_batt , packet1.curr_gen , packet1.curr_rot , packet1.fuel_level , packet1.throttle , packet1.runtime , packet1.until_maintenance , packet1.rectifier_temp , packet1.generator_temp , packet1.efi_batt , packet1.efi_rpm , packet1.efi_pw , packet1.efi_fuel_flow , packet1.efi_fuel_consumed , packet1.efi_baro , packet1.efi_mat , packet1.efi_clt , packet1.efi_tps , packet1.efi_exhaust_gas_temperature , packet1.efi_index , packet1.generator_status , packet1.efi_status );
mavlink_msg_loweheiser_gov_efi_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
#ifdef MAVLINK_HAVE_GET_MESSAGE_INFO
MAVLINK_ASSERT(mavlink_get_message_info_by_name("LOWEHEISER_GOV_EFI") != NULL);
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI) != NULL);
#endif
}
static void mavlink_test_loweheiser(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
mavlink_test_loweheiser_gov_efi(system_id, component_id, last_msg);
}
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // LOWEHEISER_TESTSUITE_H
+14
View File
@@ -0,0 +1,14 @@
/** @file
* @brief MAVLink comm protocol built from loweheiser.xml
* @see http://mavlink.org
*/
#pragma once
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 85
#endif // MAVLINK_VERSION_H
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_MATRIXPILOT.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_MATRIXPILOT_XML_HASH -344954935990819340
#define MAVLINK_MATRIXPILOT_XML_HASH -629436738390300191
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -344954935990819340
#define MAVLINK_PRIMARY_XML_HASH -629436738390300191
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+114 -4
View File
@@ -4,6 +4,7 @@
<!-- Vendors -->
<include>uAvionix.xml</include>
<include>icarous.xml</include>
<include>loweheiser.xml</include>
<include>cubepilot.xml</include>
<include>csAirLink.xml</include>
<dialect>2</dialect>
@@ -22,6 +23,7 @@
<enum name="HEADING_TYPE">
<entry value="0" name="HEADING_TYPE_COURSE_OVER_GROUND"/>
<entry value="1" name="HEADING_TYPE_HEADING"/>
<entry value="2" name="HEADING_TYPE_DEFAULT"/>
</enum>
<!-- ardupilot specific MAV_CMD_* commands -->
<enum name="MAV_CMD">
@@ -285,8 +287,8 @@
<param index="2" label="timeout" units="s">timeout for operation in seconds. Zero means no timeout (0 to 255)</param>
<param index="3" label="arg1">argument1.</param>
<param index="4" label="arg2">argument2.</param>
<param index="5">Empty</param>
<param index="6">Empty</param>
<param index="5" label="arg3">argument3.</param>
<param index="6" label="arg4">argument4.</param>
<param index="7">Empty</param>
</entry>
<entry value="42703" name="MAV_CMD_NAV_ATTITUDE_TIME" hasLocation="false" isDestination="false">
@@ -313,7 +315,7 @@
<description>Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.)</description>
<param index="1">Empty</param>
<param index="2">Empty</param>
<param index="3" label="alt rate-of-change" units="m/s/s" minValue="0">Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt.</param>
<param index="3" label="alt rate-of-change" units="m/s" minValue="0">Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt.</param>
<param index="4">Empty</param>
<param index="5">Empty</param>
<param index="6">Empty</param>
@@ -330,6 +332,16 @@
<param index="7">Empty</param>
</entry>
<!-- 43003 MAV_CMD_EXTERNAL_POSITION_ESTIMATE moved to common.xml -->
<entry value="43005" name="MAV_CMD_SET_HAGL" hasLocation="false" isDestination="false">
<description>Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing.</description>
<param index="1" label="hagl" units="m">Height above ground level.</param>
<param index="2" label="accuracy" units="m">estimated one standard deviation accuracy of the measurement. Set to NaN if not known.</param>
<param index="3" label="timeout" units="s">Timeout for this data. The flight controller should only consider this data valid within the timeout window.</param>
<param index="4">Empty</param>
<param index="5">Empty</param>
<param index="6">Empty</param>
<param index="7">Empty</param>
</entry>
</enum>
<enum name="SCRIPTING_CMD">
<entry value="0" name="SCRIPTING_CMD_REPL_START">
@@ -345,6 +357,32 @@
<description>Stop execution of scripts and restart.</description>
</entry>
</enum>
<enum name="SECURE_COMMAND_OP">
<entry value="0" name="SECURE_COMMAND_GET_SESSION_KEY">
<description>Get an 8 byte session key which is used for remote secure updates which operate on flight controller data such as bootloader public keys. Return data will be 8 bytes on success. The session key remains valid until either the flight controller reboots or another SECURE_COMMAND_GET_SESSION_KEY is run.</description>
</entry>
<entry value="1" name="SECURE_COMMAND_GET_REMOTEID_SESSION_KEY">
<description>Get an 8 byte session key which is used for remote secure updates which operate on RemoteID module data. Return data will be 8 bytes on success. The session key remains valid until either the remote ID module reboots or another SECURE_COMMAND_GET_REMOTEID_SESSION_KEY is run.</description>
</entry>
<entry value="2" name="SECURE_COMMAND_REMOVE_PUBLIC_KEYS">
<description>Remove range of public keys from the bootloader. Command data consists of two bytes, first byte if index of first public key to remove. Second byte is the number of keys to remove. If all keys are removed then secure boot is disabled and insecure firmware can be loaded.</description>
</entry>
<entry value="3" name="SECURE_COMMAND_GET_PUBLIC_KEYS">
<description>Get current public keys from the bootloader. Command data consists of two bytes, first byte is index of first public key to fetch, 2nd byte is number of keys to fetch. Total data needs to fit in data portion of reply (max 6 keys for 32 byte keys). Reply data has the index of the first key in the first byte, followed by the keys. Returned keys may be less than the number of keys requested if there are less keys installed than requested.</description>
</entry>
<entry value="4" name="SECURE_COMMAND_SET_PUBLIC_KEYS">
<description>Set current public keys in the bootloader. Data consists of a one byte public key index followed by the public keys. With 32 byte keys this allows for up to 6 keys to be set in one request. Keys outside of the range that is being set will remain unchanged.</description>
</entry>
<entry value="5" name="SECURE_COMMAND_GET_REMOTEID_CONFIG">
<description>Get config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details.</description>
</entry>
<entry value="6" name="SECURE_COMMAND_SET_REMOTEID_CONFIG">
<description>Set config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details.</description>
</entry>
<entry value="7" name="SECURE_COMMAND_FLASH_BOOTLOADER">
<description>Flash bootloader from local storage. Data is the filename to use for the bootloader. This is intended to be used with MAVFtp to upload a new bootloader to a microSD before flashing.</description>
</entry>
</enum>
<!-- AP_Limits Enums -->
<enum name="LIMITS_STATE">
<entry value="0" name="LIMITS_INIT">
@@ -387,6 +425,12 @@
<entry value="2" name="LAND_IMMEDIATELY">
<description>Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land.</description>
</entry>
<entry value="4" name="ALT_FRAME_VALID">
<description>True if the following altitude frame value is valid.</description>
</entry>
<entry value="24" name="ALT_FRAME">
<description>2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain</description>
</entry>
</enum>
<!-- Camera event types -->
<enum name="CAMERA_STATUS_TYPES">
@@ -946,6 +990,9 @@
<entry value="512" name="EKF_PRED_POS_HORIZ_ABS">
<description>Set if EKF's predicted horizontal position (absolute) estimate is good.</description>
</entry>
<entry value="32768" name="EKF_GPS_GLITCHING">
<description>Set if EKF believes the GPS input data is faulty.</description>
</entry>
<entry value="1024" name="EKF_UNINITIALIZED">
<description>Set if EKF has never been healthy.</description>
</entry>
@@ -1126,6 +1173,7 @@
</enums>
<messages>
<message id="150" name="SENSOR_OFFSETS">
<deprecated since="2022-02" replaced_by="MAG_CAL_REPORT, Accel Parameters, and Gyro Parameters"/>
<description>Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process.</description>
<field type="int16_t" name="mag_ofs_x">Magnetometer X offset.</field>
<field type="int16_t" name="mag_ofs_y">Magnetometer Y offset.</field>
@@ -1639,6 +1687,24 @@
<field type="uint32_t" name="request_id">Request ID - copied from request.</field>
<field type="uint8_t" name="result">0 for success, anything else is failure code.</field>
</message>
<message id="11004" name="SECURE_COMMAND">
<description>Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific.</description>
<field type="uint8_t" name="target_system">System ID.</field>
<field type="uint8_t" name="target_component">Component ID.</field>
<field type="uint32_t" name="sequence">Sequence ID for tagging reply.</field>
<field type="uint32_t" name="operation" enum="SECURE_COMMAND_OP">Operation being requested.</field>
<field type="uint8_t" name="data_length">Data length.</field>
<field type="uint8_t" name="sig_length">Signature length.</field>
<field type="uint8_t[220]" name="data">Signed data.</field>
</message>
<message id="11005" name="SECURE_COMMAND_REPLY">
<description>Reply from secure command.</description>
<field type="uint32_t" name="sequence">Sequence ID from request.</field>
<field type="uint32_t" name="operation" enum="SECURE_COMMAND_OP">Operation that was requested.</field>
<field type="uint8_t" name="result" enum="MAV_RESULT">Result of command.</field>
<field type="uint8_t" name="data_length">Data length.</field>
<field type="uint8_t[220]" name="data">Reply data.</field>
</message>
<!-- realtime Adaptive Controller tuning message -->
<message id="11010" name="ADAP_TUNING">
<description>Adaptive Controller tuning information.</description>
@@ -1736,7 +1802,6 @@
<field type="float" name="increment">OSD parameter increment.</field>
</message>
<message id="11037" name="OBSTACLE_DISTANCE_3D">
<wip/>
<!-- This message is work-in-progress and it can therefore change, and should NOT be used in stable production environments -->
<description>Obstacle located as a 3D vector.</description>
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
@@ -1771,5 +1836,50 @@
<field type="uint16_t" name="MCU_voltage_min" units="mV">MCU voltage minimum</field>
<field type="uint16_t" name="MCU_voltage_max" units="mV">MCU voltage maximum</field>
</message>
<message id="11040" name="ESC_TELEMETRY_13_TO_16">
<description>ESC Telemetry Data for ESCs 13 to 16, matching data sent by BLHeli ESCs.</description>
<field type="uint8_t[4]" name="temperature" units="degC">Temperature.</field>
<field type="uint16_t[4]" name="voltage" units="cV">Voltage.</field>
<field type="uint16_t[4]" name="current" units="cA">Current.</field>
<field type="uint16_t[4]" name="totalcurrent" units="mAh">Total current.</field>
<field type="uint16_t[4]" name="rpm" units="rpm">RPM (eRPM).</field>
<field type="uint16_t[4]" name="count">count of telemetry packets received (wraps at 65535).</field>
</message>
<message id="11041" name="ESC_TELEMETRY_17_TO_20">
<description>ESC Telemetry Data for ESCs 17 to 20, matching data sent by BLHeli ESCs.</description>
<field type="uint8_t[4]" name="temperature" units="degC">Temperature.</field>
<field type="uint16_t[4]" name="voltage" units="cV">Voltage.</field>
<field type="uint16_t[4]" name="current" units="cA">Current.</field>
<field type="uint16_t[4]" name="totalcurrent" units="mAh">Total current.</field>
<field type="uint16_t[4]" name="rpm" units="rpm">RPM (eRPM).</field>
<field type="uint16_t[4]" name="count">count of telemetry packets received (wraps at 65535).</field>
</message>
<message id="11042" name="ESC_TELEMETRY_21_TO_24">
<description>ESC Telemetry Data for ESCs 21 to 24, matching data sent by BLHeli ESCs.</description>
<field type="uint8_t[4]" name="temperature" units="degC">Temperature.</field>
<field type="uint16_t[4]" name="voltage" units="cV">Voltage.</field>
<field type="uint16_t[4]" name="current" units="cA">Current.</field>
<field type="uint16_t[4]" name="totalcurrent" units="mAh">Total current.</field>
<field type="uint16_t[4]" name="rpm" units="rpm">RPM (eRPM).</field>
<field type="uint16_t[4]" name="count">count of telemetry packets received (wraps at 65535).</field>
</message>
<message id="11043" name="ESC_TELEMETRY_25_TO_28">
<description>ESC Telemetry Data for ESCs 25 to 28, matching data sent by BLHeli ESCs.</description>
<field type="uint8_t[4]" name="temperature" units="degC">Temperature.</field>
<field type="uint16_t[4]" name="voltage" units="cV">Voltage.</field>
<field type="uint16_t[4]" name="current" units="cA">Current.</field>
<field type="uint16_t[4]" name="totalcurrent" units="mAh">Total current.</field>
<field type="uint16_t[4]" name="rpm" units="rpm">RPM (eRPM).</field>
<field type="uint16_t[4]" name="count">count of telemetry packets received (wraps at 65535).</field>
</message>
<message id="11044" name="ESC_TELEMETRY_29_TO_32">
<description>ESC Telemetry Data for ESCs 29 to 32, matching data sent by BLHeli ESCs.</description>
<field type="uint8_t[4]" name="temperature" units="degC">Temperature.</field>
<field type="uint16_t[4]" name="voltage" units="cV">Voltage.</field>
<field type="uint16_t[4]" name="current" units="cA">Current.</field>
<field type="uint16_t[4]" name="totalcurrent" units="mAh">Total current.</field>
<field type="uint16_t[4]" name="rpm" units="rpm">RPM (eRPM).</field>
<field type="uint16_t[4]" name="count">count of telemetry packets received (wraps at 65535).</field>
</message>
</messages>
</mavlink>
+55
View File
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<mavlink>
<!-- Loweheiser contact info: -->
<!-- company URL: https://www.loweheiser.com/ -->
<!-- company LinkeIn: https://www.linkedin.com/company/loweheiser -->
<!-- email contact: info@loweheiser.com -->
<!-- mavlink ID range: 10150 - 10199 -->
<include>minimal.xml</include>
<enums>
<enum name="MAV_CMD">
<!-- Loweheiser specific MAV_CMD_* commands -->
<entry name="MAV_CMD_LOWEHEISER_SET_STATE" value="10151">
<description>Set Loweheiser desired states</description>
<param index="1">EFI Index</param>
<param index="2">Desired Engine/EFI State (0: Power Off, 1:Running)</param>
<param index="3">Desired Governor State (0:manual throttle, 1:Governed throttle)</param>
<param index="4">Manual throttle level, 0% - 100%</param>
<param index="5">Electronic Start up (0:Off, 1:On)</param>
<param index="6">Empty</param>
<param index="7">Empty</param>
</entry>
</enum>
</enums>
<messages>
<message id="10151" name="LOWEHEISER_GOV_EFI">
<description>Composite EFI and Governor data from Loweheiser equipment. This message is created by the EFI unit based on its own data and data received from a governor attached to that EFI unit.</description>
<!-- Generator fields -->
<field type="float" name="volt_batt" units="V">Generator Battery voltage.</field>
<field type="float" name="curr_batt" units="A">Generator Battery current.</field>
<field type="float" name="curr_gen" units="A">Current being produced by generator.</field>
<field type="float" name="curr_rot" units="A">Load current being consumed by the UAV (sum of curr_gen and curr_batt)</field>
<field type="float" name="fuel_level" units="l">Generator fuel remaining in litres.</field>
<field type="float" name="throttle" units="%">Throttle Output.</field>
<field type="uint32_t" name="runtime" units="s">Seconds this generator has run since it was rebooted.</field>
<field type="int32_t" name="until_maintenance" units="s">Seconds until this generator requires maintenance. A negative value indicates maintenance is past due.</field>
<field type="float" name="rectifier_temp" units="degC">The Temperature of the rectifier.</field>
<field type="float" name="generator_temp" units="degC">The temperature of the mechanical motor, fuel cell core or generator.</field>
<!-- EFI fields -->
<field type="float" name="efi_batt" units="V"> EFI Supply Voltage.</field>
<field type="float" name="efi_rpm" units="rpm">Motor RPM.</field>
<field type="float" name="efi_pw" units="ms">Injector pulse-width in miliseconds.</field>
<field type="float" name="efi_fuel_flow">Fuel flow rate in litres/hour.</field>
<field type="float" name="efi_fuel_consumed" units="l">Fuel consumed.</field>
<field type="float" name="efi_baro" units="kPa">Atmospheric pressure.</field>
<field type="float" name="efi_mat" units="degC">Manifold Air Temperature.</field>
<field type="float" name="efi_clt" units="degC">Cylinder Head Temperature.</field>
<field type="float" name="efi_tps" units="%">Throttle Position.</field>
<field type="float" name="efi_exhaust_gas_temperature" units="degC">Exhaust gas temperature.</field>
<!-- Status fields -->
<field type="uint8_t" name="efi_index" instance="true">EFI index.</field>
<field type="uint16_t" name="generator_status">Generator status.</field>
<field type="uint16_t" name="efi_status">EFI status.</field>
</message>
</messages>
</mavlink>
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 3048101284247524690
#define MAVLINK_PRIMARY_XML_HASH 8098332041058494305
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_MINIMAL_XML_HASH 3048101284247524690
#define MAVLINK_MINIMAL_XML_HASH 8098332041058494305
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 4971882315575834719
#define MAVLINK_PRIMARY_XML_HASH 6848989747362740563
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_PAPARAZZI.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_PAPARAZZI_XML_HASH 4971882315575834719
#define MAVLINK_PAPARAZZI_XML_HASH 6848989747362740563
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 4161192802349125800
#define MAVLINK_PRIMARY_XML_HASH 2975130390171456319
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_PYTHON_ARRAY_TEST.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_PYTHON_ARRAY_TEST_XML_HASH 4161192802349125800
#define MAVLINK_PYTHON_ARRAY_TEST_XML_HASH 2975130390171456319
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -1692329228211555103
#define MAVLINK_PRIMARY_XML_HASH 8143079525675159880
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_STANDARD.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_STANDARD_XML_HASH -1692329228211555103
#define MAVLINK_STANDARD_XML_HASH 8143079525675159880
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 5220004032817611026
#define MAVLINK_PRIMARY_XML_HASH -1339248290359218199
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+7 -5
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -6986698418746033420
#define MAVLINK_PRIMARY_XML_HASH -2129567969900931485
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_TEST.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_TEST_XML_HASH -6986698418746033420
#define MAVLINK_TEST_XML_HASH -2129567969900931485
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH 2661150497529153068
#define MAVLINK_PRIMARY_XML_HASH -8145649519820390622
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_UAVIONIX.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_UAVIONIX_XML_HASH 2661150497529153068
#define MAVLINK_UAVIONIX_XML_HASH -8145649519820390622
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
+1 -1
View File
@@ -6,7 +6,7 @@
#ifndef MAVLINK_H
#define MAVLINK_H
#define MAVLINK_PRIMARY_XML_HASH -649424154679907596
#define MAVLINK_PRIMARY_XML_HASH 4222844787621328972
#ifndef MAVLINK_STX
#define MAVLINK_STX 253
+1 -1
View File
@@ -10,7 +10,7 @@
#error Wrong include order: MAVLINK_UALBERTA.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
#endif
#define MAVLINK_UALBERTA_XML_HASH -649424154679907596
#define MAVLINK_UALBERTA_XML_HASH 4222844787621328972
#ifdef __cplusplus
extern "C" {
+1 -1
View File
@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Nov 27 2024"
#define MAVLINK_BUILD_DATE "Tue Dec 03 2024"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255