autogenerated headers for rev https://github.com/mavlink/mavlink/tree/9e0d01df69e2f659114070db5545a35ddf61cae8
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 1564348956528287584
|
||||
#define MAVLINK_ASLUAV_XML_HASH -6541772868705121009
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 1564348956528287584
|
||||
#define MAVLINK_PRIMARY_XML_HASH -6541772868705121009
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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_AVSSUAS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_AVSSUAS_XML_HASH -573697884450990455
|
||||
#define MAVLINK_AVSSUAS_XML_HASH -8776005207536586842
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -573697884450990455
|
||||
#define MAVLINK_PRIMARY_XML_HASH -8776005207536586842
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 -4340642418134805554
|
||||
#define MAVLINK_PRIMARY_XML_HASH -8067147397418507500
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_ARDUPILOTMEGA.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_ARDUPILOTMEGA_XML_HASH -3159337362234169694
|
||||
#define MAVLINK_ARDUPILOTMEGA_XML_HASH -2335755698555088903
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -3159337362234169694
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2335755698555088903
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 -6882771240047870204
|
||||
#define MAVLINK_COMMON_XML_HASH -2507115254594802816
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -6882771240047870204
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2507115254594802816
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_CSAIRLINK.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_CSAIRLINK_XML_HASH 8139360779067703942
|
||||
#define MAVLINK_CSAIRLINK_XML_HASH -6616996978523373848
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 8139360779067703942
|
||||
#define MAVLINK_PRIMARY_XML_HASH -6616996978523373848
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 100
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_CUBEPILOT.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_CUBEPILOT_XML_HASH -2433232084146741396
|
||||
#define MAVLINK_CUBEPILOT_XML_HASH 4310364358544708291
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2433232084146741396
|
||||
#define MAVLINK_PRIMARY_XML_HASH 4310364358544708291
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -914573790972255532
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2440820273398300605
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -0,0 +1,456 @@
|
||||
#pragma once
|
||||
// MESSAGE FUEL_STATUS PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_FUEL_STATUS 371
|
||||
|
||||
|
||||
typedef struct __mavlink_fuel_status_t {
|
||||
float maximum_fuel; /*< Capacity when full. Must be provided.*/
|
||||
float consumed_fuel; /*< Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.*/
|
||||
float remaining_fuel; /*< Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.*/
|
||||
float flow_rate; /*< Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.*/
|
||||
float temperature; /*< [K] Fuel temperature. NaN: field not provided.*/
|
||||
uint32_t fuel_type; /*< Fuel type. Defines units for fuel capacity and consumption fields above.*/
|
||||
uint8_t id; /*< Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.*/
|
||||
uint8_t percent_remaining; /*< [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.*/
|
||||
} mavlink_fuel_status_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_FUEL_STATUS_LEN 26
|
||||
#define MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN 26
|
||||
#define MAVLINK_MSG_ID_371_LEN 26
|
||||
#define MAVLINK_MSG_ID_371_MIN_LEN 26
|
||||
|
||||
#define MAVLINK_MSG_ID_FUEL_STATUS_CRC 10
|
||||
#define MAVLINK_MSG_ID_371_CRC 10
|
||||
|
||||
|
||||
|
||||
#if MAVLINK_COMMAND_24BIT
|
||||
#define MAVLINK_MESSAGE_INFO_FUEL_STATUS { \
|
||||
371, \
|
||||
"FUEL_STATUS", \
|
||||
8, \
|
||||
{ { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_fuel_status_t, id) }, \
|
||||
{ "maximum_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fuel_status_t, maximum_fuel) }, \
|
||||
{ "consumed_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fuel_status_t, consumed_fuel) }, \
|
||||
{ "remaining_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fuel_status_t, remaining_fuel) }, \
|
||||
{ "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_fuel_status_t, percent_remaining) }, \
|
||||
{ "flow_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fuel_status_t, flow_rate) }, \
|
||||
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fuel_status_t, temperature) }, \
|
||||
{ "fuel_type", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_fuel_status_t, fuel_type) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_FUEL_STATUS { \
|
||||
"FUEL_STATUS", \
|
||||
8, \
|
||||
{ { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_fuel_status_t, id) }, \
|
||||
{ "maximum_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fuel_status_t, maximum_fuel) }, \
|
||||
{ "consumed_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fuel_status_t, consumed_fuel) }, \
|
||||
{ "remaining_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fuel_status_t, remaining_fuel) }, \
|
||||
{ "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_fuel_status_t, percent_remaining) }, \
|
||||
{ "flow_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fuel_status_t, flow_rate) }, \
|
||||
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fuel_status_t, temperature) }, \
|
||||
{ "fuel_type", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_fuel_status_t, fuel_type) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pack a fuel_status 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 id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
|
||||
* @param maximum_fuel Capacity when full. Must be provided.
|
||||
* @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
|
||||
* @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
|
||||
* @param temperature [K] Fuel temperature. NaN: field not provided.
|
||||
* @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, maximum_fuel);
|
||||
_mav_put_float(buf, 4, consumed_fuel);
|
||||
_mav_put_float(buf, 8, remaining_fuel);
|
||||
_mav_put_float(buf, 12, flow_rate);
|
||||
_mav_put_float(buf, 16, temperature);
|
||||
_mav_put_uint32_t(buf, 20, fuel_type);
|
||||
_mav_put_uint8_t(buf, 24, id);
|
||||
_mav_put_uint8_t(buf, 25, percent_remaining);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#else
|
||||
mavlink_fuel_status_t packet;
|
||||
packet.maximum_fuel = maximum_fuel;
|
||||
packet.consumed_fuel = consumed_fuel;
|
||||
packet.remaining_fuel = remaining_fuel;
|
||||
packet.flow_rate = flow_rate;
|
||||
packet.temperature = temperature;
|
||||
packet.fuel_type = fuel_type;
|
||||
packet.id = id;
|
||||
packet.percent_remaining = percent_remaining;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fuel_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
|
||||
* @param maximum_fuel Capacity when full. Must be provided.
|
||||
* @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
|
||||
* @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
|
||||
* @param temperature [K] Fuel temperature. NaN: field not provided.
|
||||
* @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, maximum_fuel);
|
||||
_mav_put_float(buf, 4, consumed_fuel);
|
||||
_mav_put_float(buf, 8, remaining_fuel);
|
||||
_mav_put_float(buf, 12, flow_rate);
|
||||
_mav_put_float(buf, 16, temperature);
|
||||
_mav_put_uint32_t(buf, 20, fuel_type);
|
||||
_mav_put_uint8_t(buf, 24, id);
|
||||
_mav_put_uint8_t(buf, 25, percent_remaining);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#else
|
||||
mavlink_fuel_status_t packet;
|
||||
packet.maximum_fuel = maximum_fuel;
|
||||
packet.consumed_fuel = consumed_fuel;
|
||||
packet.remaining_fuel = remaining_fuel;
|
||||
packet.flow_rate = flow_rate;
|
||||
packet.temperature = temperature;
|
||||
packet.fuel_type = fuel_type;
|
||||
packet.id = id;
|
||||
packet.percent_remaining = percent_remaining;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fuel_status 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 id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
|
||||
* @param maximum_fuel Capacity when full. Must be provided.
|
||||
* @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
|
||||
* @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
|
||||
* @param temperature [K] Fuel temperature. NaN: field not provided.
|
||||
* @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t id,float maximum_fuel,float consumed_fuel,float remaining_fuel,uint8_t percent_remaining,float flow_rate,float temperature,uint32_t fuel_type)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, maximum_fuel);
|
||||
_mav_put_float(buf, 4, consumed_fuel);
|
||||
_mav_put_float(buf, 8, remaining_fuel);
|
||||
_mav_put_float(buf, 12, flow_rate);
|
||||
_mav_put_float(buf, 16, temperature);
|
||||
_mav_put_uint32_t(buf, 20, fuel_type);
|
||||
_mav_put_uint8_t(buf, 24, id);
|
||||
_mav_put_uint8_t(buf, 25, percent_remaining);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#else
|
||||
mavlink_fuel_status_t packet;
|
||||
packet.maximum_fuel = maximum_fuel;
|
||||
packet.consumed_fuel = consumed_fuel;
|
||||
packet.remaining_fuel = remaining_fuel;
|
||||
packet.flow_rate = flow_rate;
|
||||
packet.temperature = temperature;
|
||||
packet.fuel_type = fuel_type;
|
||||
packet.id = id;
|
||||
packet.percent_remaining = percent_remaining;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fuel_status 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 fuel_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status)
|
||||
{
|
||||
return mavlink_msg_fuel_status_pack(system_id, component_id, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fuel_status 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 fuel_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status)
|
||||
{
|
||||
return mavlink_msg_fuel_status_pack_chan(system_id, component_id, chan, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fuel_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fuel_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fuel_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status)
|
||||
{
|
||||
return mavlink_msg_fuel_status_pack_status(system_id, component_id, _status, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fuel_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
|
||||
* @param maximum_fuel Capacity when full. Must be provided.
|
||||
* @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
* @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
|
||||
* @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
|
||||
* @param temperature [K] Fuel temperature. NaN: field not provided.
|
||||
* @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above.
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_fuel_status_send(mavlink_channel_t chan, uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, maximum_fuel);
|
||||
_mav_put_float(buf, 4, consumed_fuel);
|
||||
_mav_put_float(buf, 8, remaining_fuel);
|
||||
_mav_put_float(buf, 12, flow_rate);
|
||||
_mav_put_float(buf, 16, temperature);
|
||||
_mav_put_uint32_t(buf, 20, fuel_type);
|
||||
_mav_put_uint8_t(buf, 24, id);
|
||||
_mav_put_uint8_t(buf, 25, percent_remaining);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, buf, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#else
|
||||
mavlink_fuel_status_t packet;
|
||||
packet.maximum_fuel = maximum_fuel;
|
||||
packet.consumed_fuel = consumed_fuel;
|
||||
packet.remaining_fuel = remaining_fuel;
|
||||
packet.flow_rate = flow_rate;
|
||||
packet.temperature = temperature;
|
||||
packet.fuel_type = fuel_type;
|
||||
packet.id = id;
|
||||
packet.percent_remaining = percent_remaining;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)&packet, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fuel_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
* @param struct The MAVLink struct to serialize
|
||||
*/
|
||||
static inline void mavlink_msg_fuel_status_send_struct(mavlink_channel_t chan, const mavlink_fuel_status_t* fuel_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
mavlink_msg_fuel_status_send(chan, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)fuel_status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_FUEL_STATUS_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_fuel_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, maximum_fuel);
|
||||
_mav_put_float(buf, 4, consumed_fuel);
|
||||
_mav_put_float(buf, 8, remaining_fuel);
|
||||
_mav_put_float(buf, 12, flow_rate);
|
||||
_mav_put_float(buf, 16, temperature);
|
||||
_mav_put_uint32_t(buf, 20, fuel_type);
|
||||
_mav_put_uint8_t(buf, 24, id);
|
||||
_mav_put_uint8_t(buf, 25, percent_remaining);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, buf, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#else
|
||||
mavlink_fuel_status_t *packet = (mavlink_fuel_status_t *)msgbuf;
|
||||
packet->maximum_fuel = maximum_fuel;
|
||||
packet->consumed_fuel = consumed_fuel;
|
||||
packet->remaining_fuel = remaining_fuel;
|
||||
packet->flow_rate = flow_rate;
|
||||
packet->temperature = temperature;
|
||||
packet->fuel_type = fuel_type;
|
||||
packet->id = id;
|
||||
packet->percent_remaining = percent_remaining;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)packet, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE FUEL_STATUS UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field id from fuel_status message
|
||||
*
|
||||
* @return Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fuel_status_get_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field maximum_fuel from fuel_status message
|
||||
*
|
||||
* @return Capacity when full. Must be provided.
|
||||
*/
|
||||
static inline float mavlink_msg_fuel_status_get_maximum_fuel(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field consumed_fuel from fuel_status message
|
||||
*
|
||||
* @return Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
*/
|
||||
static inline float mavlink_msg_fuel_status_get_consumed_fuel(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field remaining_fuel from fuel_status message
|
||||
*
|
||||
* @return Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.
|
||||
*/
|
||||
static inline float mavlink_msg_fuel_status_get_remaining_fuel(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field percent_remaining from fuel_status message
|
||||
*
|
||||
* @return [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fuel_status_get_percent_remaining(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flow_rate from fuel_status message
|
||||
*
|
||||
* @return Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.
|
||||
*/
|
||||
static inline float mavlink_msg_fuel_status_get_flow_rate(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field temperature from fuel_status message
|
||||
*
|
||||
* @return [K] Fuel temperature. NaN: field not provided.
|
||||
*/
|
||||
static inline float mavlink_msg_fuel_status_get_temperature(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field fuel_type from fuel_status message
|
||||
*
|
||||
* @return Fuel type. Defines units for fuel capacity and consumption fields above.
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_fuel_status_get_fuel_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a fuel_status message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param fuel_status C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_fuel_status_decode(const mavlink_message_t* msg, mavlink_fuel_status_t* fuel_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
fuel_status->maximum_fuel = mavlink_msg_fuel_status_get_maximum_fuel(msg);
|
||||
fuel_status->consumed_fuel = mavlink_msg_fuel_status_get_consumed_fuel(msg);
|
||||
fuel_status->remaining_fuel = mavlink_msg_fuel_status_get_remaining_fuel(msg);
|
||||
fuel_status->flow_rate = mavlink_msg_fuel_status_get_flow_rate(msg);
|
||||
fuel_status->temperature = mavlink_msg_fuel_status_get_temperature(msg);
|
||||
fuel_status->fuel_type = mavlink_msg_fuel_status_get_fuel_type(msg);
|
||||
fuel_status->id = mavlink_msg_fuel_status_get_id(msg);
|
||||
fuel_status->percent_remaining = mavlink_msg_fuel_status_get_percent_remaining(msg);
|
||||
#else
|
||||
uint8_t len = msg->len < MAVLINK_MSG_ID_FUEL_STATUS_LEN? msg->len : MAVLINK_MSG_ID_FUEL_STATUS_LEN;
|
||||
memset(fuel_status, 0, MAVLINK_MSG_ID_FUEL_STATUS_LEN);
|
||||
memcpy(fuel_status, _MAV_PAYLOAD(msg), len);
|
||||
#endif
|
||||
}
|
||||
@@ -471,6 +471,72 @@ static void mavlink_test_battery_status_v2(uint8_t system_id, uint8_t component_
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_fuel_status(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_FUEL_STATUS >= 256) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_fuel_status_t packet_in = {
|
||||
17.0,45.0,73.0,101.0,129.0,963498504,77,144
|
||||
};
|
||||
mavlink_fuel_status_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.maximum_fuel = packet_in.maximum_fuel;
|
||||
packet1.consumed_fuel = packet_in.consumed_fuel;
|
||||
packet1.remaining_fuel = packet_in.remaining_fuel;
|
||||
packet1.flow_rate = packet_in.flow_rate;
|
||||
packet1.temperature = packet_in.temperature;
|
||||
packet1.fuel_type = packet_in.fuel_type;
|
||||
packet1.id = packet_in.id;
|
||||
packet1.percent_remaining = packet_in.percent_remaining;
|
||||
|
||||
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
|
||||
// cope with extensions
|
||||
memset(MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN);
|
||||
}
|
||||
#endif
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_fuel_status_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_fuel_status_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_fuel_status_pack(system_id, component_id, &msg , packet1.id , packet1.maximum_fuel , packet1.consumed_fuel , packet1.remaining_fuel , packet1.percent_remaining , packet1.flow_rate , packet1.temperature , packet1.fuel_type );
|
||||
mavlink_msg_fuel_status_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_fuel_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.maximum_fuel , packet1.consumed_fuel , packet1.remaining_fuel , packet1.percent_remaining , packet1.flow_rate , packet1.temperature , packet1.fuel_type );
|
||||
mavlink_msg_fuel_status_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_fuel_status_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_fuel_status_send(MAVLINK_COMM_1 , packet1.id , packet1.maximum_fuel , packet1.consumed_fuel , packet1.remaining_fuel , packet1.percent_remaining , packet1.flow_rate , packet1.temperature , packet1.fuel_type );
|
||||
mavlink_msg_fuel_status_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("FUEL_STATUS") != NULL);
|
||||
MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_FUEL_STATUS) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void mavlink_test_group_start(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
|
||||
@@ -990,6 +1056,7 @@ static void mavlink_test_development(uint8_t system_id, uint8_t component_id, ma
|
||||
mavlink_test_velocity_limits(system_id, component_id, last_msg);
|
||||
mavlink_test_figure_eight_execution_status(system_id, component_id, last_msg);
|
||||
mavlink_test_battery_status_v2(system_id, component_id, last_msg);
|
||||
mavlink_test_fuel_status(system_id, component_id, last_msg);
|
||||
mavlink_test_group_start(system_id, component_id, last_msg);
|
||||
mavlink_test_group_end(system_id, component_id, last_msg);
|
||||
mavlink_test_radio_rc_channels(system_id, component_id, last_msg);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 109785034105406979
|
||||
#define MAVLINK_ICAROUS_XML_HASH 7329501220291026514
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 109785034105406979
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7329501220291026514
|
||||
|
||||
#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 May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 3755902655004404933
|
||||
#define MAVLINK_MATRIXPILOT_XML_HASH -4993060956609340618
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 3755902655004404933
|
||||
#define MAVLINK_PRIMARY_XML_HASH -4993060956609340618
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -409,6 +409,18 @@
|
||||
<description>Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
<enum name="MAV_FUEL_TYPE">
|
||||
<description>Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.</description>
|
||||
<entry value="0" name="MAV_FUEL_TYPE_UNKNOWN">
|
||||
<description>Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1.</description>
|
||||
</entry>
|
||||
<entry value="1" name="MAV_FUEL_TYPE_LIQUID">
|
||||
<description>A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second.</description>
|
||||
</entry>
|
||||
<entry value="2" name="MAV_FUEL_TYPE_GAS">
|
||||
<description>A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).</description>
|
||||
</entry>
|
||||
</enum>
|
||||
</enums>
|
||||
<messages>
|
||||
<!-- Transactions for parameter protocol -->
|
||||
@@ -490,6 +502,30 @@
|
||||
<field type="uint8_t" name="percent_remaining" units="%" invalid="UINT8_MAX">Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided.</field>
|
||||
<field type="uint32_t" name="status_flags" display="bitmask" enum="MAV_BATTERY_STATUS_FLAGS">Fault, health, readiness, and other status indications.</field>
|
||||
</message>
|
||||
<message id="371" name="FUEL_STATUS">
|
||||
<description>Fuel status.
|
||||
This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot.
|
||||
The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.
|
||||
|
||||
The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.
|
||||
A recipient can assume that if these fields are supplied they are accurate.
|
||||
If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).
|
||||
Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).
|
||||
|
||||
This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.
|
||||
If both messages are sent for the same fuel system, the ids and corresponding information must match.
|
||||
|
||||
This should be streamed (nominally at 0.1 Hz).
|
||||
</description>
|
||||
<field type="uint8_t" name="id" instance="true">Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.</field>
|
||||
<field type="float" name="maximum_fuel">Capacity when full. Must be provided.</field>
|
||||
<field type="float" name="consumed_fuel" invalid="NaN">Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.</field>
|
||||
<field type="float" name="remaining_fuel" invalid="NaN">Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.</field>
|
||||
<field type="uint8_t" name="percent_remaining" units="%" invalid="UINT8_MAX">Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.</field>
|
||||
<field type="float" name="flow_rate" invalid="NaN">Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.</field>
|
||||
<field type="float" name="temperature" units="K" invalid="NaN">Fuel temperature. NaN: field not provided.</field>
|
||||
<field type="uint32_t" name="fuel_type" enum="MAV_FUEL_TYPE">Fuel type. Defines units for fuel capacity and consumption fields above.</field>
|
||||
</message>
|
||||
<message id="414" name="GROUP_START">
|
||||
<description>Emitted during mission execution when control reaches MAV_CMD_GROUP_START.</description>
|
||||
<field type="uint32_t" name="group_id">Mission-unique group id (from MAV_CMD_GROUP_START).</field>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 7244173003633260163
|
||||
#define MAVLINK_PRIMARY_XML_HASH -4486119638139692020
|
||||
|
||||
#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 7244173003633260163
|
||||
#define MAVLINK_MINIMAL_XML_HASH -4486119638139692020
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 4559888737174677714
|
||||
#define MAVLINK_PRIMARY_XML_HASH 2278515315515041144
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_PAPARAZZI.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_PAPARAZZI_XML_HASH 4559888737174677714
|
||||
#define MAVLINK_PAPARAZZI_XML_HASH 2278515315515041144
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 916318866392249816
|
||||
#define MAVLINK_PRIMARY_XML_HASH 3180917487204977957
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_PYTHON_ARRAY_TEST.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_PYTHON_ARRAY_TEST_XML_HASH 916318866392249816
|
||||
#define MAVLINK_PYTHON_ARRAY_TEST_XML_HASH 3180917487204977957
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 -3574266077679364452
|
||||
#define MAVLINK_PRIMARY_XML_HASH 4035577038607407754
|
||||
|
||||
#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 -3574266077679364452
|
||||
#define MAVLINK_STANDARD_XML_HASH 4035577038607407754
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 -919099918694837453
|
||||
#define MAVLINK_PRIMARY_XML_HASH 6698136048858395700
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_STORM32.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_STORM32_XML_HASH -919099918694837453
|
||||
#define MAVLINK_STORM32_XML_HASH 6698136048858395700
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 3992521128692192115
|
||||
#define MAVLINK_PRIMARY_XML_HASH 8121161143040758619
|
||||
|
||||
#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 3992521128692192115
|
||||
#define MAVLINK_TEST_XML_HASH 8121161143040758619
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 -5638051383304302043
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2319508950988403584
|
||||
|
||||
#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 -5638051383304302043
|
||||
#define MAVLINK_UAVIONIX_XML_HASH -2319508950988403584
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#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 3731162010634385863
|
||||
#define MAVLINK_PRIMARY_XML_HASH -5024866509969937175
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_UALBERTA.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_UALBERTA_XML_HASH 3731162010634385863
|
||||
#define MAVLINK_UALBERTA_XML_HASH -5024866509969937175
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Wed May 29 2024"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jun 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
Reference in New Issue
Block a user