autogenerated headers for rev https://github.com/mavlink/mavlink/tree/33dde55444e6e787bf5f1f7415a862c1a092d502
This commit is contained in:
+1
-1
@@ -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 7272446913500863510
|
||||
#define MAVLINK_ASLUAV_XML_HASH -1098102580451474582
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7272446913500863510
|
||||
#define MAVLINK_PRIMARY_XML_HASH -1098102580451474582
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#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
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2734410387492778312
|
||||
#define MAVLINK_PRIMARY_XML_HASH 6370345430844825169
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -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_cubepilot(uint8_t, uint8_t, mavlink_message_t *last_msg);
|
||||
static void mavlink_test_ardupilotmega(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)
|
||||
@@ -22,6 +23,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_cubepilot(system_id, component_id, last_msg);
|
||||
mavlink_test_ardupilotmega(system_id, component_id, last_msg);
|
||||
}
|
||||
#endif
|
||||
@@ -29,6 +31,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 "../cubepilot/testsuite.h"
|
||||
|
||||
|
||||
static void mavlink_test_sensor_offsets(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
+1
-1
@@ -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 2891022587280233732
|
||||
#define MAVLINK_COMMON_XML_HASH 3771426414540963760
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 2891022587280233732
|
||||
#define MAVLINK_PRIMARY_XML_HASH 3771426414540963760
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#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
@@ -0,0 +1,34 @@
|
||||
/** @file
|
||||
* @brief MAVLink comm protocol built from cubepilot.xml
|
||||
* @see http://mavlink.org
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -7625512342474825843
|
||||
|
||||
#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 "cubepilot.h"
|
||||
|
||||
#endif // MAVLINK_H
|
||||
@@ -0,0 +1,263 @@
|
||||
#pragma once
|
||||
// MESSAGE CUBEPILOT_FIRMWARE_UPDATE_RESP PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP 50005
|
||||
|
||||
|
||||
typedef struct __mavlink_cubepilot_firmware_update_resp_t {
|
||||
uint32_t offset; /*< [bytes] FW Offset.*/
|
||||
uint8_t target_system; /*< System ID.*/
|
||||
uint8_t target_component; /*< Component ID.*/
|
||||
} mavlink_cubepilot_firmware_update_resp_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN 6
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN 6
|
||||
#define MAVLINK_MSG_ID_50005_LEN 6
|
||||
#define MAVLINK_MSG_ID_50005_MIN_LEN 6
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC 152
|
||||
#define MAVLINK_MSG_ID_50005_CRC 152
|
||||
|
||||
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP { \
|
||||
50005, \
|
||||
"CUBEPILOT_FIRMWARE_UPDATE_RESP", \
|
||||
3, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_cubepilot_firmware_update_resp_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_cubepilot_firmware_update_resp_t, target_component) }, \
|
||||
{ "offset", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_cubepilot_firmware_update_resp_t, offset) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP { \
|
||||
"CUBEPILOT_FIRMWARE_UPDATE_RESP", \
|
||||
3, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_cubepilot_firmware_update_resp_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_cubepilot_firmware_update_resp_t, target_component) }, \
|
||||
{ "offset", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_cubepilot_firmware_update_resp_t, offset) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_firmware_update_resp 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 offset [bytes] FW Offset.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_resp_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t offset)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN];
|
||||
_mav_put_uint32_t(buf, 0, offset);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_resp_t packet;
|
||||
packet.offset = offset;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_firmware_update_resp 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 offset [bytes] FW Offset.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_resp_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 offset)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN];
|
||||
_mav_put_uint32_t(buf, 0, offset);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_resp_t packet;
|
||||
packet.offset = offset;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_firmware_update_resp 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 cubepilot_firmware_update_resp C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_resp_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cubepilot_firmware_update_resp_t* cubepilot_firmware_update_resp)
|
||||
{
|
||||
return mavlink_msg_cubepilot_firmware_update_resp_pack(system_id, component_id, msg, cubepilot_firmware_update_resp->target_system, cubepilot_firmware_update_resp->target_component, cubepilot_firmware_update_resp->offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_firmware_update_resp 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 cubepilot_firmware_update_resp C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_resp_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cubepilot_firmware_update_resp_t* cubepilot_firmware_update_resp)
|
||||
{
|
||||
return mavlink_msg_cubepilot_firmware_update_resp_pack_chan(system_id, component_id, chan, msg, cubepilot_firmware_update_resp->target_system, cubepilot_firmware_update_resp->target_component, cubepilot_firmware_update_resp->offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_firmware_update_resp message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param offset [bytes] FW Offset.
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_resp_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t offset)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN];
|
||||
_mav_put_uint32_t(buf, 0, offset);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP, buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_resp_t packet;
|
||||
packet.offset = offset;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP, (const char *)&packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_firmware_update_resp message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_resp_send_struct(mavlink_channel_t chan, const mavlink_cubepilot_firmware_update_resp_t* cubepilot_firmware_update_resp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_cubepilot_firmware_update_resp_send(chan, cubepilot_firmware_update_resp->target_system, cubepilot_firmware_update_resp->target_component, cubepilot_firmware_update_resp->offset);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP, (const char *)cubepilot_firmware_update_resp, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_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_cubepilot_firmware_update_resp_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t offset)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, offset);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP, buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_resp_t *packet = (mavlink_cubepilot_firmware_update_resp_t *)msgbuf;
|
||||
packet->offset = offset;
|
||||
packet->target_system = target_system;
|
||||
packet->target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP, (const char *)packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE CUBEPILOT_FIRMWARE_UPDATE_RESP UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from cubepilot_firmware_update_resp message
|
||||
*
|
||||
* @return System ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_cubepilot_firmware_update_resp_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from cubepilot_firmware_update_resp message
|
||||
*
|
||||
* @return Component ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_cubepilot_firmware_update_resp_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field offset from cubepilot_firmware_update_resp message
|
||||
*
|
||||
* @return [bytes] FW Offset.
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_cubepilot_firmware_update_resp_get_offset(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a cubepilot_firmware_update_resp message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param cubepilot_firmware_update_resp C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_resp_decode(const mavlink_message_t* msg, mavlink_cubepilot_firmware_update_resp_t* cubepilot_firmware_update_resp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
cubepilot_firmware_update_resp->offset = mavlink_msg_cubepilot_firmware_update_resp_get_offset(msg);
|
||||
cubepilot_firmware_update_resp->target_system = mavlink_msg_cubepilot_firmware_update_resp_get_target_system(msg);
|
||||
cubepilot_firmware_update_resp->target_component = mavlink_msg_cubepilot_firmware_update_resp_get_target_component(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN? msg->len : MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN;
|
||||
memset(cubepilot_firmware_update_resp, 0, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_LEN);
|
||||
memcpy(cubepilot_firmware_update_resp, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
#pragma once
|
||||
// MESSAGE CUBEPILOT_FIRMWARE_UPDATE_START PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START 50004
|
||||
|
||||
|
||||
typedef struct __mavlink_cubepilot_firmware_update_start_t {
|
||||
uint32_t size; /*< [bytes] FW Size.*/
|
||||
uint32_t crc; /*< FW CRC.*/
|
||||
uint8_t target_system; /*< System ID.*/
|
||||
uint8_t target_component; /*< Component ID.*/
|
||||
} mavlink_cubepilot_firmware_update_start_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN 10
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN 10
|
||||
#define MAVLINK_MSG_ID_50004_LEN 10
|
||||
#define MAVLINK_MSG_ID_50004_MIN_LEN 10
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC 240
|
||||
#define MAVLINK_MSG_ID_50004_CRC 240
|
||||
|
||||
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START { \
|
||||
50004, \
|
||||
"CUBEPILOT_FIRMWARE_UPDATE_START", \
|
||||
4, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_cubepilot_firmware_update_start_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_cubepilot_firmware_update_start_t, target_component) }, \
|
||||
{ "size", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_cubepilot_firmware_update_start_t, size) }, \
|
||||
{ "crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_cubepilot_firmware_update_start_t, crc) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START { \
|
||||
"CUBEPILOT_FIRMWARE_UPDATE_START", \
|
||||
4, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_cubepilot_firmware_update_start_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_cubepilot_firmware_update_start_t, target_component) }, \
|
||||
{ "size", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_cubepilot_firmware_update_start_t, size) }, \
|
||||
{ "crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_cubepilot_firmware_update_start_t, crc) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_firmware_update_start 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 size [bytes] FW Size.
|
||||
* @param crc FW CRC.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_start_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t size, uint32_t crc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN];
|
||||
_mav_put_uint32_t(buf, 0, size);
|
||||
_mav_put_uint32_t(buf, 4, crc);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_start_t packet;
|
||||
packet.size = size;
|
||||
packet.crc = crc;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_firmware_update_start 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 size [bytes] FW Size.
|
||||
* @param crc FW CRC.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_start_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 size,uint32_t crc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN];
|
||||
_mav_put_uint32_t(buf, 0, size);
|
||||
_mav_put_uint32_t(buf, 4, crc);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_start_t packet;
|
||||
packet.size = size;
|
||||
packet.crc = crc;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_firmware_update_start 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 cubepilot_firmware_update_start C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_start_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cubepilot_firmware_update_start_t* cubepilot_firmware_update_start)
|
||||
{
|
||||
return mavlink_msg_cubepilot_firmware_update_start_pack(system_id, component_id, msg, cubepilot_firmware_update_start->target_system, cubepilot_firmware_update_start->target_component, cubepilot_firmware_update_start->size, cubepilot_firmware_update_start->crc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_firmware_update_start 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 cubepilot_firmware_update_start C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_firmware_update_start_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cubepilot_firmware_update_start_t* cubepilot_firmware_update_start)
|
||||
{
|
||||
return mavlink_msg_cubepilot_firmware_update_start_pack_chan(system_id, component_id, chan, msg, cubepilot_firmware_update_start->target_system, cubepilot_firmware_update_start->target_component, cubepilot_firmware_update_start->size, cubepilot_firmware_update_start->crc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_firmware_update_start message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param size [bytes] FW Size.
|
||||
* @param crc FW CRC.
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_start_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t size, uint32_t crc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN];
|
||||
_mav_put_uint32_t(buf, 0, size);
|
||||
_mav_put_uint32_t(buf, 4, crc);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START, buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_start_t packet;
|
||||
packet.size = size;
|
||||
packet.crc = crc;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START, (const char *)&packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_firmware_update_start message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_start_send_struct(mavlink_channel_t chan, const mavlink_cubepilot_firmware_update_start_t* cubepilot_firmware_update_start)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_cubepilot_firmware_update_start_send(chan, cubepilot_firmware_update_start->target_system, cubepilot_firmware_update_start->target_component, cubepilot_firmware_update_start->size, cubepilot_firmware_update_start->crc);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START, (const char *)cubepilot_firmware_update_start, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_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_cubepilot_firmware_update_start_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t size, uint32_t crc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, size);
|
||||
_mav_put_uint32_t(buf, 4, crc);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START, buf, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_firmware_update_start_t *packet = (mavlink_cubepilot_firmware_update_start_t *)msgbuf;
|
||||
packet->size = size;
|
||||
packet->crc = crc;
|
||||
packet->target_system = target_system;
|
||||
packet->target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START, (const char *)packet, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE CUBEPILOT_FIRMWARE_UPDATE_START UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from cubepilot_firmware_update_start message
|
||||
*
|
||||
* @return System ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_cubepilot_firmware_update_start_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from cubepilot_firmware_update_start message
|
||||
*
|
||||
* @return Component ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_cubepilot_firmware_update_start_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field size from cubepilot_firmware_update_start message
|
||||
*
|
||||
* @return [bytes] FW Size.
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_cubepilot_firmware_update_start_get_size(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field crc from cubepilot_firmware_update_start message
|
||||
*
|
||||
* @return FW CRC.
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_cubepilot_firmware_update_start_get_crc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a cubepilot_firmware_update_start message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param cubepilot_firmware_update_start C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_firmware_update_start_decode(const mavlink_message_t* msg, mavlink_cubepilot_firmware_update_start_t* cubepilot_firmware_update_start)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
cubepilot_firmware_update_start->size = mavlink_msg_cubepilot_firmware_update_start_get_size(msg);
|
||||
cubepilot_firmware_update_start->crc = mavlink_msg_cubepilot_firmware_update_start_get_crc(msg);
|
||||
cubepilot_firmware_update_start->target_system = mavlink_msg_cubepilot_firmware_update_start_get_target_system(msg);
|
||||
cubepilot_firmware_update_start->target_component = mavlink_msg_cubepilot_firmware_update_start_get_target_component(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN? msg->len : MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN;
|
||||
memset(cubepilot_firmware_update_start, 0, MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_LEN);
|
||||
memcpy(cubepilot_firmware_update_start, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
#pragma once
|
||||
// MESSAGE CUBEPILOT_RAW_RC PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_RAW_RC 50001
|
||||
|
||||
|
||||
typedef struct __mavlink_cubepilot_raw_rc_t {
|
||||
uint8_t rc_raw[32]; /*< */
|
||||
} mavlink_cubepilot_raw_rc_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN 32
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN 32
|
||||
#define MAVLINK_MSG_ID_50001_LEN 32
|
||||
#define MAVLINK_MSG_ID_50001_MIN_LEN 32
|
||||
|
||||
#define MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC 246
|
||||
#define MAVLINK_MSG_ID_50001_CRC 246
|
||||
|
||||
#define MAVLINK_MSG_CUBEPILOT_RAW_RC_FIELD_RC_RAW_LEN 32
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC { \
|
||||
50001, \
|
||||
"CUBEPILOT_RAW_RC", \
|
||||
1, \
|
||||
{ { "rc_raw", NULL, MAVLINK_TYPE_UINT8_T, 32, 0, offsetof(mavlink_cubepilot_raw_rc_t, rc_raw) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC { \
|
||||
"CUBEPILOT_RAW_RC", \
|
||||
1, \
|
||||
{ { "rc_raw", NULL, MAVLINK_TYPE_UINT8_T, 32, 0, offsetof(mavlink_cubepilot_raw_rc_t, rc_raw) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_raw_rc 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 rc_raw
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_raw_rc_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
const uint8_t *rc_raw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN];
|
||||
|
||||
_mav_put_uint8_t_array(buf, 0, rc_raw, 32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_raw_rc_t packet;
|
||||
|
||||
mav_array_memcpy(packet.rc_raw, rc_raw, sizeof(uint8_t)*32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_RAW_RC;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a cubepilot_raw_rc 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 rc_raw
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_raw_rc_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
const uint8_t *rc_raw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN];
|
||||
|
||||
_mav_put_uint8_t_array(buf, 0, rc_raw, 32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN);
|
||||
#else
|
||||
mavlink_cubepilot_raw_rc_t packet;
|
||||
|
||||
mav_array_memcpy(packet.rc_raw, rc_raw, sizeof(uint8_t)*32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CUBEPILOT_RAW_RC;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_raw_rc 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 cubepilot_raw_rc C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_raw_rc_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cubepilot_raw_rc_t* cubepilot_raw_rc)
|
||||
{
|
||||
return mavlink_msg_cubepilot_raw_rc_pack(system_id, component_id, msg, cubepilot_raw_rc->rc_raw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a cubepilot_raw_rc 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 cubepilot_raw_rc C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_raw_rc_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cubepilot_raw_rc_t* cubepilot_raw_rc)
|
||||
{
|
||||
return mavlink_msg_cubepilot_raw_rc_pack_chan(system_id, component_id, chan, msg, cubepilot_raw_rc->rc_raw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_raw_rc message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param rc_raw
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_cubepilot_raw_rc_send(mavlink_channel_t chan, const uint8_t *rc_raw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN];
|
||||
|
||||
_mav_put_uint8_t_array(buf, 0, rc_raw, 32);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC, buf, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_raw_rc_t packet;
|
||||
|
||||
mav_array_memcpy(packet.rc_raw, rc_raw, sizeof(uint8_t)*32);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC, (const char *)&packet, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a cubepilot_raw_rc message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_raw_rc_send_struct(mavlink_channel_t chan, const mavlink_cubepilot_raw_rc_t* cubepilot_raw_rc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_cubepilot_raw_rc_send(chan, cubepilot_raw_rc->rc_raw);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC, (const char *)cubepilot_raw_rc, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_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_cubepilot_raw_rc_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *rc_raw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
|
||||
_mav_put_uint8_t_array(buf, 0, rc_raw, 32);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC, buf, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
#else
|
||||
mavlink_cubepilot_raw_rc_t *packet = (mavlink_cubepilot_raw_rc_t *)msgbuf;
|
||||
|
||||
mav_array_memcpy(packet->rc_raw, rc_raw, sizeof(uint8_t)*32);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC, (const char *)packet, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE CUBEPILOT_RAW_RC UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field rc_raw from cubepilot_raw_rc message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_cubepilot_raw_rc_get_rc_raw(const mavlink_message_t* msg, uint8_t *rc_raw)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t_array(msg, rc_raw, 32, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a cubepilot_raw_rc message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param cubepilot_raw_rc C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_cubepilot_raw_rc_decode(const mavlink_message_t* msg, mavlink_cubepilot_raw_rc_t* cubepilot_raw_rc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_cubepilot_raw_rc_get_rc_raw(msg, cubepilot_raw_rc->rc_raw);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN? msg->len : MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN;
|
||||
memset(cubepilot_raw_rc, 0, MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_LEN);
|
||||
memcpy(cubepilot_raw_rc, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
#pragma once
|
||||
// MESSAGE HERELINK_TELEM PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_TELEM 50003
|
||||
|
||||
|
||||
typedef struct __mavlink_herelink_telem_t {
|
||||
uint32_t rf_freq; /*< */
|
||||
uint32_t link_bw; /*< */
|
||||
uint32_t link_rate; /*< */
|
||||
int16_t snr; /*< */
|
||||
int16_t cpu_temp; /*< */
|
||||
int16_t board_temp; /*< */
|
||||
uint8_t rssi; /*< */
|
||||
} mavlink_herelink_telem_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_TELEM_LEN 19
|
||||
#define MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN 19
|
||||
#define MAVLINK_MSG_ID_50003_LEN 19
|
||||
#define MAVLINK_MSG_ID_50003_MIN_LEN 19
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_TELEM_CRC 62
|
||||
#define MAVLINK_MSG_ID_50003_CRC 62
|
||||
|
||||
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_HERELINK_TELEM { \
|
||||
50003, \
|
||||
"HERELINK_TELEM", \
|
||||
7, \
|
||||
{ { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_herelink_telem_t, rssi) }, \
|
||||
{ "snr", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_herelink_telem_t, snr) }, \
|
||||
{ "rf_freq", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_herelink_telem_t, rf_freq) }, \
|
||||
{ "link_bw", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_herelink_telem_t, link_bw) }, \
|
||||
{ "link_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_herelink_telem_t, link_rate) }, \
|
||||
{ "cpu_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_herelink_telem_t, cpu_temp) }, \
|
||||
{ "board_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_herelink_telem_t, board_temp) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_HERELINK_TELEM { \
|
||||
"HERELINK_TELEM", \
|
||||
7, \
|
||||
{ { "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_herelink_telem_t, rssi) }, \
|
||||
{ "snr", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_herelink_telem_t, snr) }, \
|
||||
{ "rf_freq", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_herelink_telem_t, rf_freq) }, \
|
||||
{ "link_bw", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_herelink_telem_t, link_bw) }, \
|
||||
{ "link_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_herelink_telem_t, link_rate) }, \
|
||||
{ "cpu_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_herelink_telem_t, cpu_temp) }, \
|
||||
{ "board_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_herelink_telem_t, board_temp) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a herelink_telem 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 rssi
|
||||
* @param snr
|
||||
* @param rf_freq
|
||||
* @param link_bw
|
||||
* @param link_rate
|
||||
* @param cpu_temp
|
||||
* @param board_temp
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_telem_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t rssi, int16_t snr, uint32_t rf_freq, uint32_t link_bw, uint32_t link_rate, int16_t cpu_temp, int16_t board_temp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_TELEM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, rf_freq);
|
||||
_mav_put_uint32_t(buf, 4, link_bw);
|
||||
_mav_put_uint32_t(buf, 8, link_rate);
|
||||
_mav_put_int16_t(buf, 12, snr);
|
||||
_mav_put_int16_t(buf, 14, cpu_temp);
|
||||
_mav_put_int16_t(buf, 16, board_temp);
|
||||
_mav_put_uint8_t(buf, 18, rssi);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HERELINK_TELEM_LEN);
|
||||
#else
|
||||
mavlink_herelink_telem_t packet;
|
||||
packet.rf_freq = rf_freq;
|
||||
packet.link_bw = link_bw;
|
||||
packet.link_rate = link_rate;
|
||||
packet.snr = snr;
|
||||
packet.cpu_temp = cpu_temp;
|
||||
packet.board_temp = board_temp;
|
||||
packet.rssi = rssi;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HERELINK_TELEM_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HERELINK_TELEM;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a herelink_telem 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 rssi
|
||||
* @param snr
|
||||
* @param rf_freq
|
||||
* @param link_bw
|
||||
* @param link_rate
|
||||
* @param cpu_temp
|
||||
* @param board_temp
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_telem_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t rssi,int16_t snr,uint32_t rf_freq,uint32_t link_bw,uint32_t link_rate,int16_t cpu_temp,int16_t board_temp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_TELEM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, rf_freq);
|
||||
_mav_put_uint32_t(buf, 4, link_bw);
|
||||
_mav_put_uint32_t(buf, 8, link_rate);
|
||||
_mav_put_int16_t(buf, 12, snr);
|
||||
_mav_put_int16_t(buf, 14, cpu_temp);
|
||||
_mav_put_int16_t(buf, 16, board_temp);
|
||||
_mav_put_uint8_t(buf, 18, rssi);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HERELINK_TELEM_LEN);
|
||||
#else
|
||||
mavlink_herelink_telem_t packet;
|
||||
packet.rf_freq = rf_freq;
|
||||
packet.link_bw = link_bw;
|
||||
packet.link_rate = link_rate;
|
||||
packet.snr = snr;
|
||||
packet.cpu_temp = cpu_temp;
|
||||
packet.board_temp = board_temp;
|
||||
packet.rssi = rssi;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HERELINK_TELEM_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HERELINK_TELEM;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a herelink_telem 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 herelink_telem C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_telem_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_herelink_telem_t* herelink_telem)
|
||||
{
|
||||
return mavlink_msg_herelink_telem_pack(system_id, component_id, msg, herelink_telem->rssi, herelink_telem->snr, herelink_telem->rf_freq, herelink_telem->link_bw, herelink_telem->link_rate, herelink_telem->cpu_temp, herelink_telem->board_temp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a herelink_telem 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 herelink_telem C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_telem_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_herelink_telem_t* herelink_telem)
|
||||
{
|
||||
return mavlink_msg_herelink_telem_pack_chan(system_id, component_id, chan, msg, herelink_telem->rssi, herelink_telem->snr, herelink_telem->rf_freq, herelink_telem->link_bw, herelink_telem->link_rate, herelink_telem->cpu_temp, herelink_telem->board_temp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a herelink_telem message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param rssi
|
||||
* @param snr
|
||||
* @param rf_freq
|
||||
* @param link_bw
|
||||
* @param link_rate
|
||||
* @param cpu_temp
|
||||
* @param board_temp
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_herelink_telem_send(mavlink_channel_t chan, uint8_t rssi, int16_t snr, uint32_t rf_freq, uint32_t link_bw, uint32_t link_rate, int16_t cpu_temp, int16_t board_temp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_TELEM_LEN];
|
||||
_mav_put_uint32_t(buf, 0, rf_freq);
|
||||
_mav_put_uint32_t(buf, 4, link_bw);
|
||||
_mav_put_uint32_t(buf, 8, link_rate);
|
||||
_mav_put_int16_t(buf, 12, snr);
|
||||
_mav_put_int16_t(buf, 14, cpu_temp);
|
||||
_mav_put_int16_t(buf, 16, board_temp);
|
||||
_mav_put_uint8_t(buf, 18, rssi);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_TELEM, buf, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
#else
|
||||
mavlink_herelink_telem_t packet;
|
||||
packet.rf_freq = rf_freq;
|
||||
packet.link_bw = link_bw;
|
||||
packet.link_rate = link_rate;
|
||||
packet.snr = snr;
|
||||
packet.cpu_temp = cpu_temp;
|
||||
packet.board_temp = board_temp;
|
||||
packet.rssi = rssi;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_TELEM, (const char *)&packet, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a herelink_telem message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_herelink_telem_send_struct(mavlink_channel_t chan, const mavlink_herelink_telem_t* herelink_telem)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_herelink_telem_send(chan, herelink_telem->rssi, herelink_telem->snr, herelink_telem->rf_freq, herelink_telem->link_bw, herelink_telem->link_rate, herelink_telem->cpu_temp, herelink_telem->board_temp);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_TELEM, (const char *)herelink_telem, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_HERELINK_TELEM_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_herelink_telem_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t rssi, int16_t snr, uint32_t rf_freq, uint32_t link_bw, uint32_t link_rate, int16_t cpu_temp, int16_t board_temp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint32_t(buf, 0, rf_freq);
|
||||
_mav_put_uint32_t(buf, 4, link_bw);
|
||||
_mav_put_uint32_t(buf, 8, link_rate);
|
||||
_mav_put_int16_t(buf, 12, snr);
|
||||
_mav_put_int16_t(buf, 14, cpu_temp);
|
||||
_mav_put_int16_t(buf, 16, board_temp);
|
||||
_mav_put_uint8_t(buf, 18, rssi);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_TELEM, buf, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
#else
|
||||
mavlink_herelink_telem_t *packet = (mavlink_herelink_telem_t *)msgbuf;
|
||||
packet->rf_freq = rf_freq;
|
||||
packet->link_bw = link_bw;
|
||||
packet->link_rate = link_rate;
|
||||
packet->snr = snr;
|
||||
packet->cpu_temp = cpu_temp;
|
||||
packet->board_temp = board_temp;
|
||||
packet->rssi = rssi;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_TELEM, (const char *)packet, MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_LEN, MAVLINK_MSG_ID_HERELINK_TELEM_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HERELINK_TELEM UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field rssi from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_herelink_telem_get_rssi(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 18);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field snr from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline int16_t mavlink_msg_herelink_telem_get_snr(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field rf_freq from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_herelink_telem_get_rf_freq(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field link_bw from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_herelink_telem_get_link_bw(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field link_rate from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_herelink_telem_get_link_rate(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field cpu_temp from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline int16_t mavlink_msg_herelink_telem_get_cpu_temp(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field board_temp from herelink_telem message
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static inline int16_t mavlink_msg_herelink_telem_get_board_temp(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a herelink_telem message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param herelink_telem C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_herelink_telem_decode(const mavlink_message_t* msg, mavlink_herelink_telem_t* herelink_telem)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
herelink_telem->rf_freq = mavlink_msg_herelink_telem_get_rf_freq(msg);
|
||||
herelink_telem->link_bw = mavlink_msg_herelink_telem_get_link_bw(msg);
|
||||
herelink_telem->link_rate = mavlink_msg_herelink_telem_get_link_rate(msg);
|
||||
herelink_telem->snr = mavlink_msg_herelink_telem_get_snr(msg);
|
||||
herelink_telem->cpu_temp = mavlink_msg_herelink_telem_get_cpu_temp(msg);
|
||||
herelink_telem->board_temp = mavlink_msg_herelink_telem_get_board_temp(msg);
|
||||
herelink_telem->rssi = mavlink_msg_herelink_telem_get_rssi(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_HERELINK_TELEM_LEN? msg->len : MAVLINK_MSG_ID_HERELINK_TELEM_LEN;
|
||||
memset(herelink_telem, 0, MAVLINK_MSG_ID_HERELINK_TELEM_LEN);
|
||||
memcpy(herelink_telem, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,380 @@
|
||||
#pragma once
|
||||
// MESSAGE HERELINK_VIDEO_STREAM_INFORMATION PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION 50002
|
||||
|
||||
|
||||
typedef struct __mavlink_herelink_video_stream_information_t {
|
||||
float framerate; /*< [Hz] Frame rate.*/
|
||||
uint32_t bitrate; /*< [bits/s] Bit rate.*/
|
||||
uint16_t resolution_h; /*< [pix] Horizontal resolution.*/
|
||||
uint16_t resolution_v; /*< [pix] Vertical resolution.*/
|
||||
uint16_t rotation; /*< [deg] Video image rotation clockwise.*/
|
||||
uint8_t camera_id; /*< Video Stream ID (1 for first, 2 for second, etc.)*/
|
||||
uint8_t status; /*< Number of streams available.*/
|
||||
char uri[230]; /*< Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).*/
|
||||
} mavlink_herelink_video_stream_information_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN 246
|
||||
#define MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN 246
|
||||
#define MAVLINK_MSG_ID_50002_LEN 246
|
||||
#define MAVLINK_MSG_ID_50002_MIN_LEN 246
|
||||
|
||||
#define MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC 181
|
||||
#define MAVLINK_MSG_ID_50002_CRC 181
|
||||
|
||||
#define MAVLINK_MSG_HERELINK_VIDEO_STREAM_INFORMATION_FIELD_URI_LEN 230
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION { \
|
||||
50002, \
|
||||
"HERELINK_VIDEO_STREAM_INFORMATION", \
|
||||
8, \
|
||||
{ { "camera_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_herelink_video_stream_information_t, camera_id) }, \
|
||||
{ "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_herelink_video_stream_information_t, status) }, \
|
||||
{ "framerate", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_herelink_video_stream_information_t, framerate) }, \
|
||||
{ "resolution_h", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_herelink_video_stream_information_t, resolution_h) }, \
|
||||
{ "resolution_v", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_herelink_video_stream_information_t, resolution_v) }, \
|
||||
{ "bitrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_herelink_video_stream_information_t, bitrate) }, \
|
||||
{ "rotation", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_herelink_video_stream_information_t, rotation) }, \
|
||||
{ "uri", NULL, MAVLINK_TYPE_CHAR, 230, 16, offsetof(mavlink_herelink_video_stream_information_t, uri) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION { \
|
||||
"HERELINK_VIDEO_STREAM_INFORMATION", \
|
||||
8, \
|
||||
{ { "camera_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_herelink_video_stream_information_t, camera_id) }, \
|
||||
{ "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_herelink_video_stream_information_t, status) }, \
|
||||
{ "framerate", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_herelink_video_stream_information_t, framerate) }, \
|
||||
{ "resolution_h", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_herelink_video_stream_information_t, resolution_h) }, \
|
||||
{ "resolution_v", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_herelink_video_stream_information_t, resolution_v) }, \
|
||||
{ "bitrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_herelink_video_stream_information_t, bitrate) }, \
|
||||
{ "rotation", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_herelink_video_stream_information_t, rotation) }, \
|
||||
{ "uri", NULL, MAVLINK_TYPE_CHAR, 230, 16, offsetof(mavlink_herelink_video_stream_information_t, uri) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a herelink_video_stream_information 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 camera_id Video Stream ID (1 for first, 2 for second, etc.)
|
||||
* @param status Number of streams available.
|
||||
* @param framerate [Hz] Frame rate.
|
||||
* @param resolution_h [pix] Horizontal resolution.
|
||||
* @param resolution_v [pix] Vertical resolution.
|
||||
* @param bitrate [bits/s] Bit rate.
|
||||
* @param rotation [deg] Video image rotation clockwise.
|
||||
* @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t camera_id, uint8_t status, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, const char *uri)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN];
|
||||
_mav_put_float(buf, 0, framerate);
|
||||
_mav_put_uint32_t(buf, 4, bitrate);
|
||||
_mav_put_uint16_t(buf, 8, resolution_h);
|
||||
_mav_put_uint16_t(buf, 10, resolution_v);
|
||||
_mav_put_uint16_t(buf, 12, rotation);
|
||||
_mav_put_uint8_t(buf, 14, camera_id);
|
||||
_mav_put_uint8_t(buf, 15, status);
|
||||
_mav_put_char_array(buf, 16, uri, 230);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN);
|
||||
#else
|
||||
mavlink_herelink_video_stream_information_t packet;
|
||||
packet.framerate = framerate;
|
||||
packet.bitrate = bitrate;
|
||||
packet.resolution_h = resolution_h;
|
||||
packet.resolution_v = resolution_v;
|
||||
packet.rotation = rotation;
|
||||
packet.camera_id = camera_id;
|
||||
packet.status = status;
|
||||
mav_array_memcpy(packet.uri, uri, sizeof(char)*230);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a herelink_video_stream_information 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 camera_id Video Stream ID (1 for first, 2 for second, etc.)
|
||||
* @param status Number of streams available.
|
||||
* @param framerate [Hz] Frame rate.
|
||||
* @param resolution_h [pix] Horizontal resolution.
|
||||
* @param resolution_v [pix] Vertical resolution.
|
||||
* @param bitrate [bits/s] Bit rate.
|
||||
* @param rotation [deg] Video image rotation clockwise.
|
||||
* @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t camera_id,uint8_t status,float framerate,uint16_t resolution_h,uint16_t resolution_v,uint32_t bitrate,uint16_t rotation,const char *uri)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN];
|
||||
_mav_put_float(buf, 0, framerate);
|
||||
_mav_put_uint32_t(buf, 4, bitrate);
|
||||
_mav_put_uint16_t(buf, 8, resolution_h);
|
||||
_mav_put_uint16_t(buf, 10, resolution_v);
|
||||
_mav_put_uint16_t(buf, 12, rotation);
|
||||
_mav_put_uint8_t(buf, 14, camera_id);
|
||||
_mav_put_uint8_t(buf, 15, status);
|
||||
_mav_put_char_array(buf, 16, uri, 230);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN);
|
||||
#else
|
||||
mavlink_herelink_video_stream_information_t packet;
|
||||
packet.framerate = framerate;
|
||||
packet.bitrate = bitrate;
|
||||
packet.resolution_h = resolution_h;
|
||||
packet.resolution_v = resolution_v;
|
||||
packet.rotation = rotation;
|
||||
packet.camera_id = camera_id;
|
||||
packet.status = status;
|
||||
mav_array_memcpy(packet.uri, uri, sizeof(char)*230);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a herelink_video_stream_information 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 herelink_video_stream_information C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_herelink_video_stream_information_t* herelink_video_stream_information)
|
||||
{
|
||||
return mavlink_msg_herelink_video_stream_information_pack(system_id, component_id, msg, herelink_video_stream_information->camera_id, herelink_video_stream_information->status, herelink_video_stream_information->framerate, herelink_video_stream_information->resolution_h, herelink_video_stream_information->resolution_v, herelink_video_stream_information->bitrate, herelink_video_stream_information->rotation, herelink_video_stream_information->uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a herelink_video_stream_information 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 herelink_video_stream_information C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_herelink_video_stream_information_t* herelink_video_stream_information)
|
||||
{
|
||||
return mavlink_msg_herelink_video_stream_information_pack_chan(system_id, component_id, chan, msg, herelink_video_stream_information->camera_id, herelink_video_stream_information->status, herelink_video_stream_information->framerate, herelink_video_stream_information->resolution_h, herelink_video_stream_information->resolution_v, herelink_video_stream_information->bitrate, herelink_video_stream_information->rotation, herelink_video_stream_information->uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a herelink_video_stream_information message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param camera_id Video Stream ID (1 for first, 2 for second, etc.)
|
||||
* @param status Number of streams available.
|
||||
* @param framerate [Hz] Frame rate.
|
||||
* @param resolution_h [pix] Horizontal resolution.
|
||||
* @param resolution_v [pix] Vertical resolution.
|
||||
* @param bitrate [bits/s] Bit rate.
|
||||
* @param rotation [deg] Video image rotation clockwise.
|
||||
* @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_herelink_video_stream_information_send(mavlink_channel_t chan, uint8_t camera_id, uint8_t status, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, const char *uri)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN];
|
||||
_mav_put_float(buf, 0, framerate);
|
||||
_mav_put_uint32_t(buf, 4, bitrate);
|
||||
_mav_put_uint16_t(buf, 8, resolution_h);
|
||||
_mav_put_uint16_t(buf, 10, resolution_v);
|
||||
_mav_put_uint16_t(buf, 12, rotation);
|
||||
_mav_put_uint8_t(buf, 14, camera_id);
|
||||
_mav_put_uint8_t(buf, 15, status);
|
||||
_mav_put_char_array(buf, 16, uri, 230);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION, buf, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
#else
|
||||
mavlink_herelink_video_stream_information_t packet;
|
||||
packet.framerate = framerate;
|
||||
packet.bitrate = bitrate;
|
||||
packet.resolution_h = resolution_h;
|
||||
packet.resolution_v = resolution_v;
|
||||
packet.rotation = rotation;
|
||||
packet.camera_id = camera_id;
|
||||
packet.status = status;
|
||||
mav_array_memcpy(packet.uri, uri, sizeof(char)*230);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a herelink_video_stream_information message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_herelink_video_stream_information_send_struct(mavlink_channel_t chan, const mavlink_herelink_video_stream_information_t* herelink_video_stream_information)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_herelink_video_stream_information_send(chan, herelink_video_stream_information->camera_id, herelink_video_stream_information->status, herelink_video_stream_information->framerate, herelink_video_stream_information->resolution_h, herelink_video_stream_information->resolution_v, herelink_video_stream_information->bitrate, herelink_video_stream_information->rotation, herelink_video_stream_information->uri);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION, (const char *)herelink_video_stream_information, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_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_herelink_video_stream_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t camera_id, uint8_t status, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, const char *uri)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, framerate);
|
||||
_mav_put_uint32_t(buf, 4, bitrate);
|
||||
_mav_put_uint16_t(buf, 8, resolution_h);
|
||||
_mav_put_uint16_t(buf, 10, resolution_v);
|
||||
_mav_put_uint16_t(buf, 12, rotation);
|
||||
_mav_put_uint8_t(buf, 14, camera_id);
|
||||
_mav_put_uint8_t(buf, 15, status);
|
||||
_mav_put_char_array(buf, 16, uri, 230);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION, buf, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
#else
|
||||
mavlink_herelink_video_stream_information_t *packet = (mavlink_herelink_video_stream_information_t *)msgbuf;
|
||||
packet->framerate = framerate;
|
||||
packet->bitrate = bitrate;
|
||||
packet->resolution_h = resolution_h;
|
||||
packet->resolution_v = resolution_v;
|
||||
packet->rotation = rotation;
|
||||
packet->camera_id = camera_id;
|
||||
packet->status = status;
|
||||
mav_array_memcpy(packet->uri, uri, sizeof(char)*230);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HERELINK_VIDEO_STREAM_INFORMATION UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field camera_id from herelink_video_stream_information message
|
||||
*
|
||||
* @return Video Stream ID (1 for first, 2 for second, etc.)
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_herelink_video_stream_information_get_camera_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field status from herelink_video_stream_information message
|
||||
*
|
||||
* @return Number of streams available.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_herelink_video_stream_information_get_status(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field framerate from herelink_video_stream_information message
|
||||
*
|
||||
* @return [Hz] Frame rate.
|
||||
*/
|
||||
static inline float mavlink_msg_herelink_video_stream_information_get_framerate(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field resolution_h from herelink_video_stream_information message
|
||||
*
|
||||
* @return [pix] Horizontal resolution.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_get_resolution_h(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field resolution_v from herelink_video_stream_information message
|
||||
*
|
||||
* @return [pix] Vertical resolution.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_get_resolution_v(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field bitrate from herelink_video_stream_information message
|
||||
*
|
||||
* @return [bits/s] Bit rate.
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_herelink_video_stream_information_get_bitrate(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field rotation from herelink_video_stream_information message
|
||||
*
|
||||
* @return [deg] Video image rotation clockwise.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_get_rotation(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field uri from herelink_video_stream_information message
|
||||
*
|
||||
* @return Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_herelink_video_stream_information_get_uri(const mavlink_message_t* msg, char *uri)
|
||||
{
|
||||
return _MAV_RETURN_char_array(msg, uri, 230, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a herelink_video_stream_information message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param herelink_video_stream_information C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_herelink_video_stream_information_decode(const mavlink_message_t* msg, mavlink_herelink_video_stream_information_t* herelink_video_stream_information)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
herelink_video_stream_information->framerate = mavlink_msg_herelink_video_stream_information_get_framerate(msg);
|
||||
herelink_video_stream_information->bitrate = mavlink_msg_herelink_video_stream_information_get_bitrate(msg);
|
||||
herelink_video_stream_information->resolution_h = mavlink_msg_herelink_video_stream_information_get_resolution_h(msg);
|
||||
herelink_video_stream_information->resolution_v = mavlink_msg_herelink_video_stream_information_get_resolution_v(msg);
|
||||
herelink_video_stream_information->rotation = mavlink_msg_herelink_video_stream_information_get_rotation(msg);
|
||||
herelink_video_stream_information->camera_id = mavlink_msg_herelink_video_stream_information_get_camera_id(msg);
|
||||
herelink_video_stream_information->status = mavlink_msg_herelink_video_stream_information_get_status(msg);
|
||||
mavlink_msg_herelink_video_stream_information_get_uri(msg, herelink_video_stream_information->uri);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN;
|
||||
memset(herelink_video_stream_information, 0, MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_LEN);
|
||||
memcpy(herelink_video_stream_information, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
/** @file
|
||||
* @brief MAVLink comm protocol testsuite generated from cubepilot.xml
|
||||
* @see https://mavlink.io/en/
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef CUBEPILOT_TESTSUITE_H
|
||||
#define CUBEPILOT_TESTSUITE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MAVLINK_TEST_ALL
|
||||
#define MAVLINK_TEST_ALL
|
||||
static void mavlink_test_common(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_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_test_common(system_id, component_id, last_msg);
|
||||
mavlink_test_cubepilot(system_id, component_id, last_msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "../common/testsuite.h"
|
||||
|
||||
|
||||
static void mavlink_test_cubepilot_raw_rc(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_CUBEPILOT_RAW_RC >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_cubepilot_raw_rc_t packet_in = {
|
||||
{ 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 }
|
||||
};
|
||||
mavlink_cubepilot_raw_rc_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
|
||||
mav_array_memcpy(packet1.rc_raw, packet_in.rc_raw, sizeof(uint8_t)*32);
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CUBEPILOT_RAW_RC_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_raw_rc_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_cubepilot_raw_rc_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_raw_rc_pack(system_id, component_id, &msg , packet1.rc_raw );
|
||||
mavlink_msg_cubepilot_raw_rc_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_raw_rc_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.rc_raw );
|
||||
mavlink_msg_cubepilot_raw_rc_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_cubepilot_raw_rc_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_raw_rc_send(MAVLINK_COMM_1 , packet1.rc_raw );
|
||||
mavlink_msg_cubepilot_raw_rc_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("CUBEPILOT_RAW_RC") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_CUBEPILOT_RAW_RC) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_herelink_video_stream_information(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_HERELINK_VIDEO_STREAM_INFORMATION >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_herelink_video_stream_information_t packet_in = {
|
||||
17.0,963497672,17651,17755,17859,175,242,"QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJK"
|
||||
};
|
||||
mavlink_herelink_video_stream_information_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.framerate = packet_in.framerate;
|
||||
packet1.bitrate = packet_in.bitrate;
|
||||
packet1.resolution_h = packet_in.resolution_h;
|
||||
packet1.resolution_v = packet_in.resolution_v;
|
||||
packet1.rotation = packet_in.rotation;
|
||||
packet1.camera_id = packet_in.camera_id;
|
||||
packet1.status = packet_in.status;
|
||||
|
||||
mav_array_memcpy(packet1.uri, packet_in.uri, sizeof(char)*230);
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_video_stream_information_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_herelink_video_stream_information_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_video_stream_information_pack(system_id, component_id, &msg , packet1.camera_id , packet1.status , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.uri );
|
||||
mavlink_msg_herelink_video_stream_information_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_video_stream_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.camera_id , packet1.status , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.uri );
|
||||
mavlink_msg_herelink_video_stream_information_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_herelink_video_stream_information_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_video_stream_information_send(MAVLINK_COMM_1 , packet1.camera_id , packet1.status , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.uri );
|
||||
mavlink_msg_herelink_video_stream_information_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("HERELINK_VIDEO_STREAM_INFORMATION") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_HERELINK_VIDEO_STREAM_INFORMATION) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_herelink_telem(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_HERELINK_TELEM >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_herelink_telem_t packet_in = {
|
||||
963497464,963497672,963497880,17859,17963,18067,187
|
||||
};
|
||||
mavlink_herelink_telem_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.rf_freq = packet_in.rf_freq;
|
||||
packet1.link_bw = packet_in.link_bw;
|
||||
packet1.link_rate = packet_in.link_rate;
|
||||
packet1.snr = packet_in.snr;
|
||||
packet1.cpu_temp = packet_in.cpu_temp;
|
||||
packet1.board_temp = packet_in.board_temp;
|
||||
packet1.rssi = packet_in.rssi;
|
||||
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_HERELINK_TELEM_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_telem_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_herelink_telem_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_telem_pack(system_id, component_id, &msg , packet1.rssi , packet1.snr , packet1.rf_freq , packet1.link_bw , packet1.link_rate , packet1.cpu_temp , packet1.board_temp );
|
||||
mavlink_msg_herelink_telem_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_telem_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.rssi , packet1.snr , packet1.rf_freq , packet1.link_bw , packet1.link_rate , packet1.cpu_temp , packet1.board_temp );
|
||||
mavlink_msg_herelink_telem_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_herelink_telem_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_herelink_telem_send(MAVLINK_COMM_1 , packet1.rssi , packet1.snr , packet1.rf_freq , packet1.link_bw , packet1.link_rate , packet1.cpu_temp , packet1.board_temp );
|
||||
mavlink_msg_herelink_telem_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("HERELINK_TELEM") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_HERELINK_TELEM) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_cubepilot_firmware_update_start(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_CUBEPILOT_FIRMWARE_UPDATE_START >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_cubepilot_firmware_update_start_t packet_in = {
|
||||
963497464,963497672,29,96
|
||||
};
|
||||
mavlink_cubepilot_firmware_update_start_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.size = packet_in.size;
|
||||
packet1.crc = packet_in.crc;
|
||||
packet1.target_system = packet_in.target_system;
|
||||
packet1.target_component = packet_in.target_component;
|
||||
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_start_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_cubepilot_firmware_update_start_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_start_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.size , packet1.crc );
|
||||
mavlink_msg_cubepilot_firmware_update_start_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_start_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.size , packet1.crc );
|
||||
mavlink_msg_cubepilot_firmware_update_start_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_cubepilot_firmware_update_start_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_start_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.size , packet1.crc );
|
||||
mavlink_msg_cubepilot_firmware_update_start_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("CUBEPILOT_FIRMWARE_UPDATE_START") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_START) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_cubepilot_firmware_update_resp(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_CUBEPILOT_FIRMWARE_UPDATE_RESP >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_cubepilot_firmware_update_resp_t packet_in = {
|
||||
963497464,17,84
|
||||
};
|
||||
mavlink_cubepilot_firmware_update_resp_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.offset = packet_in.offset;
|
||||
packet1.target_system = packet_in.target_system;
|
||||
packet1.target_component = packet_in.target_component;
|
||||
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_resp_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_cubepilot_firmware_update_resp_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_resp_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.offset );
|
||||
mavlink_msg_cubepilot_firmware_update_resp_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_resp_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.offset );
|
||||
mavlink_msg_cubepilot_firmware_update_resp_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_cubepilot_firmware_update_resp_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_cubepilot_firmware_update_resp_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.offset );
|
||||
mavlink_msg_cubepilot_firmware_update_resp_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("CUBEPILOT_FIRMWARE_UPDATE_RESP") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_CUBEPILOT_FIRMWARE_UPDATE_RESP) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_cubepilot(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_test_cubepilot_raw_rc(system_id, component_id, last_msg);
|
||||
mavlink_test_herelink_video_stream_information(system_id, component_id, last_msg);
|
||||
mavlink_test_herelink_telem(system_id, component_id, last_msg);
|
||||
mavlink_test_cubepilot_firmware_update_start(system_id, component_id, last_msg);
|
||||
mavlink_test_cubepilot_firmware_update_resp(system_id, component_id, last_msg);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // CUBEPILOT_TESTSUITE_H
|
||||
@@ -0,0 +1,14 @@
|
||||
/** @file
|
||||
* @brief MAVLink comm protocol built from cubepilot.xml
|
||||
* @see http://mavlink.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
#endif // MAVLINK_VERSION_H
|
||||
@@ -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 -7614747750443371587
|
||||
#define MAVLINK_DEVELOPMENT_XML_HASH 7597601190971374030
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -7614747750443371587
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7597601190971374030
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
+1
-1
@@ -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 -6350926547326151484
|
||||
#define MAVLINK_ICAROUS_XML_HASH 9186038958128277474
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -6350926547326151484
|
||||
#define MAVLINK_PRIMARY_XML_HASH 9186038958128277474
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 46
|
||||
|
||||
|
||||
@@ -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 7068000926374897462
|
||||
#define MAVLINK_MATRIXPILOT_XML_HASH -1908332711372625408
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7068000926374897462
|
||||
#define MAVLINK_PRIMARY_XML_HASH -1908332711372625408
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -29,5 +29,10 @@
|
||||
commands: 60050 - 60099
|
||||
-->
|
||||
<include>AVSSUAS.xml</include>
|
||||
<!-- Herelink.xml range of IDs:
|
||||
messages: 50000 - 50099
|
||||
commands: 50000 - 50099
|
||||
-->
|
||||
<include>cubepilot.xml</include>
|
||||
<messages/>
|
||||
</mavlink>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<!-- Vendors -->
|
||||
<include>uAvionix.xml</include>
|
||||
<include>icarous.xml</include>
|
||||
<include>cubepilot.xml</include>
|
||||
<dialect>2</dialect>
|
||||
<!-- Note that ArduPilot-specific messages should use the command id range from 150 to 250, to leave plenty of room for growth of common.xml If you prototype a message here, then you should consider if it is general enough to move into common.xml later -->
|
||||
<enums>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<!-- Cubepilot contact info: -->
|
||||
<!-- company URL: http://www.cubepilot.com -->
|
||||
<!-- email contact: siddharth@cubepilot.com or michael@cubepilot.com -->
|
||||
<!-- mavlink ID range: 50000 - 50099 -->
|
||||
<include>common.xml</include>
|
||||
<messages>
|
||||
<message id="50001" name="CUBEPILOT_RAW_RC">
|
||||
<description>Raw RC Data</description>
|
||||
<field type="uint8_t[32]" name="rc_raw"/>
|
||||
</message>
|
||||
<message id="50002" name="HERELINK_VIDEO_STREAM_INFORMATION">
|
||||
<description>Information about video stream</description>
|
||||
<field type="uint8_t" name="camera_id">Video Stream ID (1 for first, 2 for second, etc.)</field>
|
||||
<field type="uint8_t" name="status">Number of streams available.</field>
|
||||
<field type="float" name="framerate" units="Hz">Frame rate.</field>
|
||||
<field type="uint16_t" name="resolution_h" units="pix">Horizontal resolution.</field>
|
||||
<field type="uint16_t" name="resolution_v" units="pix">Vertical resolution.</field>
|
||||
<field type="uint32_t" name="bitrate" units="bits/s">Bit rate.</field>
|
||||
<field type="uint16_t" name="rotation" units="deg">Video image rotation clockwise.</field>
|
||||
<field type="char[230]" name="uri">Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).</field>
|
||||
</message>
|
||||
<message id="50003" name="HERELINK_TELEM">
|
||||
<description>Herelink Telemetry</description>
|
||||
<field type="uint8_t" name="rssi"/>
|
||||
<field type="int16_t" name="snr"/>
|
||||
<field type="uint32_t" name="rf_freq"/>
|
||||
<field type="uint32_t" name="link_bw"/>
|
||||
<field type="uint32_t" name="link_rate"/>
|
||||
<field type="int16_t" name="cpu_temp"/>
|
||||
<field type="int16_t" name="board_temp"/>
|
||||
</message>
|
||||
<message id="50004" name="CUBEPILOT_FIRMWARE_UPDATE_START">
|
||||
<description>Start firmware update with encapsulated data.</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="size" units="bytes">FW Size.</field>
|
||||
<field type="uint32_t" name="crc">FW CRC.</field>
|
||||
</message>
|
||||
<message id="50005" name="CUBEPILOT_FIRMWARE_UPDATE_RESP">
|
||||
<description>offset response to encapsulated data.</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="offset" units="bytes">FW Offset.</field>
|
||||
</message>
|
||||
</messages>
|
||||
</mavlink>
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -7363643031124327396
|
||||
#define MAVLINK_PRIMARY_XML_HASH -4584997880690078243
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -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 -7363643031124327396
|
||||
#define MAVLINK_MINIMAL_XML_HASH -4584997880690078243
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 5714402732302449223
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7860316091724794705
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -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 5714402732302449223
|
||||
#define MAVLINK_STANDARD_XML_HASH 7860316091724794705
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 2535647160592942379
|
||||
#define MAVLINK_PRIMARY_XML_HASH -1192066283809809135
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -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 2535647160592942379
|
||||
#define MAVLINK_TEST_XML_HASH -1192066283809809135
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -1709625083274089448
|
||||
#define MAVLINK_PRIMARY_XML_HASH -3492754819202473766
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -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 -1709625083274089448
|
||||
#define MAVLINK_UAVIONIX_XML_HASH -3492754819202473766
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed Sep 28 2022"
|
||||
#define MAVLINK_BUILD_DATE "Sun Oct 09 2022"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
Reference in New Issue
Block a user