diff --git a/mavlink_lib/pyxis/mavlink.h b/mavlink_lib/pyxis/mavlink.h index 2e599f4c161749bab29ba1afd8356ec2fc89f0ef..1fdb9d16ea298c571be1611393b9a2684d7fcf98 100644 --- a/mavlink_lib/pyxis/mavlink.h +++ b/mavlink_lib/pyxis/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH -5196227653783556587 +#define MAVLINK_PRIMARY_XML_HASH 9187167560255685157 #ifndef MAVLINK_STX #define MAVLINK_STX 254 diff --git a/mavlink_lib/pyxis/mavlink_msg_adc_tm.h b/mavlink_lib/pyxis/mavlink_msg_adc_tm.h index b9fd131a44d064778d87ae135f1086ec64667f5d..ea6116c378fef31bb82e92d901c5187d409d0cbb 100644 --- a/mavlink_lib/pyxis/mavlink_msg_adc_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_adc_tm.h @@ -6,10 +6,10 @@ typedef struct __mavlink_adc_tm_t { uint64_t timestamp; /*< [ms] When was this logged*/ - float ch0; /*< [V] ADC voltage measured on channel 0*/ - float ch1; /*< [V] ADC voltage measured on channel 1*/ - float ch2; /*< [V] ADC voltage measured on channel 2*/ - float ch3; /*< [V] ADC voltage measured on channel 3*/ + float channel_0; /*< [V] ADC voltage measured on channel 0*/ + float channel_1; /*< [V] ADC voltage measured on channel 1*/ + float channel_2; /*< [V] ADC voltage measured on channel 2*/ + float channel_3; /*< [V] ADC voltage measured on channel 3*/ char sensor_id[20]; /*< Sensor name*/ } mavlink_adc_tm_t; @@ -18,8 +18,8 @@ typedef struct __mavlink_adc_tm_t { #define MAVLINK_MSG_ID_105_LEN 44 #define MAVLINK_MSG_ID_105_MIN_LEN 44 -#define MAVLINK_MSG_ID_ADC_TM_CRC 179 -#define MAVLINK_MSG_ID_105_CRC 179 +#define MAVLINK_MSG_ID_ADC_TM_CRC 104 +#define MAVLINK_MSG_ID_105_CRC 104 #define MAVLINK_MSG_ADC_TM_FIELD_SENSOR_ID_LEN 20 @@ -30,10 +30,10 @@ typedef struct __mavlink_adc_tm_t { 6, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_adc_tm_t, timestamp) }, \ { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 24, offsetof(mavlink_adc_tm_t, sensor_id) }, \ - { "ch0", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adc_tm_t, ch0) }, \ - { "ch1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adc_tm_t, ch1) }, \ - { "ch2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adc_tm_t, ch2) }, \ - { "ch3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adc_tm_t, ch3) }, \ + { "channel_0", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adc_tm_t, channel_0) }, \ + { "channel_1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adc_tm_t, channel_1) }, \ + { "channel_2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adc_tm_t, channel_2) }, \ + { "channel_3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adc_tm_t, channel_3) }, \ } \ } #else @@ -42,10 +42,10 @@ typedef struct __mavlink_adc_tm_t { 6, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_adc_tm_t, timestamp) }, \ { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 24, offsetof(mavlink_adc_tm_t, sensor_id) }, \ - { "ch0", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adc_tm_t, ch0) }, \ - { "ch1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adc_tm_t, ch1) }, \ - { "ch2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adc_tm_t, ch2) }, \ - { "ch3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adc_tm_t, ch3) }, \ + { "channel_0", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_adc_tm_t, channel_0) }, \ + { "channel_1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_adc_tm_t, channel_1) }, \ + { "channel_2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_adc_tm_t, channel_2) }, \ + { "channel_3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_adc_tm_t, channel_3) }, \ } \ } #endif @@ -58,31 +58,31 @@ typedef struct __mavlink_adc_tm_t { * * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param ch0 [V] ADC voltage measured on channel 0 - * @param ch1 [V] ADC voltage measured on channel 1 - * @param ch2 [V] ADC voltage measured on channel 2 - * @param ch3 [V] ADC voltage measured on channel 3 + * @param channel_0 [V] ADC voltage measured on channel 0 + * @param channel_1 [V] ADC voltage measured on channel 1 + * @param channel_2 [V] ADC voltage measured on channel 2 + * @param channel_3 [V] ADC voltage measured on channel 3 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_adc_tm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t timestamp, const char *sensor_id, float ch0, float ch1, float ch2, float ch3) + uint64_t timestamp, const char *sensor_id, float channel_0, float channel_1, float channel_2, float channel_3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_ADC_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, ch0); - _mav_put_float(buf, 12, ch1); - _mav_put_float(buf, 16, ch2); - _mav_put_float(buf, 20, ch3); + _mav_put_float(buf, 8, channel_0); + _mav_put_float(buf, 12, channel_1); + _mav_put_float(buf, 16, channel_2); + _mav_put_float(buf, 20, channel_3); _mav_put_char_array(buf, 24, sensor_id, 20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADC_TM_LEN); #else mavlink_adc_tm_t packet; packet.timestamp = timestamp; - packet.ch0 = ch0; - packet.ch1 = ch1; - packet.ch2 = ch2; - packet.ch3 = ch3; + packet.channel_0 = channel_0; + packet.channel_1 = channel_1; + packet.channel_2 = channel_2; + packet.channel_3 = channel_3; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADC_TM_LEN); #endif @@ -99,32 +99,32 @@ static inline uint16_t mavlink_msg_adc_tm_pack(uint8_t system_id, uint8_t compon * @param msg The MAVLink message to compress the data into * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param ch0 [V] ADC voltage measured on channel 0 - * @param ch1 [V] ADC voltage measured on channel 1 - * @param ch2 [V] ADC voltage measured on channel 2 - * @param ch3 [V] ADC voltage measured on channel 3 + * @param channel_0 [V] ADC voltage measured on channel 0 + * @param channel_1 [V] ADC voltage measured on channel 1 + * @param channel_2 [V] ADC voltage measured on channel 2 + * @param channel_3 [V] ADC voltage measured on channel 3 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_adc_tm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint64_t timestamp,const char *sensor_id,float ch0,float ch1,float ch2,float ch3) + uint64_t timestamp,const char *sensor_id,float channel_0,float channel_1,float channel_2,float channel_3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_ADC_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, ch0); - _mav_put_float(buf, 12, ch1); - _mav_put_float(buf, 16, ch2); - _mav_put_float(buf, 20, ch3); + _mav_put_float(buf, 8, channel_0); + _mav_put_float(buf, 12, channel_1); + _mav_put_float(buf, 16, channel_2); + _mav_put_float(buf, 20, channel_3); _mav_put_char_array(buf, 24, sensor_id, 20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADC_TM_LEN); #else mavlink_adc_tm_t packet; packet.timestamp = timestamp; - packet.ch0 = ch0; - packet.ch1 = ch1; - packet.ch2 = ch2; - packet.ch3 = ch3; + packet.channel_0 = channel_0; + packet.channel_1 = channel_1; + packet.channel_2 = channel_2; + packet.channel_3 = channel_3; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADC_TM_LEN); #endif @@ -143,7 +143,7 @@ static inline uint16_t mavlink_msg_adc_tm_pack_chan(uint8_t system_id, uint8_t c */ static inline uint16_t mavlink_msg_adc_tm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adc_tm_t* adc_tm) { - return mavlink_msg_adc_tm_pack(system_id, component_id, msg, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->ch0, adc_tm->ch1, adc_tm->ch2, adc_tm->ch3); + return mavlink_msg_adc_tm_pack(system_id, component_id, msg, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->channel_0, adc_tm->channel_1, adc_tm->channel_2, adc_tm->channel_3); } /** @@ -157,7 +157,7 @@ static inline uint16_t mavlink_msg_adc_tm_encode(uint8_t system_id, uint8_t comp */ static inline uint16_t mavlink_msg_adc_tm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adc_tm_t* adc_tm) { - return mavlink_msg_adc_tm_pack_chan(system_id, component_id, chan, msg, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->ch0, adc_tm->ch1, adc_tm->ch2, adc_tm->ch3); + return mavlink_msg_adc_tm_pack_chan(system_id, component_id, chan, msg, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->channel_0, adc_tm->channel_1, adc_tm->channel_2, adc_tm->channel_3); } /** @@ -166,31 +166,31 @@ static inline uint16_t mavlink_msg_adc_tm_encode_chan(uint8_t system_id, uint8_t * * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param ch0 [V] ADC voltage measured on channel 0 - * @param ch1 [V] ADC voltage measured on channel 1 - * @param ch2 [V] ADC voltage measured on channel 2 - * @param ch3 [V] ADC voltage measured on channel 3 + * @param channel_0 [V] ADC voltage measured on channel 0 + * @param channel_1 [V] ADC voltage measured on channel 1 + * @param channel_2 [V] ADC voltage measured on channel 2 + * @param channel_3 [V] ADC voltage measured on channel 3 */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_adc_tm_send(mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float ch0, float ch1, float ch2, float ch3) +static inline void mavlink_msg_adc_tm_send(mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float channel_0, float channel_1, float channel_2, float channel_3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_ADC_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, ch0); - _mav_put_float(buf, 12, ch1); - _mav_put_float(buf, 16, ch2); - _mav_put_float(buf, 20, ch3); + _mav_put_float(buf, 8, channel_0); + _mav_put_float(buf, 12, channel_1); + _mav_put_float(buf, 16, channel_2); + _mav_put_float(buf, 20, channel_3); _mav_put_char_array(buf, 24, sensor_id, 20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADC_TM, buf, MAVLINK_MSG_ID_ADC_TM_MIN_LEN, MAVLINK_MSG_ID_ADC_TM_LEN, MAVLINK_MSG_ID_ADC_TM_CRC); #else mavlink_adc_tm_t packet; packet.timestamp = timestamp; - packet.ch0 = ch0; - packet.ch1 = ch1; - packet.ch2 = ch2; - packet.ch3 = ch3; + packet.channel_0 = channel_0; + packet.channel_1 = channel_1; + packet.channel_2 = channel_2; + packet.channel_3 = channel_3; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADC_TM, (const char *)&packet, MAVLINK_MSG_ID_ADC_TM_MIN_LEN, MAVLINK_MSG_ID_ADC_TM_LEN, MAVLINK_MSG_ID_ADC_TM_CRC); #endif @@ -204,7 +204,7 @@ static inline void mavlink_msg_adc_tm_send(mavlink_channel_t chan, uint64_t time static inline void mavlink_msg_adc_tm_send_struct(mavlink_channel_t chan, const mavlink_adc_tm_t* adc_tm) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_adc_tm_send(chan, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->ch0, adc_tm->ch1, adc_tm->ch2, adc_tm->ch3); + mavlink_msg_adc_tm_send(chan, adc_tm->timestamp, adc_tm->sensor_id, adc_tm->channel_0, adc_tm->channel_1, adc_tm->channel_2, adc_tm->channel_3); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADC_TM, (const char *)adc_tm, MAVLINK_MSG_ID_ADC_TM_MIN_LEN, MAVLINK_MSG_ID_ADC_TM_LEN, MAVLINK_MSG_ID_ADC_TM_CRC); #endif @@ -218,24 +218,24 @@ static inline void mavlink_msg_adc_tm_send_struct(mavlink_channel_t chan, const 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_adc_tm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float ch0, float ch1, float ch2, float ch3) +static inline void mavlink_msg_adc_tm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float channel_0, float channel_1, float channel_2, float channel_3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, ch0); - _mav_put_float(buf, 12, ch1); - _mav_put_float(buf, 16, ch2); - _mav_put_float(buf, 20, ch3); + _mav_put_float(buf, 8, channel_0); + _mav_put_float(buf, 12, channel_1); + _mav_put_float(buf, 16, channel_2); + _mav_put_float(buf, 20, channel_3); _mav_put_char_array(buf, 24, sensor_id, 20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADC_TM, buf, MAVLINK_MSG_ID_ADC_TM_MIN_LEN, MAVLINK_MSG_ID_ADC_TM_LEN, MAVLINK_MSG_ID_ADC_TM_CRC); #else mavlink_adc_tm_t *packet = (mavlink_adc_tm_t *)msgbuf; packet->timestamp = timestamp; - packet->ch0 = ch0; - packet->ch1 = ch1; - packet->ch2 = ch2; - packet->ch3 = ch3; + packet->channel_0 = channel_0; + packet->channel_1 = channel_1; + packet->channel_2 = channel_2; + packet->channel_3 = channel_3; mav_array_memcpy(packet->sensor_id, sensor_id, sizeof(char)*20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADC_TM, (const char *)packet, MAVLINK_MSG_ID_ADC_TM_MIN_LEN, MAVLINK_MSG_ID_ADC_TM_LEN, MAVLINK_MSG_ID_ADC_TM_CRC); #endif @@ -268,41 +268,41 @@ static inline uint16_t mavlink_msg_adc_tm_get_sensor_id(const mavlink_message_t* } /** - * @brief Get field ch0 from adc_tm message + * @brief Get field channel_0 from adc_tm message * * @return [V] ADC voltage measured on channel 0 */ -static inline float mavlink_msg_adc_tm_get_ch0(const mavlink_message_t* msg) +static inline float mavlink_msg_adc_tm_get_channel_0(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 8); } /** - * @brief Get field ch1 from adc_tm message + * @brief Get field channel_1 from adc_tm message * * @return [V] ADC voltage measured on channel 1 */ -static inline float mavlink_msg_adc_tm_get_ch1(const mavlink_message_t* msg) +static inline float mavlink_msg_adc_tm_get_channel_1(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 12); } /** - * @brief Get field ch2 from adc_tm message + * @brief Get field channel_2 from adc_tm message * * @return [V] ADC voltage measured on channel 2 */ -static inline float mavlink_msg_adc_tm_get_ch2(const mavlink_message_t* msg) +static inline float mavlink_msg_adc_tm_get_channel_2(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 16); } /** - * @brief Get field ch3 from adc_tm message + * @brief Get field channel_3 from adc_tm message * * @return [V] ADC voltage measured on channel 3 */ -static inline float mavlink_msg_adc_tm_get_ch3(const mavlink_message_t* msg) +static inline float mavlink_msg_adc_tm_get_channel_3(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 20); } @@ -317,10 +317,10 @@ static inline void mavlink_msg_adc_tm_decode(const mavlink_message_t* msg, mavli { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS adc_tm->timestamp = mavlink_msg_adc_tm_get_timestamp(msg); - adc_tm->ch0 = mavlink_msg_adc_tm_get_ch0(msg); - adc_tm->ch1 = mavlink_msg_adc_tm_get_ch1(msg); - adc_tm->ch2 = mavlink_msg_adc_tm_get_ch2(msg); - adc_tm->ch3 = mavlink_msg_adc_tm_get_ch3(msg); + adc_tm->channel_0 = mavlink_msg_adc_tm_get_channel_0(msg); + adc_tm->channel_1 = mavlink_msg_adc_tm_get_channel_1(msg); + adc_tm->channel_2 = mavlink_msg_adc_tm_get_channel_2(msg); + adc_tm->channel_3 = mavlink_msg_adc_tm_get_channel_3(msg); mavlink_msg_adc_tm_get_sensor_id(msg, adc_tm->sensor_id); #else uint8_t len = msg->len < MAVLINK_MSG_ID_ADC_TM_LEN? msg->len : MAVLINK_MSG_ID_ADC_TM_LEN; diff --git a/mavlink_lib/pyxis/mavlink_msg_attitude_tm.h b/mavlink_lib/pyxis/mavlink_msg_attitude_tm.h index 987c62e6870c4278a68123609dc312b95287d375..72fdd33b6d274a8412c059ee053f1d5f798473ff 100644 --- a/mavlink_lib/pyxis/mavlink_msg_attitude_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_attitude_tm.h @@ -1,7 +1,7 @@ #pragma once // MESSAGE ATTITUDE_TM PACKING -#define MAVLINK_MSG_ID_ATTITUDE_TM 107 +#define MAVLINK_MSG_ID_ATTITUDE_TM 108 typedef struct __mavlink_attitude_tm_t { @@ -18,17 +18,17 @@ typedef struct __mavlink_attitude_tm_t { #define MAVLINK_MSG_ID_ATTITUDE_TM_LEN 56 #define MAVLINK_MSG_ID_ATTITUDE_TM_MIN_LEN 56 -#define MAVLINK_MSG_ID_107_LEN 56 -#define MAVLINK_MSG_ID_107_MIN_LEN 56 +#define MAVLINK_MSG_ID_108_LEN 56 +#define MAVLINK_MSG_ID_108_MIN_LEN 56 #define MAVLINK_MSG_ID_ATTITUDE_TM_CRC 170 -#define MAVLINK_MSG_ID_107_CRC 170 +#define MAVLINK_MSG_ID_108_CRC 170 #define MAVLINK_MSG_ATTITUDE_TM_FIELD_SENSOR_ID_LEN 20 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_ATTITUDE_TM { \ - 107, \ + 108, \ "ATTITUDE_TM", \ 9, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_attitude_tm_t, timestamp) }, \ diff --git a/mavlink_lib/pyxis/mavlink_msg_current_tm.h b/mavlink_lib/pyxis/mavlink_msg_current_tm.h new file mode 100644 index 0000000000000000000000000000000000000000..bbaa5cb21b0886fabe71365bd743510233239455 --- /dev/null +++ b/mavlink_lib/pyxis/mavlink_msg_current_tm.h @@ -0,0 +1,255 @@ +#pragma once +// MESSAGE CURRENT_TM PACKING + +#define MAVLINK_MSG_ID_CURRENT_TM 106 + + +typedef struct __mavlink_current_tm_t { + uint64_t timestamp; /*< [ms] When was this logged*/ + float current; /*< [deg] Current*/ + char sensor_id[20]; /*< Sensor name*/ +} mavlink_current_tm_t; + +#define MAVLINK_MSG_ID_CURRENT_TM_LEN 32 +#define MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN 32 +#define MAVLINK_MSG_ID_106_LEN 32 +#define MAVLINK_MSG_ID_106_MIN_LEN 32 + +#define MAVLINK_MSG_ID_CURRENT_TM_CRC 222 +#define MAVLINK_MSG_ID_106_CRC 222 + +#define MAVLINK_MSG_CURRENT_TM_FIELD_SENSOR_ID_LEN 20 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_CURRENT_TM { \ + 106, \ + "CURRENT_TM", \ + 3, \ + { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_current_tm_t, timestamp) }, \ + { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 12, offsetof(mavlink_current_tm_t, sensor_id) }, \ + { "current", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_current_tm_t, current) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_CURRENT_TM { \ + "CURRENT_TM", \ + 3, \ + { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_current_tm_t, timestamp) }, \ + { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 12, offsetof(mavlink_current_tm_t, sensor_id) }, \ + { "current", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_current_tm_t, current) }, \ + } \ +} +#endif + +/** + * @brief Pack a current_tm 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 timestamp [ms] When was this logged + * @param sensor_id Sensor name + * @param current [deg] Current + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_current_tm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint64_t timestamp, const char *sensor_id, float current) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CURRENT_TM_LEN]; + _mav_put_uint64_t(buf, 0, timestamp); + _mav_put_float(buf, 8, current); + _mav_put_char_array(buf, 12, sensor_id, 20); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_TM_LEN); +#else + mavlink_current_tm_t packet; + packet.timestamp = timestamp; + packet.current = current; + mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_TM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CURRENT_TM; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +} + +/** + * @brief Pack a current_tm 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 timestamp [ms] When was this logged + * @param sensor_id Sensor name + * @param current [deg] Current + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_current_tm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint64_t timestamp,const char *sensor_id,float current) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CURRENT_TM_LEN]; + _mav_put_uint64_t(buf, 0, timestamp); + _mav_put_float(buf, 8, current); + _mav_put_char_array(buf, 12, sensor_id, 20); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_TM_LEN); +#else + mavlink_current_tm_t packet; + packet.timestamp = timestamp; + packet.current = current; + mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_TM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_CURRENT_TM; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +} + +/** + * @brief Encode a current_tm 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 current_tm C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_current_tm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_current_tm_t* current_tm) +{ + return mavlink_msg_current_tm_pack(system_id, component_id, msg, current_tm->timestamp, current_tm->sensor_id, current_tm->current); +} + +/** + * @brief Encode a current_tm 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 current_tm C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_current_tm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_current_tm_t* current_tm) +{ + return mavlink_msg_current_tm_pack_chan(system_id, component_id, chan, msg, current_tm->timestamp, current_tm->sensor_id, current_tm->current); +} + +/** + * @brief Send a current_tm message + * @param chan MAVLink channel to send the message + * + * @param timestamp [ms] When was this logged + * @param sensor_id Sensor name + * @param current [deg] Current + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_current_tm_send(mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float current) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_CURRENT_TM_LEN]; + _mav_put_uint64_t(buf, 0, timestamp); + _mav_put_float(buf, 8, current); + _mav_put_char_array(buf, 12, sensor_id, 20); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_TM, buf, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +#else + mavlink_current_tm_t packet; + packet.timestamp = timestamp; + packet.current = current; + mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_TM, (const char *)&packet, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +#endif +} + +/** + * @brief Send a current_tm message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_current_tm_send_struct(mavlink_channel_t chan, const mavlink_current_tm_t* current_tm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_current_tm_send(chan, current_tm->timestamp, current_tm->sensor_id, current_tm->current); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_TM, (const char *)current_tm, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +#endif +} + +#if MAVLINK_MSG_ID_CURRENT_TM_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_current_tm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float current) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, timestamp); + _mav_put_float(buf, 8, current); + _mav_put_char_array(buf, 12, sensor_id, 20); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_TM, buf, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +#else + mavlink_current_tm_t *packet = (mavlink_current_tm_t *)msgbuf; + packet->timestamp = timestamp; + packet->current = current; + mav_array_memcpy(packet->sensor_id, sensor_id, sizeof(char)*20); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_TM, (const char *)packet, MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN, MAVLINK_MSG_ID_CURRENT_TM_LEN, MAVLINK_MSG_ID_CURRENT_TM_CRC); +#endif +} +#endif + +#endif + +// MESSAGE CURRENT_TM UNPACKING + + +/** + * @brief Get field timestamp from current_tm message + * + * @return [ms] When was this logged + */ +static inline uint64_t mavlink_msg_current_tm_get_timestamp(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field sensor_id from current_tm message + * + * @return Sensor name + */ +static inline uint16_t mavlink_msg_current_tm_get_sensor_id(const mavlink_message_t* msg, char *sensor_id) +{ + return _MAV_RETURN_char_array(msg, sensor_id, 20, 12); +} + +/** + * @brief Get field current from current_tm message + * + * @return [deg] Current + */ +static inline float mavlink_msg_current_tm_get_current(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Decode a current_tm message into a struct + * + * @param msg The message to decode + * @param current_tm C-struct to decode the message contents into + */ +static inline void mavlink_msg_current_tm_decode(const mavlink_message_t* msg, mavlink_current_tm_t* current_tm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + current_tm->timestamp = mavlink_msg_current_tm_get_timestamp(msg); + current_tm->current = mavlink_msg_current_tm_get_current(msg); + mavlink_msg_current_tm_get_sensor_id(msg, current_tm->sensor_id); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_CURRENT_TM_LEN? msg->len : MAVLINK_MSG_ID_CURRENT_TM_LEN; + memset(current_tm, 0, MAVLINK_MSG_ID_CURRENT_TM_LEN); + memcpy(current_tm, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/mavlink_lib/pyxis/mavlink_msg_pin_tm.h b/mavlink_lib/pyxis/mavlink_msg_pin_tm.h index 846d43f67487a1431280eb0da56fe15e62a855e4..4e03f709e9e04e7ee5514cda175effbf2665c0d5 100644 --- a/mavlink_lib/pyxis/mavlink_msg_pin_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_pin_tm.h @@ -1,7 +1,7 @@ #pragma once // MESSAGE PIN_TM PACKING -#define MAVLINK_MSG_ID_PIN_TM 110 +#define MAVLINK_MSG_ID_PIN_TM 111 typedef struct __mavlink_pin_tm_t { @@ -14,17 +14,17 @@ typedef struct __mavlink_pin_tm_t { #define MAVLINK_MSG_ID_PIN_TM_LEN 19 #define MAVLINK_MSG_ID_PIN_TM_MIN_LEN 19 -#define MAVLINK_MSG_ID_110_LEN 19 -#define MAVLINK_MSG_ID_110_MIN_LEN 19 +#define MAVLINK_MSG_ID_111_LEN 19 +#define MAVLINK_MSG_ID_111_MIN_LEN 19 #define MAVLINK_MSG_ID_PIN_TM_CRC 255 -#define MAVLINK_MSG_ID_110_CRC 255 +#define MAVLINK_MSG_ID_111_CRC 255 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_PIN_TM { \ - 110, \ + 111, \ "PIN_TM", \ 5, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_pin_tm_t, timestamp) }, \ diff --git a/mavlink_lib/pyxis/mavlink_msg_sensor_state_tm.h b/mavlink_lib/pyxis/mavlink_msg_sensor_state_tm.h index a76c827eca232fcc893394aebce270335ec602d1..d5a5660e0b41274534af8381f024241a785b35b7 100644 --- a/mavlink_lib/pyxis/mavlink_msg_sensor_state_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_sensor_state_tm.h @@ -1,7 +1,7 @@ #pragma once // MESSAGE SENSOR_STATE_TM PACKING -#define MAVLINK_MSG_ID_SENSOR_STATE_TM 108 +#define MAVLINK_MSG_ID_SENSOR_STATE_TM 109 typedef struct __mavlink_sensor_state_tm_t { @@ -11,17 +11,17 @@ typedef struct __mavlink_sensor_state_tm_t { #define MAVLINK_MSG_ID_SENSOR_STATE_TM_LEN 21 #define MAVLINK_MSG_ID_SENSOR_STATE_TM_MIN_LEN 21 -#define MAVLINK_MSG_ID_108_LEN 21 -#define MAVLINK_MSG_ID_108_MIN_LEN 21 +#define MAVLINK_MSG_ID_109_LEN 21 +#define MAVLINK_MSG_ID_109_MIN_LEN 21 #define MAVLINK_MSG_ID_SENSOR_STATE_TM_CRC 42 -#define MAVLINK_MSG_ID_108_CRC 42 +#define MAVLINK_MSG_ID_109_CRC 42 #define MAVLINK_MSG_SENSOR_STATE_TM_FIELD_SENSOR_ID_LEN 20 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_SENSOR_STATE_TM { \ - 108, \ + 109, \ "SENSOR_STATE_TM", \ 2, \ { { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 0, offsetof(mavlink_sensor_state_tm_t, sensor_id) }, \ diff --git a/mavlink_lib/pyxis/mavlink_msg_servo_tm.h b/mavlink_lib/pyxis/mavlink_msg_servo_tm.h index 50e6b53245907df764425a518ec31989517a99e7..9430bd9618daab35a2a4774067530f09986053ac 100644 --- a/mavlink_lib/pyxis/mavlink_msg_servo_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_servo_tm.h @@ -1,7 +1,7 @@ #pragma once // MESSAGE SERVO_TM PACKING -#define MAVLINK_MSG_ID_SERVO_TM 109 +#define MAVLINK_MSG_ID_SERVO_TM 110 typedef struct __mavlink_servo_tm_t { @@ -11,17 +11,17 @@ typedef struct __mavlink_servo_tm_t { #define MAVLINK_MSG_ID_SERVO_TM_LEN 5 #define MAVLINK_MSG_ID_SERVO_TM_MIN_LEN 5 -#define MAVLINK_MSG_ID_109_LEN 5 -#define MAVLINK_MSG_ID_109_MIN_LEN 5 +#define MAVLINK_MSG_ID_110_LEN 5 +#define MAVLINK_MSG_ID_110_MIN_LEN 5 #define MAVLINK_MSG_ID_SERVO_TM_CRC 87 -#define MAVLINK_MSG_ID_109_CRC 87 +#define MAVLINK_MSG_ID_110_CRC 87 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_SERVO_TM { \ - 109, \ + 110, \ "SERVO_TM", \ 2, \ { { "servo_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_servo_tm_t, servo_id) }, \ diff --git a/mavlink_lib/pyxis/mavlink_msg_temp_tm.h b/mavlink_lib/pyxis/mavlink_msg_temp_tm.h index 4b8071e1b9be48107984cd79933459a939de4102..3b4dfa9bcb771b85a0456b75c65a87551542b215 100644 --- a/mavlink_lib/pyxis/mavlink_msg_temp_tm.h +++ b/mavlink_lib/pyxis/mavlink_msg_temp_tm.h @@ -1,33 +1,33 @@ #pragma once // MESSAGE TEMP_TM PACKING -#define MAVLINK_MSG_ID_TEMP_TM 106 +#define MAVLINK_MSG_ID_TEMP_TM 107 typedef struct __mavlink_temp_tm_t { uint64_t timestamp; /*< [ms] When was this logged*/ - float temp; /*< [deg] Temperature*/ + float temperature; /*< [deg] Temperature*/ char sensor_id[20]; /*< Sensor name*/ } mavlink_temp_tm_t; #define MAVLINK_MSG_ID_TEMP_TM_LEN 32 #define MAVLINK_MSG_ID_TEMP_TM_MIN_LEN 32 -#define MAVLINK_MSG_ID_106_LEN 32 -#define MAVLINK_MSG_ID_106_MIN_LEN 32 +#define MAVLINK_MSG_ID_107_LEN 32 +#define MAVLINK_MSG_ID_107_MIN_LEN 32 -#define MAVLINK_MSG_ID_TEMP_TM_CRC 4 -#define MAVLINK_MSG_ID_106_CRC 4 +#define MAVLINK_MSG_ID_TEMP_TM_CRC 128 +#define MAVLINK_MSG_ID_107_CRC 128 #define MAVLINK_MSG_TEMP_TM_FIELD_SENSOR_ID_LEN 20 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_TEMP_TM { \ - 106, \ + 107, \ "TEMP_TM", \ 3, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_temp_tm_t, timestamp) }, \ { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 12, offsetof(mavlink_temp_tm_t, sensor_id) }, \ - { "temp", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_temp_tm_t, temp) }, \ + { "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_temp_tm_t, temperature) }, \ } \ } #else @@ -36,7 +36,7 @@ typedef struct __mavlink_temp_tm_t { 3, \ { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_temp_tm_t, timestamp) }, \ { "sensor_id", NULL, MAVLINK_TYPE_CHAR, 20, 12, offsetof(mavlink_temp_tm_t, sensor_id) }, \ - { "temp", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_temp_tm_t, temp) }, \ + { "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_temp_tm_t, temperature) }, \ } \ } #endif @@ -49,22 +49,22 @@ typedef struct __mavlink_temp_tm_t { * * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param temp [deg] Temperature + * @param temperature [deg] Temperature * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_temp_tm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t timestamp, const char *sensor_id, float temp) + uint64_t timestamp, const char *sensor_id, float temperature) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TEMP_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, temp); + _mav_put_float(buf, 8, temperature); _mav_put_char_array(buf, 12, sensor_id, 20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TEMP_TM_LEN); #else mavlink_temp_tm_t packet; packet.timestamp = timestamp; - packet.temp = temp; + packet.temperature = temperature; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TEMP_TM_LEN); #endif @@ -81,23 +81,23 @@ static inline uint16_t mavlink_msg_temp_tm_pack(uint8_t system_id, uint8_t compo * @param msg The MAVLink message to compress the data into * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param temp [deg] Temperature + * @param temperature [deg] Temperature * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_temp_tm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint64_t timestamp,const char *sensor_id,float temp) + uint64_t timestamp,const char *sensor_id,float temperature) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TEMP_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, temp); + _mav_put_float(buf, 8, temperature); _mav_put_char_array(buf, 12, sensor_id, 20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TEMP_TM_LEN); #else mavlink_temp_tm_t packet; packet.timestamp = timestamp; - packet.temp = temp; + packet.temperature = temperature; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TEMP_TM_LEN); #endif @@ -116,7 +116,7 @@ static inline uint16_t mavlink_msg_temp_tm_pack_chan(uint8_t system_id, uint8_t */ static inline uint16_t mavlink_msg_temp_tm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_temp_tm_t* temp_tm) { - return mavlink_msg_temp_tm_pack(system_id, component_id, msg, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temp); + return mavlink_msg_temp_tm_pack(system_id, component_id, msg, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temperature); } /** @@ -130,7 +130,7 @@ static inline uint16_t mavlink_msg_temp_tm_encode(uint8_t system_id, uint8_t com */ static inline uint16_t mavlink_msg_temp_tm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_temp_tm_t* temp_tm) { - return mavlink_msg_temp_tm_pack_chan(system_id, component_id, chan, msg, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temp); + return mavlink_msg_temp_tm_pack_chan(system_id, component_id, chan, msg, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temperature); } /** @@ -139,22 +139,22 @@ static inline uint16_t mavlink_msg_temp_tm_encode_chan(uint8_t system_id, uint8_ * * @param timestamp [ms] When was this logged * @param sensor_id Sensor name - * @param temp [deg] Temperature + * @param temperature [deg] Temperature */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_temp_tm_send(mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float temp) +static inline void mavlink_msg_temp_tm_send(mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float temperature) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TEMP_TM_LEN]; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, temp); + _mav_put_float(buf, 8, temperature); _mav_put_char_array(buf, 12, sensor_id, 20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEMP_TM, buf, MAVLINK_MSG_ID_TEMP_TM_MIN_LEN, MAVLINK_MSG_ID_TEMP_TM_LEN, MAVLINK_MSG_ID_TEMP_TM_CRC); #else mavlink_temp_tm_t packet; packet.timestamp = timestamp; - packet.temp = temp; + packet.temperature = temperature; mav_array_memcpy(packet.sensor_id, sensor_id, sizeof(char)*20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEMP_TM, (const char *)&packet, MAVLINK_MSG_ID_TEMP_TM_MIN_LEN, MAVLINK_MSG_ID_TEMP_TM_LEN, MAVLINK_MSG_ID_TEMP_TM_CRC); #endif @@ -168,7 +168,7 @@ static inline void mavlink_msg_temp_tm_send(mavlink_channel_t chan, uint64_t tim static inline void mavlink_msg_temp_tm_send_struct(mavlink_channel_t chan, const mavlink_temp_tm_t* temp_tm) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_temp_tm_send(chan, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temp); + mavlink_msg_temp_tm_send(chan, temp_tm->timestamp, temp_tm->sensor_id, temp_tm->temperature); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEMP_TM, (const char *)temp_tm, MAVLINK_MSG_ID_TEMP_TM_MIN_LEN, MAVLINK_MSG_ID_TEMP_TM_LEN, MAVLINK_MSG_ID_TEMP_TM_CRC); #endif @@ -182,18 +182,18 @@ static inline void mavlink_msg_temp_tm_send_struct(mavlink_channel_t chan, const 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_temp_tm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float temp) +static inline void mavlink_msg_temp_tm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, const char *sensor_id, float temperature) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, temp); + _mav_put_float(buf, 8, temperature); _mav_put_char_array(buf, 12, sensor_id, 20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEMP_TM, buf, MAVLINK_MSG_ID_TEMP_TM_MIN_LEN, MAVLINK_MSG_ID_TEMP_TM_LEN, MAVLINK_MSG_ID_TEMP_TM_CRC); #else mavlink_temp_tm_t *packet = (mavlink_temp_tm_t *)msgbuf; packet->timestamp = timestamp; - packet->temp = temp; + packet->temperature = temperature; mav_array_memcpy(packet->sensor_id, sensor_id, sizeof(char)*20); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEMP_TM, (const char *)packet, MAVLINK_MSG_ID_TEMP_TM_MIN_LEN, MAVLINK_MSG_ID_TEMP_TM_LEN, MAVLINK_MSG_ID_TEMP_TM_CRC); #endif @@ -226,11 +226,11 @@ static inline uint16_t mavlink_msg_temp_tm_get_sensor_id(const mavlink_message_t } /** - * @brief Get field temp from temp_tm message + * @brief Get field temperature from temp_tm message * * @return [deg] Temperature */ -static inline float mavlink_msg_temp_tm_get_temp(const mavlink_message_t* msg) +static inline float mavlink_msg_temp_tm_get_temperature(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 8); } @@ -245,7 +245,7 @@ static inline void mavlink_msg_temp_tm_decode(const mavlink_message_t* msg, mavl { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS temp_tm->timestamp = mavlink_msg_temp_tm_get_timestamp(msg); - temp_tm->temp = mavlink_msg_temp_tm_get_temp(msg); + temp_tm->temperature = mavlink_msg_temp_tm_get_temperature(msg); mavlink_msg_temp_tm_get_sensor_id(msg, temp_tm->sensor_id); #else uint8_t len = msg->len < MAVLINK_MSG_ID_TEMP_TM_LEN? msg->len : MAVLINK_MSG_ID_TEMP_TM_LEN; diff --git a/mavlink_lib/pyxis/pyxis.h b/mavlink_lib/pyxis/pyxis.h index f023cdb515ea440918aa69561575f23d3aec394e..b1566267263c939ccffe5a06027a16f97f5370f7 100644 --- a/mavlink_lib/pyxis/pyxis.h +++ b/mavlink_lib/pyxis/pyxis.h @@ -11,7 +11,7 @@ #endif #undef MAVLINK_THIS_XML_HASH -#define MAVLINK_THIS_XML_HASH -5196227653783556587 +#define MAVLINK_THIS_XML_HASH 9187167560255685157 #ifdef __cplusplus extern "C" { @@ -20,11 +20,11 @@ extern "C" { // MESSAGE LENGTHS AND CRCS #ifndef MAVLINK_MESSAGE_LENGTHS -#define MAVLINK_MESSAGE_LENGTHS {0, 8, 1, 1, 1, 1, 5, 1, 1, 4, 4, 4, 12, 8, 2, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 74, 64, 32, 44, 32, 56, 21, 5, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 46, 28, 27, 49, 77, 30, 166, 158, 120, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define MAVLINK_MESSAGE_LENGTHS {0, 8, 1, 1, 1, 1, 5, 1, 1, 4, 4, 4, 12, 8, 2, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 74, 64, 32, 44, 32, 32, 56, 21, 5, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 46, 28, 27, 49, 77, 30, 166, 158, 120, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {0, 136, 198, 165, 103, 184, 215, 160, 226, 113, 38, 44, 138, 63, 218, 81, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 146, 39, 178, 148, 179, 4, 170, 42, 87, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 69, 142, 108, 133, 79, 66, 169, 92, 61, 169, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define MAVLINK_MESSAGE_CRCS {0, 136, 198, 165, 103, 184, 215, 160, 226, 113, 38, 44, 138, 63, 218, 81, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 146, 39, 178, 148, 104, 222, 128, 170, 42, 87, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 69, 142, 108, 133, 79, 66, 169, 92, 61, 169, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} #endif #include "../protocol.h" @@ -158,6 +158,7 @@ typedef enum PinsList #include "./mavlink_msg_imu_tm.h" #include "./mavlink_msg_baro_tm.h" #include "./mavlink_msg_adc_tm.h" +#include "./mavlink_msg_current_tm.h" #include "./mavlink_msg_temp_tm.h" #include "./mavlink_msg_attitude_tm.h" #include "./mavlink_msg_sensor_state_tm.h" @@ -180,11 +181,11 @@ typedef enum PinsList #undef MAVLINK_THIS_XML_HASH -#define MAVLINK_THIS_XML_HASH -5196227653783556587 +#define MAVLINK_THIS_XML_HASH 9187167560255685157 #if MAVLINK_THIS_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {{"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING_TC, MAVLINK_MESSAGE_INFO_COMMAND_TC, MAVLINK_MESSAGE_INFO_SYSTEM_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SENSOR_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SERVO_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SET_SERVO_ANGLE_TC, MAVLINK_MESSAGE_INFO_WIGGLE_SERVO_TC, MAVLINK_MESSAGE_INFO_RESET_SERVO_TC, MAVLINK_MESSAGE_INFO_SET_REFERENCE_ALTITUDE_TC, MAVLINK_MESSAGE_INFO_SET_REFERENCE_TEMPERATURE_TC, MAVLINK_MESSAGE_INFO_SET_DEPLOYMENT_ALTITUDE_TC, MAVLINK_MESSAGE_INFO_SET_INITIAL_ORIENTATION_TC, MAVLINK_MESSAGE_INFO_SET_INITIAL_COORDINATES_TC, MAVLINK_MESSAGE_INFO_RAW_EVENT_TC, MAVLINK_MESSAGE_INFO_SET_TARGET_COORDINATES_TC, MAVLINK_MESSAGE_INFO_SET_ALGORITHM_TC, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_ACK_TM, MAVLINK_MESSAGE_INFO_NACK_TM, MAVLINK_MESSAGE_INFO_GPS_TM, MAVLINK_MESSAGE_INFO_IMU_TM, MAVLINK_MESSAGE_INFO_BARO_TM, MAVLINK_MESSAGE_INFO_ADC_TM, MAVLINK_MESSAGE_INFO_TEMP_TM, MAVLINK_MESSAGE_INFO_ATTITUDE_TM, MAVLINK_MESSAGE_INFO_SENSOR_STATE_TM, MAVLINK_MESSAGE_INFO_SERVO_TM, MAVLINK_MESSAGE_INFO_PIN_TM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SYS_TM, MAVLINK_MESSAGE_INFO_FSM_TM, MAVLINK_MESSAGE_INFO_LOGGER_TM, MAVLINK_MESSAGE_INFO_MAVLINK_STATS_TM, MAVLINK_MESSAGE_INFO_TASK_STATS_TM, MAVLINK_MESSAGE_INFO_ADA_TM, MAVLINK_MESSAGE_INFO_NAS_TM, MAVLINK_MESSAGE_INFO_CAN_TM, MAVLINK_MESSAGE_INFO_ROCKET_FLIGHT_TM, MAVLINK_MESSAGE_INFO_PAYLOAD_FLIGHT_TM, MAVLINK_MESSAGE_INFO_ROCKET_STATS_TM, MAVLINK_MESSAGE_INFO_PAYLOAD_STATS_TM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}} -# define MAVLINK_MESSAGE_NAMES {{ "ACK_TM", 100 }, { "ADA_TM", 205 }, { "ADC_TM", 105 }, { "ATTITUDE_TM", 107 }, { "BARO_TM", 104 }, { "CAN_TM", 207 }, { "COMMAND_TC", 2 }, { "FSM_TM", 201 }, { "GPS_TM", 102 }, { "IMU_TM", 103 }, { "LOGGER_TM", 202 }, { "MAVLINK_STATS_TM", 203 }, { "NACK_TM", 101 }, { "NAS_TM", 206 }, { "PAYLOAD_FLIGHT_TM", 209 }, { "PAYLOAD_STATS_TM", 211 }, { "PING_TC", 1 }, { "PIN_TM", 110 }, { "RAW_EVENT_TC", 14 }, { "RESET_SERVO_TC", 8 }, { "ROCKET_FLIGHT_TM", 208 }, { "ROCKET_STATS_TM", 210 }, { "SENSOR_STATE_TM", 108 }, { "SENSOR_TM_REQUEST_TC", 4 }, { "SERVO_TM", 109 }, { "SERVO_TM_REQUEST_TC", 5 }, { "SET_ALGORITHM_TC", 16 }, { "SET_DEPLOYMENT_ALTITUDE_TC", 11 }, { "SET_INITIAL_COORDINATES_TC", 13 }, { "SET_INITIAL_ORIENTATION_TC", 12 }, { "SET_REFERENCE_ALTITUDE_TC", 9 }, { "SET_REFERENCE_TEMPERATURE_TC", 10 }, { "SET_SERVO_ANGLE_TC", 6 }, { "SET_TARGET_COORDINATES_TC", 15 }, { "SYSTEM_TM_REQUEST_TC", 3 }, { "SYS_TM", 200 }, { "TASK_STATS_TM", 204 }, { "TEMP_TM", 106 }, { "WIGGLE_SERVO_TC", 7 }} +# define MAVLINK_MESSAGE_INFO {{"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_PING_TC, MAVLINK_MESSAGE_INFO_COMMAND_TC, MAVLINK_MESSAGE_INFO_SYSTEM_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SENSOR_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SERVO_TM_REQUEST_TC, MAVLINK_MESSAGE_INFO_SET_SERVO_ANGLE_TC, MAVLINK_MESSAGE_INFO_WIGGLE_SERVO_TC, MAVLINK_MESSAGE_INFO_RESET_SERVO_TC, MAVLINK_MESSAGE_INFO_SET_REFERENCE_ALTITUDE_TC, MAVLINK_MESSAGE_INFO_SET_REFERENCE_TEMPERATURE_TC, MAVLINK_MESSAGE_INFO_SET_DEPLOYMENT_ALTITUDE_TC, MAVLINK_MESSAGE_INFO_SET_INITIAL_ORIENTATION_TC, MAVLINK_MESSAGE_INFO_SET_INITIAL_COORDINATES_TC, MAVLINK_MESSAGE_INFO_RAW_EVENT_TC, MAVLINK_MESSAGE_INFO_SET_TARGET_COORDINATES_TC, MAVLINK_MESSAGE_INFO_SET_ALGORITHM_TC, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_ACK_TM, MAVLINK_MESSAGE_INFO_NACK_TM, MAVLINK_MESSAGE_INFO_GPS_TM, MAVLINK_MESSAGE_INFO_IMU_TM, MAVLINK_MESSAGE_INFO_BARO_TM, MAVLINK_MESSAGE_INFO_ADC_TM, MAVLINK_MESSAGE_INFO_CURRENT_TM, MAVLINK_MESSAGE_INFO_TEMP_TM, MAVLINK_MESSAGE_INFO_ATTITUDE_TM, MAVLINK_MESSAGE_INFO_SENSOR_STATE_TM, MAVLINK_MESSAGE_INFO_SERVO_TM, MAVLINK_MESSAGE_INFO_PIN_TM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, MAVLINK_MESSAGE_INFO_SYS_TM, MAVLINK_MESSAGE_INFO_FSM_TM, MAVLINK_MESSAGE_INFO_LOGGER_TM, MAVLINK_MESSAGE_INFO_MAVLINK_STATS_TM, MAVLINK_MESSAGE_INFO_TASK_STATS_TM, MAVLINK_MESSAGE_INFO_ADA_TM, MAVLINK_MESSAGE_INFO_NAS_TM, MAVLINK_MESSAGE_INFO_CAN_TM, MAVLINK_MESSAGE_INFO_ROCKET_FLIGHT_TM, MAVLINK_MESSAGE_INFO_PAYLOAD_FLIGHT_TM, MAVLINK_MESSAGE_INFO_ROCKET_STATS_TM, MAVLINK_MESSAGE_INFO_PAYLOAD_STATS_TM, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}, {"EMPTY",0,{{"","",MAVLINK_TYPE_CHAR,0,0,0}}}} +# define MAVLINK_MESSAGE_NAMES {{ "ACK_TM", 100 }, { "ADA_TM", 205 }, { "ADC_TM", 105 }, { "ATTITUDE_TM", 108 }, { "BARO_TM", 104 }, { "CAN_TM", 207 }, { "COMMAND_TC", 2 }, { "CURRENT_TM", 106 }, { "FSM_TM", 201 }, { "GPS_TM", 102 }, { "IMU_TM", 103 }, { "LOGGER_TM", 202 }, { "MAVLINK_STATS_TM", 203 }, { "NACK_TM", 101 }, { "NAS_TM", 206 }, { "PAYLOAD_FLIGHT_TM", 209 }, { "PAYLOAD_STATS_TM", 211 }, { "PING_TC", 1 }, { "PIN_TM", 111 }, { "RAW_EVENT_TC", 14 }, { "RESET_SERVO_TC", 8 }, { "ROCKET_FLIGHT_TM", 208 }, { "ROCKET_STATS_TM", 210 }, { "SENSOR_STATE_TM", 109 }, { "SENSOR_TM_REQUEST_TC", 4 }, { "SERVO_TM", 110 }, { "SERVO_TM_REQUEST_TC", 5 }, { "SET_ALGORITHM_TC", 16 }, { "SET_DEPLOYMENT_ALTITUDE_TC", 11 }, { "SET_INITIAL_COORDINATES_TC", 13 }, { "SET_INITIAL_ORIENTATION_TC", 12 }, { "SET_REFERENCE_ALTITUDE_TC", 9 }, { "SET_REFERENCE_TEMPERATURE_TC", 10 }, { "SET_SERVO_ANGLE_TC", 6 }, { "SET_TARGET_COORDINATES_TC", 15 }, { "SYSTEM_TM_REQUEST_TC", 3 }, { "SYS_TM", 200 }, { "TASK_STATS_TM", 204 }, { "TEMP_TM", 107 }, { "WIGGLE_SERVO_TC", 7 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/mavlink_lib/pyxis/testsuite.h b/mavlink_lib/pyxis/testsuite.h index 29f5bff40ecf9ce2c73570b2cdddf645466b05a4..a6ef912cc4ad501878e7dd71a53690e50a651c50 100644 --- a/mavlink_lib/pyxis/testsuite.h +++ b/mavlink_lib/pyxis/testsuite.h @@ -1312,10 +1312,10 @@ static void mavlink_test_adc_tm(uint8_t system_id, uint8_t component_id, mavlink mavlink_adc_tm_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); packet1.timestamp = packet_in.timestamp; - packet1.ch0 = packet_in.ch0; - packet1.ch1 = packet_in.ch1; - packet1.ch2 = packet_in.ch2; - packet1.ch3 = packet_in.ch3; + packet1.channel_0 = packet_in.channel_0; + packet1.channel_1 = packet_in.channel_1; + packet1.channel_2 = packet_in.channel_2; + packet1.channel_3 = packet_in.channel_3; mav_array_memcpy(packet1.sensor_id, packet_in.sensor_id, sizeof(char)*20); @@ -1331,12 +1331,12 @@ static void mavlink_test_adc_tm(uint8_t system_id, uint8_t component_id, mavlink MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_adc_tm_pack(system_id, component_id, &msg , packet1.timestamp , packet1.sensor_id , packet1.ch0 , packet1.ch1 , packet1.ch2 , packet1.ch3 ); + mavlink_msg_adc_tm_pack(system_id, component_id, &msg , packet1.timestamp , packet1.sensor_id , packet1.channel_0 , packet1.channel_1 , packet1.channel_2 , packet1.channel_3 ); mavlink_msg_adc_tm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_adc_tm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.sensor_id , packet1.ch0 , packet1.ch1 , packet1.ch2 , packet1.ch3 ); + mavlink_msg_adc_tm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.sensor_id , packet1.channel_0 , packet1.channel_1 , packet1.channel_2 , packet1.channel_3 ); mavlink_msg_adc_tm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -1349,7 +1349,7 @@ static void mavlink_test_adc_tm(uint8_t system_id, uint8_t component_id, mavlink MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_adc_tm_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.sensor_id , packet1.ch0 , packet1.ch1 , packet1.ch2 , packet1.ch3 ); + mavlink_msg_adc_tm_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.sensor_id , packet1.channel_0 , packet1.channel_1 , packet1.channel_2 , packet1.channel_3 ); mavlink_msg_adc_tm_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -1359,6 +1359,67 @@ static void mavlink_test_adc_tm(uint8_t system_id, uint8_t component_id, mavlink #endif } +static void mavlink_test_current_tm(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_CURRENT_TM >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_current_tm_t packet_in = { + 93372036854775807ULL,73.0,"MNOPQRSTUVWXYZABCDE" + }; + mavlink_current_tm_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.timestamp = packet_in.timestamp; + packet1.current = packet_in.current; + + mav_array_memcpy(packet1.sensor_id, packet_in.sensor_id, sizeof(char)*20); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CURRENT_TM_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_current_tm_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_current_tm_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_current_tm_pack(system_id, component_id, &msg , packet1.timestamp , packet1.sensor_id , packet1.current ); + mavlink_msg_current_tm_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_current_tm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.sensor_id , packet1.current ); + mavlink_msg_current_tm_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_current_tm_decode(last_msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_current_tm_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.sensor_id , packet1.current ); + mavlink_msg_current_tm_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("CURRENT_TM") != NULL); + MAVLINK_ASSERT(mavlink_get_message_info_by_id(MAVLINK_MSG_ID_CURRENT_TM) != NULL); +#endif +} + static void mavlink_test_temp_tm(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) { #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 @@ -1376,7 +1437,7 @@ static void mavlink_test_temp_tm(uint8_t system_id, uint8_t component_id, mavlin mavlink_temp_tm_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); packet1.timestamp = packet_in.timestamp; - packet1.temp = packet_in.temp; + packet1.temperature = packet_in.temperature; mav_array_memcpy(packet1.sensor_id, packet_in.sensor_id, sizeof(char)*20); @@ -1392,12 +1453,12 @@ static void mavlink_test_temp_tm(uint8_t system_id, uint8_t component_id, mavlin MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_temp_tm_pack(system_id, component_id, &msg , packet1.timestamp , packet1.sensor_id , packet1.temp ); + mavlink_msg_temp_tm_pack(system_id, component_id, &msg , packet1.timestamp , packet1.sensor_id , packet1.temperature ); mavlink_msg_temp_tm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_temp_tm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.sensor_id , packet1.temp ); + mavlink_msg_temp_tm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.sensor_id , packet1.temperature ); mavlink_msg_temp_tm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -1410,7 +1471,7 @@ static void mavlink_test_temp_tm(uint8_t system_id, uint8_t component_id, mavlin MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_temp_tm_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.sensor_id , packet1.temp ); + mavlink_msg_temp_tm_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.sensor_id , packet1.temperature ); mavlink_msg_temp_tm_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -2607,6 +2668,7 @@ static void mavlink_test_pyxis(uint8_t system_id, uint8_t component_id, mavlink_ mavlink_test_imu_tm(system_id, component_id, last_msg); mavlink_test_baro_tm(system_id, component_id, last_msg); mavlink_test_adc_tm(system_id, component_id, last_msg); + mavlink_test_current_tm(system_id, component_id, last_msg); mavlink_test_temp_tm(system_id, component_id, last_msg); mavlink_test_attitude_tm(system_id, component_id, last_msg); mavlink_test_sensor_state_tm(system_id, component_id, last_msg); diff --git a/message_definitions/pyxis.xml b/message_definitions/pyxis.xml index 0cb47c7c31685aaf2e80672898d7e2ceaf55ff9f..917e303f249faacb77879034189cd09f7430810b 100644 --- a/message_definitions/pyxis.xml +++ b/message_definitions/pyxis.xml @@ -264,18 +264,24 @@ <description></description> <field name="timestamp" type="uint64_t" units="ms">When was this logged</field> <field name="sensor_id" type="char[20]" units="">Sensor name</field> - <field name="ch0" type="float" units="V">ADC voltage measured on channel 0</field> - <field name="ch1" type="float" units="V">ADC voltage measured on channel 1</field> - <field name="ch2" type="float" units="V">ADC voltage measured on channel 2</field> - <field name="ch3" type="float" units="V">ADC voltage measured on channel 3</field> + <field name="channel_0" type="float" units="V">ADC voltage measured on channel 0</field> + <field name="channel_1" type="float" units="V">ADC voltage measured on channel 1</field> + <field name="channel_2" type="float" units="V">ADC voltage measured on channel 2</field> + <field name="channel_3" type="float" units="V">ADC voltage measured on channel 3</field> </message> - <message id="106" name="TEMP_TM"> + <message id="106" name="CURRENT_TM"> <description></description> <field name="timestamp" type="uint64_t" units="ms">When was this logged</field> <field name="sensor_id" type="char[20]" units="">Sensor name</field> - <field name="temp" type="float" units="deg">Temperature</field> + <field name="current" type="float" units="deg">Current</field> </message> - <message id="107" name="ATTITUDE_TM"> + <message id="107" name="TEMP_TM"> + <description></description> + <field name="timestamp" type="uint64_t" units="ms">When was this logged</field> + <field name="sensor_id" type="char[20]" units="">Sensor name</field> + <field name="temperature" type="float" units="deg">Temperature</field> + </message> + <message id="108" name="ATTITUDE_TM"> <description></description> <field name="timestamp" type="uint64_t" units="ms">When was this logged</field> <field name="sensor_id" type="char[20]" units="">Sensor name</field> @@ -287,17 +293,17 @@ <field name="quat_z" type="float" units="">Quaternion z component</field> <field name="quat_w" type="float" units="">Quaternion w component</field> </message> - <message id="108" name="SENSOR_STATE_TM"> + <message id="109" name="SENSOR_STATE_TM"> <description></description> <field name="sensor_id" type="char[20]" units="">Sensor name</field> <field name="state" type="uint8_t" units="">Boolean that represents the init state</field> </message> - <message id="109" name="SERVO_TM"> + <message id="110" name="SERVO_TM"> <description></description> <field name="servo_id" type="uint8_t">A member of the ServosList enum</field> <field name="servo_position" type="float">Position of the servo [0-1]</field> </message> - <message id="110" name="PIN_TM"> + <message id="111" name="PIN_TM"> <description></description> <field name="timestamp" type="uint64_t" units="ms">Timestamp</field> <field name="pin_id" type="uint8_t" units="">A member of the PinsList enum</field>