Commit ef26942b authored by PX4BuildBot's avatar PX4BuildBot

autogenerated headers for rev...

autogenerated headers for rev https://github.com/mavlink/mavlink/tree/e75187ea031a167fa96964cf947ffd9f3805fe0b
parent 185e65c1
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -10347,6 +10347,130 @@ static void mavlink_test_statustext_long(uint8_t system_id, uint8_t component_id
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_smart_battery_info(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_SMART_BATTERY_INFO >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_smart_battery_info_t packet_in = {
963497464,963497672,963497880,17859,17963,18067,18171,18275,199,"XYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST"
};
mavlink_smart_battery_info_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.capacity_full_specification = packet_in.capacity_full_specification;
packet1.capacity_full = packet_in.capacity_full;
packet1.serial_number = packet_in.serial_number;
packet1.cycle_count = packet_in.cycle_count;
packet1.weight = packet_in.weight;
packet1.discharge_minimum_voltage = packet_in.discharge_minimum_voltage;
packet1.charging_minimum_voltage = packet_in.charging_minimum_voltage;
packet1.resting_minimum_voltage = packet_in.resting_minimum_voltage;
packet1.id = packet_in.id;
mav_array_memcpy(packet1.device_name, packet_in.device_name, sizeof(char)*50);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_info_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_smart_battery_info_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_info_pack(system_id, component_id, &msg , packet1.id , packet1.capacity_full_specification , packet1.capacity_full , packet1.cycle_count , packet1.serial_number , packet1.device_name , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage );
mavlink_msg_smart_battery_info_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_info_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.capacity_full_specification , packet1.capacity_full , packet1.cycle_count , packet1.serial_number , packet1.device_name , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage );
mavlink_msg_smart_battery_info_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_smart_battery_info_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_info_send(MAVLINK_COMM_1 , packet1.id , packet1.capacity_full_specification , packet1.capacity_full , packet1.cycle_count , packet1.serial_number , packet1.device_name , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage );
mavlink_msg_smart_battery_info_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_smart_battery_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_SMART_BATTERY_STATUS >= 256) {
return;
}
#endif
mavlink_message_t msg;
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
uint16_t i;
mavlink_smart_battery_status_t packet_in = {
963497464,963497672,17651,17755,17859,17963,18067,{ 18171, 18172, 18173, 18174, 18175, 18176, 18177, 18178, 18179, 18180, 18181, 18182, 18183, 18184, 18185, 18186 }
};
mavlink_smart_battery_status_t packet1, packet2;
memset(&packet1, 0, sizeof(packet1));
packet1.fault_bitmask = packet_in.fault_bitmask;
packet1.time_remaining = packet_in.time_remaining;
packet1.id = packet_in.id;
packet1.capacity_remaining = packet_in.capacity_remaining;
packet1.current = packet_in.current;
packet1.temperature = packet_in.temperature;
packet1.cell_offset = packet_in.cell_offset;
mav_array_memcpy(packet1.voltages, packet_in.voltages, sizeof(uint16_t)*16);
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
// cope with extensions
memset(MAVLINK_MSG_ID_SMART_BATTERY_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SMART_BATTERY_STATUS_MIN_LEN);
}
#endif
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_status_encode(system_id, component_id, &msg, &packet1);
mavlink_msg_smart_battery_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_status_pack(system_id, component_id, &msg , packet1.id , packet1.capacity_remaining , packet1.current , packet1.temperature , packet1.fault_bitmask , packet1.time_remaining , packet1.cell_offset , packet1.voltages );
mavlink_msg_smart_battery_status_decode(&msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.capacity_remaining , packet1.current , packet1.temperature , packet1.fault_bitmask , packet1.time_remaining , packet1.cell_offset , packet1.voltages );
mavlink_msg_smart_battery_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_smart_battery_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
memset(&packet2, 0, sizeof(packet2));
mavlink_msg_smart_battery_status_send(MAVLINK_COMM_1 , packet1.id , packet1.capacity_remaining , packet1.current , packet1.temperature , packet1.fault_bitmask , packet1.time_remaining , packet1.cell_offset , packet1.voltages );
mavlink_msg_smart_battery_status_decode(last_msg, &packet2);
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
}
static void mavlink_test_wheel_distance(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
{
#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
......@@ -10575,6 +10699,8 @@ static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink
mavlink_test_debug_float_array(system_id, component_id, last_msg);
mavlink_test_orbit_execution_status(system_id, component_id, last_msg);
mavlink_test_statustext_long(system_id, component_id, last_msg);
mavlink_test_smart_battery_info(system_id, component_id, last_msg);
mavlink_test_smart_battery_status(system_id, component_id, last_msg);
mavlink_test_wheel_distance(system_id, component_id, last_msg);
}
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -2629,6 +2629,27 @@
<description>Battery is charging.</description>
</entry>
</enum>
<enum name="MAV_SMART_BATTERY_FAULT">
<description>Smart battery supply status/fault flags (bitmask) for health indication.</description>
<entry value="1" name="MAV_SMART_BATTERY_FAULT_DEEP_DISCHARGE">
<description>Battery has deep discharged.</description>
</entry>
<entry value="2" name="MAV_SMART_BATTERY_FAULT_SPIKES">
<description>Voltage spikes.</description>
</entry>
<entry value="4" name="MAV_SMART_BATTERY_FAULT_SINGLE_CELL_FAIL">
<description>Single cell has failed.</description>
</entry>
<entry value="8" name="MAV_SMART_BATTERY_FAULT_OVER_CURRENT">
<description>Over-current fault.</description>
</entry>
<entry value="16" name="MAV_SMART_BATTERY_FAULT_OVER_TEMPERATURE">
<description>Over-temperature fault.</description>
</entry>
<entry value="32" name="MAV_SMART_BATTERY_FAULT_UNDER_TEMPERATURE">
<description>Under-temperature fault.</description>
</entry>
</enum>
<enum name="MAV_VTOL_STATE">
<description>Enumeration of VTOL states</description>
<entry value="0" name="MAV_VTOL_STATE_UNDEFINED">
......@@ -4434,7 +4455,7 @@
<field type="float" name="yaw_rate" units="rad/s">Angular rate in yaw axis</field>
</message>
<message id="147" name="BATTERY_STATUS">
<description>Battery information</description>
<description>Battery information. Updates GCS with flight controller battery status. Use SMART_BATTERY_* messages instead for smart batteries.</description>
<field type="uint8_t" name="id">Battery ID</field>
<field type="uint8_t" name="battery_function" enum="MAV_BATTERY_FUNCTION">Function of the battery</field>
<field type="uint8_t" name="type" enum="MAV_BATTERY_TYPE">Type (chemistry) of the battery</field>
......@@ -5057,6 +5078,35 @@
<field type="uint8_t" name="severity" enum="MAV_SEVERITY">Severity of status. Relies on the definitions within RFC-5424.</field>
<field type="char[254]" name="text">Status text message, without null termination character.</field>
</message>
<!-- Smart battery messages -->
<message id="370" name="SMART_BATTERY_INFO">
<wip/>
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
<description>Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use instead of BATTERY_STATUS for smart batteries.</description>
<field type="uint8_t" name="id">Battery ID</field>
<field type="int32_t" name="capacity_full_specification" units="mAh">Capacity when full according to manufacturer, -1: field not provided.</field>
<field type="int32_t" name="capacity_full" units="mAh">Capacity when full (accounting for battery degradation), -1: field not provided.</field>
<field type="uint16_t" name="cycle_count">Charge/discharge cycle count. -1: field not provided.</field>
<field type="int32_t" name="serial_number">Serial number. -1: field not provided.</field>
<field type="char[50]" name="device_name">Static device name. Encode as manufacturer and product names separated using an underscore.</field>
<field type="uint16_t" name="weight" units="g">Battery weight. 0: field not provided.</field>
<field type="uint16_t" name="discharge_minimum_voltage" units="mV">Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value.</field>
<field type="uint16_t" name="charging_minimum_voltage" units="mV">Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value.</field>
<field type="uint16_t" name="resting_minimum_voltage" units="mV">Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value.</field>
</message>
<message id="371" name="SMART_BATTERY_STATUS">
<wip/>
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
<description>Smart Battery information (dynamic). Use for updates from: smart battery to flight stack, flight stack to GCS. Use instead of BATTERY_STATUS for smart batteries.</description>
<field type="uint16_t" name="id">Battery ID</field>
<field type="int16_t" name="capacity_remaining" units="%">Remaining battery energy. Values: [0-100], -1: field not provided.</field>
<field type="int16_t" name="current" units="cA">Battery current (through all cells/loads). Positive if discharging, negative if charging. UINT16_MAX: field not provided.</field>
<field type="int16_t" name="temperature" units="cdegC">Battery temperature. -1: field not provided.</field>
<field type="int32_t" name="fault_bitmask" display="bitmask" enum="MAV_SMART_BATTERY_FAULT">Fault/health indications.</field>
<field type="int32_t" name="time_remaining" units="s">Estimated remaining battery time. -1: field not provided.</field>
<field type="uint16_t" default="0" name="cell_offset">The cell number of the first index in the 'voltages' array field. Using this field allows you to specify cell voltages for batteries with more than 16 cells.</field>
<field type="uint16_t[16]" name="voltages" units="mV">Individual cell voltages. Batteries with more 16 cells can use the cell_offset field to specify the cell offset for the array specified in the current message . Index values above the valid cell count for this battery should have the UINT16_MAX value.</field>
</message>
<!-- Rover specific messages -->
<message id="9000" name="WHEEL_DISTANCE">
<description>Cumulative distance traveled for each reported wheel.</description>
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179
......
......@@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Wed Feb 06 2019"
#define MAVLINK_BUILD_DATE "Thu Feb 07 2019"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment