You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1710 lines
99 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /** @file
  2. * @brief MAVLink comm protocol testsuite generated from matrixpilot.xml
  3. * @see http://qgroundcontrol.org/mavlink/
  4. */
  5. #pragma once
  6. #ifndef MATRIXPILOT_TESTSUITE_H
  7. #define MATRIXPILOT_TESTSUITE_H
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #ifndef MAVLINK_TEST_ALL
  12. #define MAVLINK_TEST_ALL
  13. static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg);
  14. static void mavlink_test_matrixpilot(uint8_t, uint8_t, mavlink_message_t *last_msg);
  15. static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  16. {
  17. mavlink_test_common(system_id, component_id, last_msg);
  18. mavlink_test_matrixpilot(system_id, component_id, last_msg);
  19. }
  20. #endif
  21. #include "../common/testsuite.h"
  22. static void mavlink_test_flexifunction_set(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  23. {
  24. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  25. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  26. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_SET >= 256) {
  27. return;
  28. }
  29. #endif
  30. mavlink_message_t msg;
  31. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  32. uint16_t i;
  33. mavlink_flexifunction_set_t packet_in = {
  34. 5,72
  35. };
  36. mavlink_flexifunction_set_t packet1, packet2;
  37. memset(&packet1, 0, sizeof(packet1));
  38. packet1.target_system = packet_in.target_system;
  39. packet1.target_component = packet_in.target_component;
  40. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  41. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  42. // cope with extensions
  43. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN);
  44. }
  45. #endif
  46. memset(&packet2, 0, sizeof(packet2));
  47. mavlink_msg_flexifunction_set_encode(system_id, component_id, &msg, &packet1);
  48. mavlink_msg_flexifunction_set_decode(&msg, &packet2);
  49. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  50. memset(&packet2, 0, sizeof(packet2));
  51. mavlink_msg_flexifunction_set_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
  52. mavlink_msg_flexifunction_set_decode(&msg, &packet2);
  53. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  54. memset(&packet2, 0, sizeof(packet2));
  55. mavlink_msg_flexifunction_set_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
  56. mavlink_msg_flexifunction_set_decode(&msg, &packet2);
  57. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  58. memset(&packet2, 0, sizeof(packet2));
  59. mavlink_msg_to_send_buffer(buffer, &msg);
  60. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  61. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  62. }
  63. mavlink_msg_flexifunction_set_decode(last_msg, &packet2);
  64. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  65. memset(&packet2, 0, sizeof(packet2));
  66. mavlink_msg_flexifunction_set_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
  67. mavlink_msg_flexifunction_set_decode(last_msg, &packet2);
  68. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  69. }
  70. static void mavlink_test_flexifunction_read_req(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  71. {
  72. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  73. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  74. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ >= 256) {
  75. return;
  76. }
  77. #endif
  78. mavlink_message_t msg;
  79. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  80. uint16_t i;
  81. mavlink_flexifunction_read_req_t packet_in = {
  82. 17235,17339,17,84
  83. };
  84. mavlink_flexifunction_read_req_t packet1, packet2;
  85. memset(&packet1, 0, sizeof(packet1));
  86. packet1.read_req_type = packet_in.read_req_type;
  87. packet1.data_index = packet_in.data_index;
  88. packet1.target_system = packet_in.target_system;
  89. packet1.target_component = packet_in.target_component;
  90. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  91. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  92. // cope with extensions
  93. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN);
  94. }
  95. #endif
  96. memset(&packet2, 0, sizeof(packet2));
  97. mavlink_msg_flexifunction_read_req_encode(system_id, component_id, &msg, &packet1);
  98. mavlink_msg_flexifunction_read_req_decode(&msg, &packet2);
  99. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  100. memset(&packet2, 0, sizeof(packet2));
  101. mavlink_msg_flexifunction_read_req_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.read_req_type , packet1.data_index );
  102. mavlink_msg_flexifunction_read_req_decode(&msg, &packet2);
  103. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  104. memset(&packet2, 0, sizeof(packet2));
  105. mavlink_msg_flexifunction_read_req_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.read_req_type , packet1.data_index );
  106. mavlink_msg_flexifunction_read_req_decode(&msg, &packet2);
  107. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  108. memset(&packet2, 0, sizeof(packet2));
  109. mavlink_msg_to_send_buffer(buffer, &msg);
  110. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  111. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  112. }
  113. mavlink_msg_flexifunction_read_req_decode(last_msg, &packet2);
  114. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  115. memset(&packet2, 0, sizeof(packet2));
  116. mavlink_msg_flexifunction_read_req_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.read_req_type , packet1.data_index );
  117. mavlink_msg_flexifunction_read_req_decode(last_msg, &packet2);
  118. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  119. }
  120. static void mavlink_test_flexifunction_buffer_function(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  121. {
  122. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  123. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  124. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION >= 256) {
  125. return;
  126. }
  127. #endif
  128. mavlink_message_t msg;
  129. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  130. uint16_t i;
  131. mavlink_flexifunction_buffer_function_t packet_in = {
  132. 17235,17339,17443,17547,29,96,{ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 }
  133. };
  134. mavlink_flexifunction_buffer_function_t packet1, packet2;
  135. memset(&packet1, 0, sizeof(packet1));
  136. packet1.func_index = packet_in.func_index;
  137. packet1.func_count = packet_in.func_count;
  138. packet1.data_address = packet_in.data_address;
  139. packet1.data_size = packet_in.data_size;
  140. packet1.target_system = packet_in.target_system;
  141. packet1.target_component = packet_in.target_component;
  142. mav_array_memcpy(packet1.data, packet_in.data, sizeof(int8_t)*48);
  143. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  144. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  145. // cope with extensions
  146. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN);
  147. }
  148. #endif
  149. memset(&packet2, 0, sizeof(packet2));
  150. mavlink_msg_flexifunction_buffer_function_encode(system_id, component_id, &msg, &packet1);
  151. mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2);
  152. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  153. memset(&packet2, 0, sizeof(packet2));
  154. mavlink_msg_flexifunction_buffer_function_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.func_count , packet1.data_address , packet1.data_size , packet1.data );
  155. mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2);
  156. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  157. memset(&packet2, 0, sizeof(packet2));
  158. mavlink_msg_flexifunction_buffer_function_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.func_count , packet1.data_address , packet1.data_size , packet1.data );
  159. mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2);
  160. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  161. memset(&packet2, 0, sizeof(packet2));
  162. mavlink_msg_to_send_buffer(buffer, &msg);
  163. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  164. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  165. }
  166. mavlink_msg_flexifunction_buffer_function_decode(last_msg, &packet2);
  167. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  168. memset(&packet2, 0, sizeof(packet2));
  169. mavlink_msg_flexifunction_buffer_function_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.func_index , packet1.func_count , packet1.data_address , packet1.data_size , packet1.data );
  170. mavlink_msg_flexifunction_buffer_function_decode(last_msg, &packet2);
  171. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  172. }
  173. static void mavlink_test_flexifunction_buffer_function_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  174. {
  175. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  176. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  177. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK >= 256) {
  178. return;
  179. }
  180. #endif
  181. mavlink_message_t msg;
  182. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  183. uint16_t i;
  184. mavlink_flexifunction_buffer_function_ack_t packet_in = {
  185. 17235,17339,17,84
  186. };
  187. mavlink_flexifunction_buffer_function_ack_t packet1, packet2;
  188. memset(&packet1, 0, sizeof(packet1));
  189. packet1.func_index = packet_in.func_index;
  190. packet1.result = packet_in.result;
  191. packet1.target_system = packet_in.target_system;
  192. packet1.target_component = packet_in.target_component;
  193. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  194. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  195. // cope with extensions
  196. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN);
  197. }
  198. #endif
  199. memset(&packet2, 0, sizeof(packet2));
  200. mavlink_msg_flexifunction_buffer_function_ack_encode(system_id, component_id, &msg, &packet1);
  201. mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2);
  202. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  203. memset(&packet2, 0, sizeof(packet2));
  204. mavlink_msg_flexifunction_buffer_function_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.result );
  205. mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2);
  206. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  207. memset(&packet2, 0, sizeof(packet2));
  208. mavlink_msg_flexifunction_buffer_function_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.result );
  209. mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2);
  210. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  211. memset(&packet2, 0, sizeof(packet2));
  212. mavlink_msg_to_send_buffer(buffer, &msg);
  213. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  214. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  215. }
  216. mavlink_msg_flexifunction_buffer_function_ack_decode(last_msg, &packet2);
  217. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  218. memset(&packet2, 0, sizeof(packet2));
  219. mavlink_msg_flexifunction_buffer_function_ack_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.func_index , packet1.result );
  220. mavlink_msg_flexifunction_buffer_function_ack_decode(last_msg, &packet2);
  221. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  222. }
  223. static void mavlink_test_flexifunction_directory(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  224. {
  225. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  226. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  227. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY >= 256) {
  228. return;
  229. }
  230. #endif
  231. mavlink_message_t msg;
  232. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  233. uint16_t i;
  234. mavlink_flexifunction_directory_t packet_in = {
  235. 5,72,139,206,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131 }
  236. };
  237. mavlink_flexifunction_directory_t packet1, packet2;
  238. memset(&packet1, 0, sizeof(packet1));
  239. packet1.target_system = packet_in.target_system;
  240. packet1.target_component = packet_in.target_component;
  241. packet1.directory_type = packet_in.directory_type;
  242. packet1.start_index = packet_in.start_index;
  243. packet1.count = packet_in.count;
  244. mav_array_memcpy(packet1.directory_data, packet_in.directory_data, sizeof(int8_t)*48);
  245. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  246. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  247. // cope with extensions
  248. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN);
  249. }
  250. #endif
  251. memset(&packet2, 0, sizeof(packet2));
  252. mavlink_msg_flexifunction_directory_encode(system_id, component_id, &msg, &packet1);
  253. mavlink_msg_flexifunction_directory_decode(&msg, &packet2);
  254. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  255. memset(&packet2, 0, sizeof(packet2));
  256. mavlink_msg_flexifunction_directory_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.directory_data );
  257. mavlink_msg_flexifunction_directory_decode(&msg, &packet2);
  258. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  259. memset(&packet2, 0, sizeof(packet2));
  260. mavlink_msg_flexifunction_directory_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.directory_data );
  261. mavlink_msg_flexifunction_directory_decode(&msg, &packet2);
  262. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  263. memset(&packet2, 0, sizeof(packet2));
  264. mavlink_msg_to_send_buffer(buffer, &msg);
  265. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  266. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  267. }
  268. mavlink_msg_flexifunction_directory_decode(last_msg, &packet2);
  269. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  270. memset(&packet2, 0, sizeof(packet2));
  271. mavlink_msg_flexifunction_directory_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.directory_data );
  272. mavlink_msg_flexifunction_directory_decode(last_msg, &packet2);
  273. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  274. }
  275. static void mavlink_test_flexifunction_directory_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  276. {
  277. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  278. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  279. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK >= 256) {
  280. return;
  281. }
  282. #endif
  283. mavlink_message_t msg;
  284. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  285. uint16_t i;
  286. mavlink_flexifunction_directory_ack_t packet_in = {
  287. 17235,139,206,17,84,151
  288. };
  289. mavlink_flexifunction_directory_ack_t packet1, packet2;
  290. memset(&packet1, 0, sizeof(packet1));
  291. packet1.result = packet_in.result;
  292. packet1.target_system = packet_in.target_system;
  293. packet1.target_component = packet_in.target_component;
  294. packet1.directory_type = packet_in.directory_type;
  295. packet1.start_index = packet_in.start_index;
  296. packet1.count = packet_in.count;
  297. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  298. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  299. // cope with extensions
  300. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN);
  301. }
  302. #endif
  303. memset(&packet2, 0, sizeof(packet2));
  304. mavlink_msg_flexifunction_directory_ack_encode(system_id, component_id, &msg, &packet1);
  305. mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2);
  306. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  307. memset(&packet2, 0, sizeof(packet2));
  308. mavlink_msg_flexifunction_directory_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.result );
  309. mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2);
  310. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  311. memset(&packet2, 0, sizeof(packet2));
  312. mavlink_msg_flexifunction_directory_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.result );
  313. mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2);
  314. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  315. memset(&packet2, 0, sizeof(packet2));
  316. mavlink_msg_to_send_buffer(buffer, &msg);
  317. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  318. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  319. }
  320. mavlink_msg_flexifunction_directory_ack_decode(last_msg, &packet2);
  321. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  322. memset(&packet2, 0, sizeof(packet2));
  323. mavlink_msg_flexifunction_directory_ack_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.result );
  324. mavlink_msg_flexifunction_directory_ack_decode(last_msg, &packet2);
  325. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  326. }
  327. static void mavlink_test_flexifunction_command(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  328. {
  329. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  330. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  331. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND >= 256) {
  332. return;
  333. }
  334. #endif
  335. mavlink_message_t msg;
  336. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  337. uint16_t i;
  338. mavlink_flexifunction_command_t packet_in = {
  339. 5,72,139
  340. };
  341. mavlink_flexifunction_command_t packet1, packet2;
  342. memset(&packet1, 0, sizeof(packet1));
  343. packet1.target_system = packet_in.target_system;
  344. packet1.target_component = packet_in.target_component;
  345. packet1.command_type = packet_in.command_type;
  346. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  347. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  348. // cope with extensions
  349. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN);
  350. }
  351. #endif
  352. memset(&packet2, 0, sizeof(packet2));
  353. mavlink_msg_flexifunction_command_encode(system_id, component_id, &msg, &packet1);
  354. mavlink_msg_flexifunction_command_decode(&msg, &packet2);
  355. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  356. memset(&packet2, 0, sizeof(packet2));
  357. mavlink_msg_flexifunction_command_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.command_type );
  358. mavlink_msg_flexifunction_command_decode(&msg, &packet2);
  359. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  360. memset(&packet2, 0, sizeof(packet2));
  361. mavlink_msg_flexifunction_command_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.command_type );
  362. mavlink_msg_flexifunction_command_decode(&msg, &packet2);
  363. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  364. memset(&packet2, 0, sizeof(packet2));
  365. mavlink_msg_to_send_buffer(buffer, &msg);
  366. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  367. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  368. }
  369. mavlink_msg_flexifunction_command_decode(last_msg, &packet2);
  370. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  371. memset(&packet2, 0, sizeof(packet2));
  372. mavlink_msg_flexifunction_command_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.command_type );
  373. mavlink_msg_flexifunction_command_decode(last_msg, &packet2);
  374. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  375. }
  376. static void mavlink_test_flexifunction_command_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  377. {
  378. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  379. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  380. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK >= 256) {
  381. return;
  382. }
  383. #endif
  384. mavlink_message_t msg;
  385. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  386. uint16_t i;
  387. mavlink_flexifunction_command_ack_t packet_in = {
  388. 17235,17339
  389. };
  390. mavlink_flexifunction_command_ack_t packet1, packet2;
  391. memset(&packet1, 0, sizeof(packet1));
  392. packet1.command_type = packet_in.command_type;
  393. packet1.result = packet_in.result;
  394. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  395. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  396. // cope with extensions
  397. memset(MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN);
  398. }
  399. #endif
  400. memset(&packet2, 0, sizeof(packet2));
  401. mavlink_msg_flexifunction_command_ack_encode(system_id, component_id, &msg, &packet1);
  402. mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2);
  403. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  404. memset(&packet2, 0, sizeof(packet2));
  405. mavlink_msg_flexifunction_command_ack_pack(system_id, component_id, &msg , packet1.command_type , packet1.result );
  406. mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2);
  407. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  408. memset(&packet2, 0, sizeof(packet2));
  409. mavlink_msg_flexifunction_command_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.command_type , packet1.result );
  410. mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2);
  411. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  412. memset(&packet2, 0, sizeof(packet2));
  413. mavlink_msg_to_send_buffer(buffer, &msg);
  414. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  415. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  416. }
  417. mavlink_msg_flexifunction_command_ack_decode(last_msg, &packet2);
  418. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  419. memset(&packet2, 0, sizeof(packet2));
  420. mavlink_msg_flexifunction_command_ack_send(MAVLINK_COMM_1 , packet1.command_type , packet1.result );
  421. mavlink_msg_flexifunction_command_ack_decode(last_msg, &packet2);
  422. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  423. }
  424. static void mavlink_test_serial_udb_extra_f2_a(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  425. {
  426. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  427. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  428. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A >= 256) {
  429. return;
  430. }
  431. #endif
  432. mavlink_message_t msg;
  433. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  434. uint16_t i;
  435. mavlink_serial_udb_extra_f2_a_t packet_in = {
  436. 963497464,963497672,963497880,963498088,18067,18171,18275,18379,18483,18587,18691,18795,18899,19003,19107,19211,19315,19419,19523,19627,19731,19835,19939,20043,20147,20251,185
  437. };
  438. mavlink_serial_udb_extra_f2_a_t packet1, packet2;
  439. memset(&packet1, 0, sizeof(packet1));
  440. packet1.sue_time = packet_in.sue_time;
  441. packet1.sue_latitude = packet_in.sue_latitude;
  442. packet1.sue_longitude = packet_in.sue_longitude;
  443. packet1.sue_altitude = packet_in.sue_altitude;
  444. packet1.sue_waypoint_index = packet_in.sue_waypoint_index;
  445. packet1.sue_rmat0 = packet_in.sue_rmat0;
  446. packet1.sue_rmat1 = packet_in.sue_rmat1;
  447. packet1.sue_rmat2 = packet_in.sue_rmat2;
  448. packet1.sue_rmat3 = packet_in.sue_rmat3;
  449. packet1.sue_rmat4 = packet_in.sue_rmat4;
  450. packet1.sue_rmat5 = packet_in.sue_rmat5;
  451. packet1.sue_rmat6 = packet_in.sue_rmat6;
  452. packet1.sue_rmat7 = packet_in.sue_rmat7;
  453. packet1.sue_rmat8 = packet_in.sue_rmat8;
  454. packet1.sue_cog = packet_in.sue_cog;
  455. packet1.sue_sog = packet_in.sue_sog;
  456. packet1.sue_cpu_load = packet_in.sue_cpu_load;
  457. packet1.sue_air_speed_3DIMU = packet_in.sue_air_speed_3DIMU;
  458. packet1.sue_estimated_wind_0 = packet_in.sue_estimated_wind_0;
  459. packet1.sue_estimated_wind_1 = packet_in.sue_estimated_wind_1;
  460. packet1.sue_estimated_wind_2 = packet_in.sue_estimated_wind_2;
  461. packet1.sue_magFieldEarth0 = packet_in.sue_magFieldEarth0;
  462. packet1.sue_magFieldEarth1 = packet_in.sue_magFieldEarth1;
  463. packet1.sue_magFieldEarth2 = packet_in.sue_magFieldEarth2;
  464. packet1.sue_svs = packet_in.sue_svs;
  465. packet1.sue_hdop = packet_in.sue_hdop;
  466. packet1.sue_status = packet_in.sue_status;
  467. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  468. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  469. // cope with extensions
  470. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN);
  471. }
  472. #endif
  473. memset(&packet2, 0, sizeof(packet2));
  474. mavlink_msg_serial_udb_extra_f2_a_encode(system_id, component_id, &msg, &packet1);
  475. mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2);
  476. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  477. memset(&packet2, 0, sizeof(packet2));
  478. mavlink_msg_serial_udb_extra_f2_a_pack(system_id, component_id, &msg , packet1.sue_time , packet1.sue_status , packet1.sue_latitude , packet1.sue_longitude , packet1.sue_altitude , packet1.sue_waypoint_index , packet1.sue_rmat0 , packet1.sue_rmat1 , packet1.sue_rmat2 , packet1.sue_rmat3 , packet1.sue_rmat4 , packet1.sue_rmat5 , packet1.sue_rmat6 , packet1.sue_rmat7 , packet1.sue_rmat8 , packet1.sue_cog , packet1.sue_sog , packet1.sue_cpu_load , packet1.sue_air_speed_3DIMU , packet1.sue_estimated_wind_0 , packet1.sue_estimated_wind_1 , packet1.sue_estimated_wind_2 , packet1.sue_magFieldEarth0 , packet1.sue_magFieldEarth1 , packet1.sue_magFieldEarth2 , packet1.sue_svs , packet1.sue_hdop );
  479. mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2);
  480. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  481. memset(&packet2, 0, sizeof(packet2));
  482. mavlink_msg_serial_udb_extra_f2_a_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_time , packet1.sue_status , packet1.sue_latitude , packet1.sue_longitude , packet1.sue_altitude , packet1.sue_waypoint_index , packet1.sue_rmat0 , packet1.sue_rmat1 , packet1.sue_rmat2 , packet1.sue_rmat3 , packet1.sue_rmat4 , packet1.sue_rmat5 , packet1.sue_rmat6 , packet1.sue_rmat7 , packet1.sue_rmat8 , packet1.sue_cog , packet1.sue_sog , packet1.sue_cpu_load , packet1.sue_air_speed_3DIMU , packet1.sue_estimated_wind_0 , packet1.sue_estimated_wind_1 , packet1.sue_estimated_wind_2 , packet1.sue_magFieldEarth0 , packet1.sue_magFieldEarth1 , packet1.sue_magFieldEarth2 , packet1.sue_svs , packet1.sue_hdop );
  483. mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2);
  484. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  485. memset(&packet2, 0, sizeof(packet2));
  486. mavlink_msg_to_send_buffer(buffer, &msg);
  487. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  488. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  489. }
  490. mavlink_msg_serial_udb_extra_f2_a_decode(last_msg, &packet2);
  491. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  492. memset(&packet2, 0, sizeof(packet2));
  493. mavlink_msg_serial_udb_extra_f2_a_send(MAVLINK_COMM_1 , packet1.sue_time , packet1.sue_status , packet1.sue_latitude , packet1.sue_longitude , packet1.sue_altitude , packet1.sue_waypoint_index , packet1.sue_rmat0 , packet1.sue_rmat1 , packet1.sue_rmat2 , packet1.sue_rmat3 , packet1.sue_rmat4 , packet1.sue_rmat5 , packet1.sue_rmat6 , packet1.sue_rmat7 , packet1.sue_rmat8 , packet1.sue_cog , packet1.sue_sog , packet1.sue_cpu_load , packet1.sue_air_speed_3DIMU , packet1.sue_estimated_wind_0 , packet1.sue_estimated_wind_1 , packet1.sue_estimated_wind_2 , packet1.sue_magFieldEarth0 , packet1.sue_magFieldEarth1 , packet1.sue_magFieldEarth2 , packet1.sue_svs , packet1.sue_hdop );
  494. mavlink_msg_serial_udb_extra_f2_a_decode(last_msg, &packet2);
  495. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  496. }
  497. static void mavlink_test_serial_udb_extra_f2_b(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  498. {
  499. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  500. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  501. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B >= 256) {
  502. return;
  503. }
  504. #endif
  505. mavlink_message_t msg;
  506. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  507. uint16_t i;
  508. mavlink_serial_udb_extra_f2_b_t packet_in = {
  509. 963497464,963497672,963497880,963498088,18067,18171,18275,18379,18483,18587,18691,18795,18899,19003,19107,19211,19315,19419,19523,19627,19731,19835,19939,20043,20147,20251,20355,20459,20563,20667,20771,20875,20979,21083,21187,21291,21395,21499,21603,21707,21811,21915,22019,22123,22227,22331,22435,22539,22643,22747
  510. };
  511. mavlink_serial_udb_extra_f2_b_t packet1, packet2;
  512. memset(&packet1, 0, sizeof(packet1));
  513. packet1.sue_time = packet_in.sue_time;
  514. packet1.sue_flags = packet_in.sue_flags;
  515. packet1.sue_barom_press = packet_in.sue_barom_press;
  516. packet1.sue_barom_alt = packet_in.sue_barom_alt;
  517. packet1.sue_pwm_input_1 = packet_in.sue_pwm_input_1;
  518. packet1.sue_pwm_input_2 = packet_in.sue_pwm_input_2;
  519. packet1.sue_pwm_input_3 = packet_in.sue_pwm_input_3;
  520. packet1.sue_pwm_input_4 = packet_in.sue_pwm_input_4;
  521. packet1.sue_pwm_input_5 = packet_in.sue_pwm_input_5;
  522. packet1.sue_pwm_input_6 = packet_in.sue_pwm_input_6;
  523. packet1.sue_pwm_input_7 = packet_in.sue_pwm_input_7;
  524. packet1.sue_pwm_input_8 = packet_in.sue_pwm_input_8;
  525. packet1.sue_pwm_input_9 = packet_in.sue_pwm_input_9;
  526. packet1.sue_pwm_input_10 = packet_in.sue_pwm_input_10;
  527. packet1.sue_pwm_input_11 = packet_in.sue_pwm_input_11;
  528. packet1.sue_pwm_input_12 = packet_in.sue_pwm_input_12;
  529. packet1.sue_pwm_output_1 = packet_in.sue_pwm_output_1;
  530. packet1.sue_pwm_output_2 = packet_in.sue_pwm_output_2;
  531. packet1.sue_pwm_output_3 = packet_in.sue_pwm_output_3;
  532. packet1.sue_pwm_output_4 = packet_in.sue_pwm_output_4;
  533. packet1.sue_pwm_output_5 = packet_in.sue_pwm_output_5;
  534. packet1.sue_pwm_output_6 = packet_in.sue_pwm_output_6;
  535. packet1.sue_pwm_output_7 = packet_in.sue_pwm_output_7;
  536. packet1.sue_pwm_output_8 = packet_in.sue_pwm_output_8;
  537. packet1.sue_pwm_output_9 = packet_in.sue_pwm_output_9;
  538. packet1.sue_pwm_output_10 = packet_in.sue_pwm_output_10;
  539. packet1.sue_pwm_output_11 = packet_in.sue_pwm_output_11;
  540. packet1.sue_pwm_output_12 = packet_in.sue_pwm_output_12;
  541. packet1.sue_imu_location_x = packet_in.sue_imu_location_x;
  542. packet1.sue_imu_location_y = packet_in.sue_imu_location_y;
  543. packet1.sue_imu_location_z = packet_in.sue_imu_location_z;
  544. packet1.sue_location_error_earth_x = packet_in.sue_location_error_earth_x;
  545. packet1.sue_location_error_earth_y = packet_in.sue_location_error_earth_y;
  546. packet1.sue_location_error_earth_z = packet_in.sue_location_error_earth_z;
  547. packet1.sue_osc_fails = packet_in.sue_osc_fails;
  548. packet1.sue_imu_velocity_x = packet_in.sue_imu_velocity_x;
  549. packet1.sue_imu_velocity_y = packet_in.sue_imu_velocity_y;
  550. packet1.sue_imu_velocity_z = packet_in.sue_imu_velocity_z;
  551. packet1.sue_waypoint_goal_x = packet_in.sue_waypoint_goal_x;
  552. packet1.sue_waypoint_goal_y = packet_in.sue_waypoint_goal_y;
  553. packet1.sue_waypoint_goal_z = packet_in.sue_waypoint_goal_z;
  554. packet1.sue_aero_x = packet_in.sue_aero_x;
  555. packet1.sue_aero_y = packet_in.sue_aero_y;
  556. packet1.sue_aero_z = packet_in.sue_aero_z;
  557. packet1.sue_barom_temp = packet_in.sue_barom_temp;
  558. packet1.sue_bat_volt = packet_in.sue_bat_volt;
  559. packet1.sue_bat_amp = packet_in.sue_bat_amp;
  560. packet1.sue_bat_amp_hours = packet_in.sue_bat_amp_hours;
  561. packet1.sue_desired_height = packet_in.sue_desired_height;
  562. packet1.sue_memory_stack_free = packet_in.sue_memory_stack_free;
  563. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  564. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  565. // cope with extensions
  566. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN);
  567. }
  568. #endif
  569. memset(&packet2, 0, sizeof(packet2));
  570. mavlink_msg_serial_udb_extra_f2_b_encode(system_id, component_id, &msg, &packet1);
  571. mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2);
  572. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  573. memset(&packet2, 0, sizeof(packet2));
  574. mavlink_msg_serial_udb_extra_f2_b_pack(system_id, component_id, &msg , packet1.sue_time , packet1.sue_pwm_input_1 , packet1.sue_pwm_input_2 , packet1.sue_pwm_input_3 , packet1.sue_pwm_input_4 , packet1.sue_pwm_input_5 , packet1.sue_pwm_input_6 , packet1.sue_pwm_input_7 , packet1.sue_pwm_input_8 , packet1.sue_pwm_input_9 , packet1.sue_pwm_input_10 , packet1.sue_pwm_input_11 , packet1.sue_pwm_input_12 , packet1.sue_pwm_output_1 , packet1.sue_pwm_output_2 , packet1.sue_pwm_output_3 , packet1.sue_pwm_output_4 , packet1.sue_pwm_output_5 , packet1.sue_pwm_output_6 , packet1.sue_pwm_output_7 , packet1.sue_pwm_output_8 , packet1.sue_pwm_output_9 , packet1.sue_pwm_output_10 , packet1.sue_pwm_output_11 , packet1.sue_pwm_output_12 , packet1.sue_imu_location_x , packet1.sue_imu_location_y , packet1.sue_imu_location_z , packet1.sue_location_error_earth_x , packet1.sue_location_error_earth_y , packet1.sue_location_error_earth_z , packet1.sue_flags , packet1.sue_osc_fails , packet1.sue_imu_velocity_x , packet1.sue_imu_velocity_y , packet1.sue_imu_velocity_z , packet1.sue_waypoint_goal_x , packet1.sue_waypoint_goal_y , packet1.sue_waypoint_goal_z , packet1.sue_aero_x , packet1.sue_aero_y , packet1.sue_aero_z , packet1.sue_barom_temp , packet1.sue_barom_press , packet1.sue_barom_alt , packet1.sue_bat_volt , packet1.sue_bat_amp , packet1.sue_bat_amp_hours , packet1.sue_desired_height , packet1.sue_memory_stack_free );
  575. mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2);
  576. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  577. memset(&packet2, 0, sizeof(packet2));
  578. mavlink_msg_serial_udb_extra_f2_b_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_time , packet1.sue_pwm_input_1 , packet1.sue_pwm_input_2 , packet1.sue_pwm_input_3 , packet1.sue_pwm_input_4 , packet1.sue_pwm_input_5 , packet1.sue_pwm_input_6 , packet1.sue_pwm_input_7 , packet1.sue_pwm_input_8 , packet1.sue_pwm_input_9 , packet1.sue_pwm_input_10 , packet1.sue_pwm_input_11 , packet1.sue_pwm_input_12 , packet1.sue_pwm_output_1 , packet1.sue_pwm_output_2 , packet1.sue_pwm_output_3 , packet1.sue_pwm_output_4 , packet1.sue_pwm_output_5 , packet1.sue_pwm_output_6 , packet1.sue_pwm_output_7 , packet1.sue_pwm_output_8 , packet1.sue_pwm_output_9 , packet1.sue_pwm_output_10 , packet1.sue_pwm_output_11 , packet1.sue_pwm_output_12 , packet1.sue_imu_location_x , packet1.sue_imu_location_y , packet1.sue_imu_location_z , packet1.sue_location_error_earth_x , packet1.sue_location_error_earth_y , packet1.sue_location_error_earth_z , packet1.sue_flags , packet1.sue_osc_fails , packet1.sue_imu_velocity_x , packet1.sue_imu_velocity_y , packet1.sue_imu_velocity_z , packet1.sue_waypoint_goal_x , packet1.sue_waypoint_goal_y , packet1.sue_waypoint_goal_z , packet1.sue_aero_x , packet1.sue_aero_y , packet1.sue_aero_z , packet1.sue_barom_temp , packet1.sue_barom_press , packet1.sue_barom_alt , packet1.sue_bat_volt , packet1.sue_bat_amp , packet1.sue_bat_amp_hours , packet1.sue_desired_height , packet1.sue_memory_stack_free );
  579. mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2);
  580. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  581. memset(&packet2, 0, sizeof(packet2));
  582. mavlink_msg_to_send_buffer(buffer, &msg);
  583. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  584. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  585. }
  586. mavlink_msg_serial_udb_extra_f2_b_decode(last_msg, &packet2);
  587. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  588. memset(&packet2, 0, sizeof(packet2));
  589. mavlink_msg_serial_udb_extra_f2_b_send(MAVLINK_COMM_1 , packet1.sue_time , packet1.sue_pwm_input_1 , packet1.sue_pwm_input_2 , packet1.sue_pwm_input_3 , packet1.sue_pwm_input_4 , packet1.sue_pwm_input_5 , packet1.sue_pwm_input_6 , packet1.sue_pwm_input_7 , packet1.sue_pwm_input_8 , packet1.sue_pwm_input_9 , packet1.sue_pwm_input_10 , packet1.sue_pwm_input_11 , packet1.sue_pwm_input_12 , packet1.sue_pwm_output_1 , packet1.sue_pwm_output_2 , packet1.sue_pwm_output_3 , packet1.sue_pwm_output_4 , packet1.sue_pwm_output_5 , packet1.sue_pwm_output_6 , packet1.sue_pwm_output_7 , packet1.sue_pwm_output_8 , packet1.sue_pwm_output_9 , packet1.sue_pwm_output_10 , packet1.sue_pwm_output_11 , packet1.sue_pwm_output_12 , packet1.sue_imu_location_x , packet1.sue_imu_location_y , packet1.sue_imu_location_z , packet1.sue_location_error_earth_x , packet1.sue_location_error_earth_y , packet1.sue_location_error_earth_z , packet1.sue_flags , packet1.sue_osc_fails , packet1.sue_imu_velocity_x , packet1.sue_imu_velocity_y , packet1.sue_imu_velocity_z , packet1.sue_waypoint_goal_x , packet1.sue_waypoint_goal_y , packet1.sue_waypoint_goal_z , packet1.sue_aero_x , packet1.sue_aero_y , packet1.sue_aero_z , packet1.sue_barom_temp , packet1.sue_barom_press , packet1.sue_barom_alt , packet1.sue_bat_volt , packet1.sue_bat_amp , packet1.sue_bat_amp_hours , packet1.sue_desired_height , packet1.sue_memory_stack_free );
  590. mavlink_msg_serial_udb_extra_f2_b_decode(last_msg, &packet2);
  591. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  592. }
  593. static void mavlink_test_serial_udb_extra_f4(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  594. {
  595. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  596. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  597. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4 >= 256) {
  598. return;
  599. }
  600. #endif
  601. mavlink_message_t msg;
  602. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  603. uint16_t i;
  604. mavlink_serial_udb_extra_f4_t packet_in = {
  605. 5,72,139,206,17,84,151,218,29,96
  606. };
  607. mavlink_serial_udb_extra_f4_t packet1, packet2;
  608. memset(&packet1, 0, sizeof(packet1));
  609. packet1.sue_ROLL_STABILIZATION_AILERONS = packet_in.sue_ROLL_STABILIZATION_AILERONS;
  610. packet1.sue_ROLL_STABILIZATION_RUDDER = packet_in.sue_ROLL_STABILIZATION_RUDDER;
  611. packet1.sue_PITCH_STABILIZATION = packet_in.sue_PITCH_STABILIZATION;
  612. packet1.sue_YAW_STABILIZATION_RUDDER = packet_in.sue_YAW_STABILIZATION_RUDDER;
  613. packet1.sue_YAW_STABILIZATION_AILERON = packet_in.sue_YAW_STABILIZATION_AILERON;
  614. packet1.sue_AILERON_NAVIGATION = packet_in.sue_AILERON_NAVIGATION;
  615. packet1.sue_RUDDER_NAVIGATION = packet_in.sue_RUDDER_NAVIGATION;
  616. packet1.sue_ALTITUDEHOLD_STABILIZED = packet_in.sue_ALTITUDEHOLD_STABILIZED;
  617. packet1.sue_ALTITUDEHOLD_WAYPOINT = packet_in.sue_ALTITUDEHOLD_WAYPOINT;
  618. packet1.sue_RACING_MODE = packet_in.sue_RACING_MODE;
  619. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  620. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  621. // cope with extensions
  622. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN);
  623. }
  624. #endif
  625. memset(&packet2, 0, sizeof(packet2));
  626. mavlink_msg_serial_udb_extra_f4_encode(system_id, component_id, &msg, &packet1);
  627. mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2);
  628. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  629. memset(&packet2, 0, sizeof(packet2));
  630. mavlink_msg_serial_udb_extra_f4_pack(system_id, component_id, &msg , packet1.sue_ROLL_STABILIZATION_AILERONS , packet1.sue_ROLL_STABILIZATION_RUDDER , packet1.sue_PITCH_STABILIZATION , packet1.sue_YAW_STABILIZATION_RUDDER , packet1.sue_YAW_STABILIZATION_AILERON , packet1.sue_AILERON_NAVIGATION , packet1.sue_RUDDER_NAVIGATION , packet1.sue_ALTITUDEHOLD_STABILIZED , packet1.sue_ALTITUDEHOLD_WAYPOINT , packet1.sue_RACING_MODE );
  631. mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2);
  632. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  633. memset(&packet2, 0, sizeof(packet2));
  634. mavlink_msg_serial_udb_extra_f4_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ROLL_STABILIZATION_AILERONS , packet1.sue_ROLL_STABILIZATION_RUDDER , packet1.sue_PITCH_STABILIZATION , packet1.sue_YAW_STABILIZATION_RUDDER , packet1.sue_YAW_STABILIZATION_AILERON , packet1.sue_AILERON_NAVIGATION , packet1.sue_RUDDER_NAVIGATION , packet1.sue_ALTITUDEHOLD_STABILIZED , packet1.sue_ALTITUDEHOLD_WAYPOINT , packet1.sue_RACING_MODE );
  635. mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2);
  636. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  637. memset(&packet2, 0, sizeof(packet2));
  638. mavlink_msg_to_send_buffer(buffer, &msg);
  639. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  640. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  641. }
  642. mavlink_msg_serial_udb_extra_f4_decode(last_msg, &packet2);
  643. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  644. memset(&packet2, 0, sizeof(packet2));
  645. mavlink_msg_serial_udb_extra_f4_send(MAVLINK_COMM_1 , packet1.sue_ROLL_STABILIZATION_AILERONS , packet1.sue_ROLL_STABILIZATION_RUDDER , packet1.sue_PITCH_STABILIZATION , packet1.sue_YAW_STABILIZATION_RUDDER , packet1.sue_YAW_STABILIZATION_AILERON , packet1.sue_AILERON_NAVIGATION , packet1.sue_RUDDER_NAVIGATION , packet1.sue_ALTITUDEHOLD_STABILIZED , packet1.sue_ALTITUDEHOLD_WAYPOINT , packet1.sue_RACING_MODE );
  646. mavlink_msg_serial_udb_extra_f4_decode(last_msg, &packet2);
  647. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  648. }
  649. static void mavlink_test_serial_udb_extra_f5(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  650. {
  651. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  652. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  653. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5 >= 256) {
  654. return;
  655. }
  656. #endif
  657. mavlink_message_t msg;
  658. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  659. uint16_t i;
  660. mavlink_serial_udb_extra_f5_t packet_in = {
  661. 17.0,45.0,73.0,101.0
  662. };
  663. mavlink_serial_udb_extra_f5_t packet1, packet2;
  664. memset(&packet1, 0, sizeof(packet1));
  665. packet1.sue_YAWKP_AILERON = packet_in.sue_YAWKP_AILERON;
  666. packet1.sue_YAWKD_AILERON = packet_in.sue_YAWKD_AILERON;
  667. packet1.sue_ROLLKP = packet_in.sue_ROLLKP;
  668. packet1.sue_ROLLKD = packet_in.sue_ROLLKD;
  669. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  670. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  671. // cope with extensions
  672. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN);
  673. }
  674. #endif
  675. memset(&packet2, 0, sizeof(packet2));
  676. mavlink_msg_serial_udb_extra_f5_encode(system_id, component_id, &msg, &packet1);
  677. mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2);
  678. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  679. memset(&packet2, 0, sizeof(packet2));
  680. mavlink_msg_serial_udb_extra_f5_pack(system_id, component_id, &msg , packet1.sue_YAWKP_AILERON , packet1.sue_YAWKD_AILERON , packet1.sue_ROLLKP , packet1.sue_ROLLKD );
  681. mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2);
  682. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  683. memset(&packet2, 0, sizeof(packet2));
  684. mavlink_msg_serial_udb_extra_f5_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_YAWKP_AILERON , packet1.sue_YAWKD_AILERON , packet1.sue_ROLLKP , packet1.sue_ROLLKD );
  685. mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2);
  686. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  687. memset(&packet2, 0, sizeof(packet2));
  688. mavlink_msg_to_send_buffer(buffer, &msg);
  689. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  690. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  691. }
  692. mavlink_msg_serial_udb_extra_f5_decode(last_msg, &packet2);
  693. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  694. memset(&packet2, 0, sizeof(packet2));
  695. mavlink_msg_serial_udb_extra_f5_send(MAVLINK_COMM_1 , packet1.sue_YAWKP_AILERON , packet1.sue_YAWKD_AILERON , packet1.sue_ROLLKP , packet1.sue_ROLLKD );
  696. mavlink_msg_serial_udb_extra_f5_decode(last_msg, &packet2);
  697. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  698. }
  699. static void mavlink_test_serial_udb_extra_f6(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  700. {
  701. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  702. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  703. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6 >= 256) {
  704. return;
  705. }
  706. #endif
  707. mavlink_message_t msg;
  708. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  709. uint16_t i;
  710. mavlink_serial_udb_extra_f6_t packet_in = {
  711. 17.0,45.0,73.0,101.0,129.0
  712. };
  713. mavlink_serial_udb_extra_f6_t packet1, packet2;
  714. memset(&packet1, 0, sizeof(packet1));
  715. packet1.sue_PITCHGAIN = packet_in.sue_PITCHGAIN;
  716. packet1.sue_PITCHKD = packet_in.sue_PITCHKD;
  717. packet1.sue_RUDDER_ELEV_MIX = packet_in.sue_RUDDER_ELEV_MIX;
  718. packet1.sue_ROLL_ELEV_MIX = packet_in.sue_ROLL_ELEV_MIX;
  719. packet1.sue_ELEVATOR_BOOST = packet_in.sue_ELEVATOR_BOOST;
  720. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  721. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  722. // cope with extensions
  723. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN);
  724. }
  725. #endif
  726. memset(&packet2, 0, sizeof(packet2));
  727. mavlink_msg_serial_udb_extra_f6_encode(system_id, component_id, &msg, &packet1);
  728. mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2);
  729. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  730. memset(&packet2, 0, sizeof(packet2));
  731. mavlink_msg_serial_udb_extra_f6_pack(system_id, component_id, &msg , packet1.sue_PITCHGAIN , packet1.sue_PITCHKD , packet1.sue_RUDDER_ELEV_MIX , packet1.sue_ROLL_ELEV_MIX , packet1.sue_ELEVATOR_BOOST );
  732. mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2);
  733. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  734. memset(&packet2, 0, sizeof(packet2));
  735. mavlink_msg_serial_udb_extra_f6_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_PITCHGAIN , packet1.sue_PITCHKD , packet1.sue_RUDDER_ELEV_MIX , packet1.sue_ROLL_ELEV_MIX , packet1.sue_ELEVATOR_BOOST );
  736. mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2);
  737. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  738. memset(&packet2, 0, sizeof(packet2));
  739. mavlink_msg_to_send_buffer(buffer, &msg);
  740. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  741. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  742. }
  743. mavlink_msg_serial_udb_extra_f6_decode(last_msg, &packet2);
  744. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  745. memset(&packet2, 0, sizeof(packet2));
  746. mavlink_msg_serial_udb_extra_f6_send(MAVLINK_COMM_1 , packet1.sue_PITCHGAIN , packet1.sue_PITCHKD , packet1.sue_RUDDER_ELEV_MIX , packet1.sue_ROLL_ELEV_MIX , packet1.sue_ELEVATOR_BOOST );
  747. mavlink_msg_serial_udb_extra_f6_decode(last_msg, &packet2);
  748. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  749. }
  750. static void mavlink_test_serial_udb_extra_f7(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  751. {
  752. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  753. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  754. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7 >= 256) {
  755. return;
  756. }
  757. #endif
  758. mavlink_message_t msg;
  759. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  760. uint16_t i;
  761. mavlink_serial_udb_extra_f7_t packet_in = {
  762. 17.0,45.0,73.0,101.0,129.0,157.0
  763. };
  764. mavlink_serial_udb_extra_f7_t packet1, packet2;
  765. memset(&packet1, 0, sizeof(packet1));
  766. packet1.sue_YAWKP_RUDDER = packet_in.sue_YAWKP_RUDDER;
  767. packet1.sue_YAWKD_RUDDER = packet_in.sue_YAWKD_RUDDER;
  768. packet1.sue_ROLLKP_RUDDER = packet_in.sue_ROLLKP_RUDDER;
  769. packet1.sue_ROLLKD_RUDDER = packet_in.sue_ROLLKD_RUDDER;
  770. packet1.sue_RUDDER_BOOST = packet_in.sue_RUDDER_BOOST;
  771. packet1.sue_RTL_PITCH_DOWN = packet_in.sue_RTL_PITCH_DOWN;
  772. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  773. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  774. // cope with extensions
  775. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN);
  776. }
  777. #endif
  778. memset(&packet2, 0, sizeof(packet2));
  779. mavlink_msg_serial_udb_extra_f7_encode(system_id, component_id, &msg, &packet1);
  780. mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2);
  781. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  782. memset(&packet2, 0, sizeof(packet2));
  783. mavlink_msg_serial_udb_extra_f7_pack(system_id, component_id, &msg , packet1.sue_YAWKP_RUDDER , packet1.sue_YAWKD_RUDDER , packet1.sue_ROLLKP_RUDDER , packet1.sue_ROLLKD_RUDDER , packet1.sue_RUDDER_BOOST , packet1.sue_RTL_PITCH_DOWN );
  784. mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2);
  785. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  786. memset(&packet2, 0, sizeof(packet2));
  787. mavlink_msg_serial_udb_extra_f7_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_YAWKP_RUDDER , packet1.sue_YAWKD_RUDDER , packet1.sue_ROLLKP_RUDDER , packet1.sue_ROLLKD_RUDDER , packet1.sue_RUDDER_BOOST , packet1.sue_RTL_PITCH_DOWN );
  788. mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2);
  789. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  790. memset(&packet2, 0, sizeof(packet2));
  791. mavlink_msg_to_send_buffer(buffer, &msg);
  792. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  793. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  794. }
  795. mavlink_msg_serial_udb_extra_f7_decode(last_msg, &packet2);
  796. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  797. memset(&packet2, 0, sizeof(packet2));
  798. mavlink_msg_serial_udb_extra_f7_send(MAVLINK_COMM_1 , packet1.sue_YAWKP_RUDDER , packet1.sue_YAWKD_RUDDER , packet1.sue_ROLLKP_RUDDER , packet1.sue_ROLLKD_RUDDER , packet1.sue_RUDDER_BOOST , packet1.sue_RTL_PITCH_DOWN );
  799. mavlink_msg_serial_udb_extra_f7_decode(last_msg, &packet2);
  800. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  801. }
  802. static void mavlink_test_serial_udb_extra_f8(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  803. {
  804. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  805. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  806. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8 >= 256) {
  807. return;
  808. }
  809. #endif
  810. mavlink_message_t msg;
  811. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  812. uint16_t i;
  813. mavlink_serial_udb_extra_f8_t packet_in = {
  814. 17.0,45.0,73.0,101.0,129.0,157.0,185.0
  815. };
  816. mavlink_serial_udb_extra_f8_t packet1, packet2;
  817. memset(&packet1, 0, sizeof(packet1));
  818. packet1.sue_HEIGHT_TARGET_MAX = packet_in.sue_HEIGHT_TARGET_MAX;
  819. packet1.sue_HEIGHT_TARGET_MIN = packet_in.sue_HEIGHT_TARGET_MIN;
  820. packet1.sue_ALT_HOLD_THROTTLE_MIN = packet_in.sue_ALT_HOLD_THROTTLE_MIN;
  821. packet1.sue_ALT_HOLD_THROTTLE_MAX = packet_in.sue_ALT_HOLD_THROTTLE_MAX;
  822. packet1.sue_ALT_HOLD_PITCH_MIN = packet_in.sue_ALT_HOLD_PITCH_MIN;
  823. packet1.sue_ALT_HOLD_PITCH_MAX = packet_in.sue_ALT_HOLD_PITCH_MAX;
  824. packet1.sue_ALT_HOLD_PITCH_HIGH = packet_in.sue_ALT_HOLD_PITCH_HIGH;
  825. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  826. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  827. // cope with extensions
  828. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN);
  829. }
  830. #endif
  831. memset(&packet2, 0, sizeof(packet2));
  832. mavlink_msg_serial_udb_extra_f8_encode(system_id, component_id, &msg, &packet1);
  833. mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2);
  834. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  835. memset(&packet2, 0, sizeof(packet2));
  836. mavlink_msg_serial_udb_extra_f8_pack(system_id, component_id, &msg , packet1.sue_HEIGHT_TARGET_MAX , packet1.sue_HEIGHT_TARGET_MIN , packet1.sue_ALT_HOLD_THROTTLE_MIN , packet1.sue_ALT_HOLD_THROTTLE_MAX , packet1.sue_ALT_HOLD_PITCH_MIN , packet1.sue_ALT_HOLD_PITCH_MAX , packet1.sue_ALT_HOLD_PITCH_HIGH );
  837. mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2);
  838. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  839. memset(&packet2, 0, sizeof(packet2));
  840. mavlink_msg_serial_udb_extra_f8_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_HEIGHT_TARGET_MAX , packet1.sue_HEIGHT_TARGET_MIN , packet1.sue_ALT_HOLD_THROTTLE_MIN , packet1.sue_ALT_HOLD_THROTTLE_MAX , packet1.sue_ALT_HOLD_PITCH_MIN , packet1.sue_ALT_HOLD_PITCH_MAX , packet1.sue_ALT_HOLD_PITCH_HIGH );
  841. mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2);
  842. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  843. memset(&packet2, 0, sizeof(packet2));
  844. mavlink_msg_to_send_buffer(buffer, &msg);
  845. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  846. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  847. }
  848. mavlink_msg_serial_udb_extra_f8_decode(last_msg, &packet2);
  849. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  850. memset(&packet2, 0, sizeof(packet2));
  851. mavlink_msg_serial_udb_extra_f8_send(MAVLINK_COMM_1 , packet1.sue_HEIGHT_TARGET_MAX , packet1.sue_HEIGHT_TARGET_MIN , packet1.sue_ALT_HOLD_THROTTLE_MIN , packet1.sue_ALT_HOLD_THROTTLE_MAX , packet1.sue_ALT_HOLD_PITCH_MIN , packet1.sue_ALT_HOLD_PITCH_MAX , packet1.sue_ALT_HOLD_PITCH_HIGH );
  852. mavlink_msg_serial_udb_extra_f8_decode(last_msg, &packet2);
  853. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  854. }
  855. static void mavlink_test_serial_udb_extra_f13(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  856. {
  857. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  858. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  859. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13 >= 256) {
  860. return;
  861. }
  862. #endif
  863. mavlink_message_t msg;
  864. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  865. uint16_t i;
  866. mavlink_serial_udb_extra_f13_t packet_in = {
  867. 963497464,963497672,963497880,17859
  868. };
  869. mavlink_serial_udb_extra_f13_t packet1, packet2;
  870. memset(&packet1, 0, sizeof(packet1));
  871. packet1.sue_lat_origin = packet_in.sue_lat_origin;
  872. packet1.sue_lon_origin = packet_in.sue_lon_origin;
  873. packet1.sue_alt_origin = packet_in.sue_alt_origin;
  874. packet1.sue_week_no = packet_in.sue_week_no;
  875. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  876. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  877. // cope with extensions
  878. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN);
  879. }
  880. #endif
  881. memset(&packet2, 0, sizeof(packet2));
  882. mavlink_msg_serial_udb_extra_f13_encode(system_id, component_id, &msg, &packet1);
  883. mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2);
  884. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  885. memset(&packet2, 0, sizeof(packet2));
  886. mavlink_msg_serial_udb_extra_f13_pack(system_id, component_id, &msg , packet1.sue_week_no , packet1.sue_lat_origin , packet1.sue_lon_origin , packet1.sue_alt_origin );
  887. mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2);
  888. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  889. memset(&packet2, 0, sizeof(packet2));
  890. mavlink_msg_serial_udb_extra_f13_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_week_no , packet1.sue_lat_origin , packet1.sue_lon_origin , packet1.sue_alt_origin );
  891. mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2);
  892. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  893. memset(&packet2, 0, sizeof(packet2));
  894. mavlink_msg_to_send_buffer(buffer, &msg);
  895. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  896. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  897. }
  898. mavlink_msg_serial_udb_extra_f13_decode(last_msg, &packet2);
  899. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  900. memset(&packet2, 0, sizeof(packet2));
  901. mavlink_msg_serial_udb_extra_f13_send(MAVLINK_COMM_1 , packet1.sue_week_no , packet1.sue_lat_origin , packet1.sue_lon_origin , packet1.sue_alt_origin );
  902. mavlink_msg_serial_udb_extra_f13_decode(last_msg, &packet2);
  903. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  904. }
  905. static void mavlink_test_serial_udb_extra_f14(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  906. {
  907. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  908. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  909. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14 >= 256) {
  910. return;
  911. }
  912. #endif
  913. mavlink_message_t msg;
  914. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  915. uint16_t i;
  916. mavlink_serial_udb_extra_f14_t packet_in = {
  917. 963497464,17443,17547,17651,163,230,41,108,175,242,53
  918. };
  919. mavlink_serial_udb_extra_f14_t packet1, packet2;
  920. memset(&packet1, 0, sizeof(packet1));
  921. packet1.sue_TRAP_SOURCE = packet_in.sue_TRAP_SOURCE;
  922. packet1.sue_RCON = packet_in.sue_RCON;
  923. packet1.sue_TRAP_FLAGS = packet_in.sue_TRAP_FLAGS;
  924. packet1.sue_osc_fail_count = packet_in.sue_osc_fail_count;
  925. packet1.sue_WIND_ESTIMATION = packet_in.sue_WIND_ESTIMATION;
  926. packet1.sue_GPS_TYPE = packet_in.sue_GPS_TYPE;
  927. packet1.sue_DR = packet_in.sue_DR;
  928. packet1.sue_BOARD_TYPE = packet_in.sue_BOARD_TYPE;
  929. packet1.sue_AIRFRAME = packet_in.sue_AIRFRAME;
  930. packet1.sue_CLOCK_CONFIG = packet_in.sue_CLOCK_CONFIG;
  931. packet1.sue_FLIGHT_PLAN_TYPE = packet_in.sue_FLIGHT_PLAN_TYPE;
  932. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  933. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  934. // cope with extensions
  935. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN);
  936. }
  937. #endif
  938. memset(&packet2, 0, sizeof(packet2));
  939. mavlink_msg_serial_udb_extra_f14_encode(system_id, component_id, &msg, &packet1);
  940. mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2);
  941. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  942. memset(&packet2, 0, sizeof(packet2));
  943. mavlink_msg_serial_udb_extra_f14_pack(system_id, component_id, &msg , packet1.sue_WIND_ESTIMATION , packet1.sue_GPS_TYPE , packet1.sue_DR , packet1.sue_BOARD_TYPE , packet1.sue_AIRFRAME , packet1.sue_RCON , packet1.sue_TRAP_FLAGS , packet1.sue_TRAP_SOURCE , packet1.sue_osc_fail_count , packet1.sue_CLOCK_CONFIG , packet1.sue_FLIGHT_PLAN_TYPE );
  944. mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2);
  945. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  946. memset(&packet2, 0, sizeof(packet2));
  947. mavlink_msg_serial_udb_extra_f14_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_WIND_ESTIMATION , packet1.sue_GPS_TYPE , packet1.sue_DR , packet1.sue_BOARD_TYPE , packet1.sue_AIRFRAME , packet1.sue_RCON , packet1.sue_TRAP_FLAGS , packet1.sue_TRAP_SOURCE , packet1.sue_osc_fail_count , packet1.sue_CLOCK_CONFIG , packet1.sue_FLIGHT_PLAN_TYPE );
  948. mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2);
  949. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  950. memset(&packet2, 0, sizeof(packet2));
  951. mavlink_msg_to_send_buffer(buffer, &msg);
  952. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  953. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  954. }
  955. mavlink_msg_serial_udb_extra_f14_decode(last_msg, &packet2);
  956. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  957. memset(&packet2, 0, sizeof(packet2));
  958. mavlink_msg_serial_udb_extra_f14_send(MAVLINK_COMM_1 , packet1.sue_WIND_ESTIMATION , packet1.sue_GPS_TYPE , packet1.sue_DR , packet1.sue_BOARD_TYPE , packet1.sue_AIRFRAME , packet1.sue_RCON , packet1.sue_TRAP_FLAGS , packet1.sue_TRAP_SOURCE , packet1.sue_osc_fail_count , packet1.sue_CLOCK_CONFIG , packet1.sue_FLIGHT_PLAN_TYPE );
  959. mavlink_msg_serial_udb_extra_f14_decode(last_msg, &packet2);
  960. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  961. }
  962. static void mavlink_test_serial_udb_extra_f15(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  963. {
  964. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  965. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  966. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15 >= 256) {
  967. return;
  968. }
  969. #endif
  970. mavlink_message_t msg;
  971. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  972. uint16_t i;
  973. mavlink_serial_udb_extra_f15_t packet_in = {
  974. { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },{ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 }
  975. };
  976. mavlink_serial_udb_extra_f15_t packet1, packet2;
  977. memset(&packet1, 0, sizeof(packet1));
  978. mav_array_memcpy(packet1.sue_ID_VEHICLE_MODEL_NAME, packet_in.sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40);
  979. mav_array_memcpy(packet1.sue_ID_VEHICLE_REGISTRATION, packet_in.sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20);
  980. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  981. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  982. // cope with extensions
  983. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN);
  984. }
  985. #endif
  986. memset(&packet2, 0, sizeof(packet2));
  987. mavlink_msg_serial_udb_extra_f15_encode(system_id, component_id, &msg, &packet1);
  988. mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2);
  989. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  990. memset(&packet2, 0, sizeof(packet2));
  991. mavlink_msg_serial_udb_extra_f15_pack(system_id, component_id, &msg , packet1.sue_ID_VEHICLE_MODEL_NAME , packet1.sue_ID_VEHICLE_REGISTRATION );
  992. mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2);
  993. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  994. memset(&packet2, 0, sizeof(packet2));
  995. mavlink_msg_serial_udb_extra_f15_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ID_VEHICLE_MODEL_NAME , packet1.sue_ID_VEHICLE_REGISTRATION );
  996. mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2);
  997. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  998. memset(&packet2, 0, sizeof(packet2));
  999. mavlink_msg_to_send_buffer(buffer, &msg);
  1000. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1001. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1002. }
  1003. mavlink_msg_serial_udb_extra_f15_decode(last_msg, &packet2);
  1004. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1005. memset(&packet2, 0, sizeof(packet2));
  1006. mavlink_msg_serial_udb_extra_f15_send(MAVLINK_COMM_1 , packet1.sue_ID_VEHICLE_MODEL_NAME , packet1.sue_ID_VEHICLE_REGISTRATION );
  1007. mavlink_msg_serial_udb_extra_f15_decode(last_msg, &packet2);
  1008. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1009. }
  1010. static void mavlink_test_serial_udb_extra_f16(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1011. {
  1012. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1013. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1014. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16 >= 256) {
  1015. return;
  1016. }
  1017. #endif
  1018. mavlink_message_t msg;
  1019. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1020. uint16_t i;
  1021. mavlink_serial_udb_extra_f16_t packet_in = {
  1022. { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },{ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194 }
  1023. };
  1024. mavlink_serial_udb_extra_f16_t packet1, packet2;
  1025. memset(&packet1, 0, sizeof(packet1));
  1026. mav_array_memcpy(packet1.sue_ID_LEAD_PILOT, packet_in.sue_ID_LEAD_PILOT, sizeof(uint8_t)*40);
  1027. mav_array_memcpy(packet1.sue_ID_DIY_DRONES_URL, packet_in.sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70);
  1028. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1029. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1030. // cope with extensions
  1031. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN);
  1032. }
  1033. #endif
  1034. memset(&packet2, 0, sizeof(packet2));
  1035. mavlink_msg_serial_udb_extra_f16_encode(system_id, component_id, &msg, &packet1);
  1036. mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2);
  1037. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1038. memset(&packet2, 0, sizeof(packet2));
  1039. mavlink_msg_serial_udb_extra_f16_pack(system_id, component_id, &msg , packet1.sue_ID_LEAD_PILOT , packet1.sue_ID_DIY_DRONES_URL );
  1040. mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2);
  1041. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1042. memset(&packet2, 0, sizeof(packet2));
  1043. mavlink_msg_serial_udb_extra_f16_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ID_LEAD_PILOT , packet1.sue_ID_DIY_DRONES_URL );
  1044. mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2);
  1045. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1046. memset(&packet2, 0, sizeof(packet2));
  1047. mavlink_msg_to_send_buffer(buffer, &msg);
  1048. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1049. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1050. }
  1051. mavlink_msg_serial_udb_extra_f16_decode(last_msg, &packet2);
  1052. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1053. memset(&packet2, 0, sizeof(packet2));
  1054. mavlink_msg_serial_udb_extra_f16_send(MAVLINK_COMM_1 , packet1.sue_ID_LEAD_PILOT , packet1.sue_ID_DIY_DRONES_URL );
  1055. mavlink_msg_serial_udb_extra_f16_decode(last_msg, &packet2);
  1056. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1057. }
  1058. static void mavlink_test_altitudes(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1059. {
  1060. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1061. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1062. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ALTITUDES >= 256) {
  1063. return;
  1064. }
  1065. #endif
  1066. mavlink_message_t msg;
  1067. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1068. uint16_t i;
  1069. mavlink_altitudes_t packet_in = {
  1070. 963497464,963497672,963497880,963498088,963498296,963498504,963498712
  1071. };
  1072. mavlink_altitudes_t packet1, packet2;
  1073. memset(&packet1, 0, sizeof(packet1));
  1074. packet1.time_boot_ms = packet_in.time_boot_ms;
  1075. packet1.alt_gps = packet_in.alt_gps;
  1076. packet1.alt_imu = packet_in.alt_imu;
  1077. packet1.alt_barometric = packet_in.alt_barometric;
  1078. packet1.alt_optical_flow = packet_in.alt_optical_flow;
  1079. packet1.alt_range_finder = packet_in.alt_range_finder;
  1080. packet1.alt_extra = packet_in.alt_extra;
  1081. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1082. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1083. // cope with extensions
  1084. memset(MAVLINK_MSG_ID_ALTITUDES_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ALTITUDES_MIN_LEN);
  1085. }
  1086. #endif
  1087. memset(&packet2, 0, sizeof(packet2));
  1088. mavlink_msg_altitudes_encode(system_id, component_id, &msg, &packet1);
  1089. mavlink_msg_altitudes_decode(&msg, &packet2);
  1090. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1091. memset(&packet2, 0, sizeof(packet2));
  1092. mavlink_msg_altitudes_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.alt_gps , packet1.alt_imu , packet1.alt_barometric , packet1.alt_optical_flow , packet1.alt_range_finder , packet1.alt_extra );
  1093. mavlink_msg_altitudes_decode(&msg, &packet2);
  1094. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1095. memset(&packet2, 0, sizeof(packet2));
  1096. mavlink_msg_altitudes_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.alt_gps , packet1.alt_imu , packet1.alt_barometric , packet1.alt_optical_flow , packet1.alt_range_finder , packet1.alt_extra );
  1097. mavlink_msg_altitudes_decode(&msg, &packet2);
  1098. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1099. memset(&packet2, 0, sizeof(packet2));
  1100. mavlink_msg_to_send_buffer(buffer, &msg);
  1101. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1102. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1103. }
  1104. mavlink_msg_altitudes_decode(last_msg, &packet2);
  1105. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1106. memset(&packet2, 0, sizeof(packet2));
  1107. mavlink_msg_altitudes_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.alt_gps , packet1.alt_imu , packet1.alt_barometric , packet1.alt_optical_flow , packet1.alt_range_finder , packet1.alt_extra );
  1108. mavlink_msg_altitudes_decode(last_msg, &packet2);
  1109. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1110. }
  1111. static void mavlink_test_airspeeds(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1112. {
  1113. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1114. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1115. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRSPEEDS >= 256) {
  1116. return;
  1117. }
  1118. #endif
  1119. mavlink_message_t msg;
  1120. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1121. uint16_t i;
  1122. mavlink_airspeeds_t packet_in = {
  1123. 963497464,17443,17547,17651,17755,17859,17963
  1124. };
  1125. mavlink_airspeeds_t packet1, packet2;
  1126. memset(&packet1, 0, sizeof(packet1));
  1127. packet1.time_boot_ms = packet_in.time_boot_ms;
  1128. packet1.airspeed_imu = packet_in.airspeed_imu;
  1129. packet1.airspeed_pitot = packet_in.airspeed_pitot;
  1130. packet1.airspeed_hot_wire = packet_in.airspeed_hot_wire;
  1131. packet1.airspeed_ultrasonic = packet_in.airspeed_ultrasonic;
  1132. packet1.aoa = packet_in.aoa;
  1133. packet1.aoy = packet_in.aoy;
  1134. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1135. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1136. // cope with extensions
  1137. memset(MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN);
  1138. }
  1139. #endif
  1140. memset(&packet2, 0, sizeof(packet2));
  1141. mavlink_msg_airspeeds_encode(system_id, component_id, &msg, &packet1);
  1142. mavlink_msg_airspeeds_decode(&msg, &packet2);
  1143. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1144. memset(&packet2, 0, sizeof(packet2));
  1145. mavlink_msg_airspeeds_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.airspeed_imu , packet1.airspeed_pitot , packet1.airspeed_hot_wire , packet1.airspeed_ultrasonic , packet1.aoa , packet1.aoy );
  1146. mavlink_msg_airspeeds_decode(&msg, &packet2);
  1147. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1148. memset(&packet2, 0, sizeof(packet2));
  1149. mavlink_msg_airspeeds_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.airspeed_imu , packet1.airspeed_pitot , packet1.airspeed_hot_wire , packet1.airspeed_ultrasonic , packet1.aoa , packet1.aoy );
  1150. mavlink_msg_airspeeds_decode(&msg, &packet2);
  1151. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1152. memset(&packet2, 0, sizeof(packet2));
  1153. mavlink_msg_to_send_buffer(buffer, &msg);
  1154. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1155. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1156. }
  1157. mavlink_msg_airspeeds_decode(last_msg, &packet2);
  1158. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1159. memset(&packet2, 0, sizeof(packet2));
  1160. mavlink_msg_airspeeds_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.airspeed_imu , packet1.airspeed_pitot , packet1.airspeed_hot_wire , packet1.airspeed_ultrasonic , packet1.aoa , packet1.aoy );
  1161. mavlink_msg_airspeeds_decode(last_msg, &packet2);
  1162. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1163. }
  1164. static void mavlink_test_serial_udb_extra_f17(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1165. {
  1166. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1167. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1168. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17 >= 256) {
  1169. return;
  1170. }
  1171. #endif
  1172. mavlink_message_t msg;
  1173. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1174. uint16_t i;
  1175. mavlink_serial_udb_extra_f17_t packet_in = {
  1176. 17.0,45.0,73.0
  1177. };
  1178. mavlink_serial_udb_extra_f17_t packet1, packet2;
  1179. memset(&packet1, 0, sizeof(packet1));
  1180. packet1.sue_feed_forward = packet_in.sue_feed_forward;
  1181. packet1.sue_turn_rate_nav = packet_in.sue_turn_rate_nav;
  1182. packet1.sue_turn_rate_fbw = packet_in.sue_turn_rate_fbw;
  1183. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1184. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1185. // cope with extensions
  1186. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN);
  1187. }
  1188. #endif
  1189. memset(&packet2, 0, sizeof(packet2));
  1190. mavlink_msg_serial_udb_extra_f17_encode(system_id, component_id, &msg, &packet1);
  1191. mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2);
  1192. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1193. memset(&packet2, 0, sizeof(packet2));
  1194. mavlink_msg_serial_udb_extra_f17_pack(system_id, component_id, &msg , packet1.sue_feed_forward , packet1.sue_turn_rate_nav , packet1.sue_turn_rate_fbw );
  1195. mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2);
  1196. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1197. memset(&packet2, 0, sizeof(packet2));
  1198. mavlink_msg_serial_udb_extra_f17_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_feed_forward , packet1.sue_turn_rate_nav , packet1.sue_turn_rate_fbw );
  1199. mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2);
  1200. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1201. memset(&packet2, 0, sizeof(packet2));
  1202. mavlink_msg_to_send_buffer(buffer, &msg);
  1203. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1204. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1205. }
  1206. mavlink_msg_serial_udb_extra_f17_decode(last_msg, &packet2);
  1207. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1208. memset(&packet2, 0, sizeof(packet2));
  1209. mavlink_msg_serial_udb_extra_f17_send(MAVLINK_COMM_1 , packet1.sue_feed_forward , packet1.sue_turn_rate_nav , packet1.sue_turn_rate_fbw );
  1210. mavlink_msg_serial_udb_extra_f17_decode(last_msg, &packet2);
  1211. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1212. }
  1213. static void mavlink_test_serial_udb_extra_f18(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1214. {
  1215. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1216. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1217. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18 >= 256) {
  1218. return;
  1219. }
  1220. #endif
  1221. mavlink_message_t msg;
  1222. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1223. uint16_t i;
  1224. mavlink_serial_udb_extra_f18_t packet_in = {
  1225. 17.0,45.0,73.0,101.0,129.0
  1226. };
  1227. mavlink_serial_udb_extra_f18_t packet1, packet2;
  1228. memset(&packet1, 0, sizeof(packet1));
  1229. packet1.angle_of_attack_normal = packet_in.angle_of_attack_normal;
  1230. packet1.angle_of_attack_inverted = packet_in.angle_of_attack_inverted;
  1231. packet1.elevator_trim_normal = packet_in.elevator_trim_normal;
  1232. packet1.elevator_trim_inverted = packet_in.elevator_trim_inverted;
  1233. packet1.reference_speed = packet_in.reference_speed;
  1234. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1235. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1236. // cope with extensions
  1237. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN);
  1238. }
  1239. #endif
  1240. memset(&packet2, 0, sizeof(packet2));
  1241. mavlink_msg_serial_udb_extra_f18_encode(system_id, component_id, &msg, &packet1);
  1242. mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2);
  1243. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1244. memset(&packet2, 0, sizeof(packet2));
  1245. mavlink_msg_serial_udb_extra_f18_pack(system_id, component_id, &msg , packet1.angle_of_attack_normal , packet1.angle_of_attack_inverted , packet1.elevator_trim_normal , packet1.elevator_trim_inverted , packet1.reference_speed );
  1246. mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2);
  1247. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1248. memset(&packet2, 0, sizeof(packet2));
  1249. mavlink_msg_serial_udb_extra_f18_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.angle_of_attack_normal , packet1.angle_of_attack_inverted , packet1.elevator_trim_normal , packet1.elevator_trim_inverted , packet1.reference_speed );
  1250. mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2);
  1251. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1252. memset(&packet2, 0, sizeof(packet2));
  1253. mavlink_msg_to_send_buffer(buffer, &msg);
  1254. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1255. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1256. }
  1257. mavlink_msg_serial_udb_extra_f18_decode(last_msg, &packet2);
  1258. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1259. memset(&packet2, 0, sizeof(packet2));
  1260. mavlink_msg_serial_udb_extra_f18_send(MAVLINK_COMM_1 , packet1.angle_of_attack_normal , packet1.angle_of_attack_inverted , packet1.elevator_trim_normal , packet1.elevator_trim_inverted , packet1.reference_speed );
  1261. mavlink_msg_serial_udb_extra_f18_decode(last_msg, &packet2);
  1262. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1263. }
  1264. static void mavlink_test_serial_udb_extra_f19(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1265. {
  1266. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1267. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1268. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19 >= 256) {
  1269. return;
  1270. }
  1271. #endif
  1272. mavlink_message_t msg;
  1273. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1274. uint16_t i;
  1275. mavlink_serial_udb_extra_f19_t packet_in = {
  1276. 5,72,139,206,17,84,151,218
  1277. };
  1278. mavlink_serial_udb_extra_f19_t packet1, packet2;
  1279. memset(&packet1, 0, sizeof(packet1));
  1280. packet1.sue_aileron_output_channel = packet_in.sue_aileron_output_channel;
  1281. packet1.sue_aileron_reversed = packet_in.sue_aileron_reversed;
  1282. packet1.sue_elevator_output_channel = packet_in.sue_elevator_output_channel;
  1283. packet1.sue_elevator_reversed = packet_in.sue_elevator_reversed;
  1284. packet1.sue_throttle_output_channel = packet_in.sue_throttle_output_channel;
  1285. packet1.sue_throttle_reversed = packet_in.sue_throttle_reversed;
  1286. packet1.sue_rudder_output_channel = packet_in.sue_rudder_output_channel;
  1287. packet1.sue_rudder_reversed = packet_in.sue_rudder_reversed;
  1288. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1289. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1290. // cope with extensions
  1291. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN);
  1292. }
  1293. #endif
  1294. memset(&packet2, 0, sizeof(packet2));
  1295. mavlink_msg_serial_udb_extra_f19_encode(system_id, component_id, &msg, &packet1);
  1296. mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2);
  1297. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1298. memset(&packet2, 0, sizeof(packet2));
  1299. mavlink_msg_serial_udb_extra_f19_pack(system_id, component_id, &msg , packet1.sue_aileron_output_channel , packet1.sue_aileron_reversed , packet1.sue_elevator_output_channel , packet1.sue_elevator_reversed , packet1.sue_throttle_output_channel , packet1.sue_throttle_reversed , packet1.sue_rudder_output_channel , packet1.sue_rudder_reversed );
  1300. mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2);
  1301. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1302. memset(&packet2, 0, sizeof(packet2));
  1303. mavlink_msg_serial_udb_extra_f19_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_aileron_output_channel , packet1.sue_aileron_reversed , packet1.sue_elevator_output_channel , packet1.sue_elevator_reversed , packet1.sue_throttle_output_channel , packet1.sue_throttle_reversed , packet1.sue_rudder_output_channel , packet1.sue_rudder_reversed );
  1304. mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2);
  1305. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1306. memset(&packet2, 0, sizeof(packet2));
  1307. mavlink_msg_to_send_buffer(buffer, &msg);
  1308. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1309. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1310. }
  1311. mavlink_msg_serial_udb_extra_f19_decode(last_msg, &packet2);
  1312. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1313. memset(&packet2, 0, sizeof(packet2));
  1314. mavlink_msg_serial_udb_extra_f19_send(MAVLINK_COMM_1 , packet1.sue_aileron_output_channel , packet1.sue_aileron_reversed , packet1.sue_elevator_output_channel , packet1.sue_elevator_reversed , packet1.sue_throttle_output_channel , packet1.sue_throttle_reversed , packet1.sue_rudder_output_channel , packet1.sue_rudder_reversed );
  1315. mavlink_msg_serial_udb_extra_f19_decode(last_msg, &packet2);
  1316. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1317. }
  1318. static void mavlink_test_serial_udb_extra_f20(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1319. {
  1320. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1321. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1322. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20 >= 256) {
  1323. return;
  1324. }
  1325. #endif
  1326. mavlink_message_t msg;
  1327. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1328. uint16_t i;
  1329. mavlink_serial_udb_extra_f20_t packet_in = {
  1330. 17235,17339,17443,17547,17651,17755,17859,17963,18067,18171,18275,18379,77
  1331. };
  1332. mavlink_serial_udb_extra_f20_t packet1, packet2;
  1333. memset(&packet1, 0, sizeof(packet1));
  1334. packet1.sue_trim_value_input_1 = packet_in.sue_trim_value_input_1;
  1335. packet1.sue_trim_value_input_2 = packet_in.sue_trim_value_input_2;
  1336. packet1.sue_trim_value_input_3 = packet_in.sue_trim_value_input_3;
  1337. packet1.sue_trim_value_input_4 = packet_in.sue_trim_value_input_4;
  1338. packet1.sue_trim_value_input_5 = packet_in.sue_trim_value_input_5;
  1339. packet1.sue_trim_value_input_6 = packet_in.sue_trim_value_input_6;
  1340. packet1.sue_trim_value_input_7 = packet_in.sue_trim_value_input_7;
  1341. packet1.sue_trim_value_input_8 = packet_in.sue_trim_value_input_8;
  1342. packet1.sue_trim_value_input_9 = packet_in.sue_trim_value_input_9;
  1343. packet1.sue_trim_value_input_10 = packet_in.sue_trim_value_input_10;
  1344. packet1.sue_trim_value_input_11 = packet_in.sue_trim_value_input_11;
  1345. packet1.sue_trim_value_input_12 = packet_in.sue_trim_value_input_12;
  1346. packet1.sue_number_of_inputs = packet_in.sue_number_of_inputs;
  1347. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1348. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1349. // cope with extensions
  1350. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN);
  1351. }
  1352. #endif
  1353. memset(&packet2, 0, sizeof(packet2));
  1354. mavlink_msg_serial_udb_extra_f20_encode(system_id, component_id, &msg, &packet1);
  1355. mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2);
  1356. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1357. memset(&packet2, 0, sizeof(packet2));
  1358. mavlink_msg_serial_udb_extra_f20_pack(system_id, component_id, &msg , packet1.sue_number_of_inputs , packet1.sue_trim_value_input_1 , packet1.sue_trim_value_input_2 , packet1.sue_trim_value_input_3 , packet1.sue_trim_value_input_4 , packet1.sue_trim_value_input_5 , packet1.sue_trim_value_input_6 , packet1.sue_trim_value_input_7 , packet1.sue_trim_value_input_8 , packet1.sue_trim_value_input_9 , packet1.sue_trim_value_input_10 , packet1.sue_trim_value_input_11 , packet1.sue_trim_value_input_12 );
  1359. mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2);
  1360. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1361. memset(&packet2, 0, sizeof(packet2));
  1362. mavlink_msg_serial_udb_extra_f20_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_number_of_inputs , packet1.sue_trim_value_input_1 , packet1.sue_trim_value_input_2 , packet1.sue_trim_value_input_3 , packet1.sue_trim_value_input_4 , packet1.sue_trim_value_input_5 , packet1.sue_trim_value_input_6 , packet1.sue_trim_value_input_7 , packet1.sue_trim_value_input_8 , packet1.sue_trim_value_input_9 , packet1.sue_trim_value_input_10 , packet1.sue_trim_value_input_11 , packet1.sue_trim_value_input_12 );
  1363. mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2);
  1364. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1365. memset(&packet2, 0, sizeof(packet2));
  1366. mavlink_msg_to_send_buffer(buffer, &msg);
  1367. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1368. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1369. }
  1370. mavlink_msg_serial_udb_extra_f20_decode(last_msg, &packet2);
  1371. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1372. memset(&packet2, 0, sizeof(packet2));
  1373. mavlink_msg_serial_udb_extra_f20_send(MAVLINK_COMM_1 , packet1.sue_number_of_inputs , packet1.sue_trim_value_input_1 , packet1.sue_trim_value_input_2 , packet1.sue_trim_value_input_3 , packet1.sue_trim_value_input_4 , packet1.sue_trim_value_input_5 , packet1.sue_trim_value_input_6 , packet1.sue_trim_value_input_7 , packet1.sue_trim_value_input_8 , packet1.sue_trim_value_input_9 , packet1.sue_trim_value_input_10 , packet1.sue_trim_value_input_11 , packet1.sue_trim_value_input_12 );
  1374. mavlink_msg_serial_udb_extra_f20_decode(last_msg, &packet2);
  1375. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1376. }
  1377. static void mavlink_test_serial_udb_extra_f21(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1378. {
  1379. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1380. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1381. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21 >= 256) {
  1382. return;
  1383. }
  1384. #endif
  1385. mavlink_message_t msg;
  1386. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1387. uint16_t i;
  1388. mavlink_serial_udb_extra_f21_t packet_in = {
  1389. 17235,17339,17443,17547,17651,17755
  1390. };
  1391. mavlink_serial_udb_extra_f21_t packet1, packet2;
  1392. memset(&packet1, 0, sizeof(packet1));
  1393. packet1.sue_accel_x_offset = packet_in.sue_accel_x_offset;
  1394. packet1.sue_accel_y_offset = packet_in.sue_accel_y_offset;
  1395. packet1.sue_accel_z_offset = packet_in.sue_accel_z_offset;
  1396. packet1.sue_gyro_x_offset = packet_in.sue_gyro_x_offset;
  1397. packet1.sue_gyro_y_offset = packet_in.sue_gyro_y_offset;
  1398. packet1.sue_gyro_z_offset = packet_in.sue_gyro_z_offset;
  1399. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1400. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1401. // cope with extensions
  1402. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN);
  1403. }
  1404. #endif
  1405. memset(&packet2, 0, sizeof(packet2));
  1406. mavlink_msg_serial_udb_extra_f21_encode(system_id, component_id, &msg, &packet1);
  1407. mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2);
  1408. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1409. memset(&packet2, 0, sizeof(packet2));
  1410. mavlink_msg_serial_udb_extra_f21_pack(system_id, component_id, &msg , packet1.sue_accel_x_offset , packet1.sue_accel_y_offset , packet1.sue_accel_z_offset , packet1.sue_gyro_x_offset , packet1.sue_gyro_y_offset , packet1.sue_gyro_z_offset );
  1411. mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2);
  1412. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1413. memset(&packet2, 0, sizeof(packet2));
  1414. mavlink_msg_serial_udb_extra_f21_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_accel_x_offset , packet1.sue_accel_y_offset , packet1.sue_accel_z_offset , packet1.sue_gyro_x_offset , packet1.sue_gyro_y_offset , packet1.sue_gyro_z_offset );
  1415. mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2);
  1416. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1417. memset(&packet2, 0, sizeof(packet2));
  1418. mavlink_msg_to_send_buffer(buffer, &msg);
  1419. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1420. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1421. }
  1422. mavlink_msg_serial_udb_extra_f21_decode(last_msg, &packet2);
  1423. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1424. memset(&packet2, 0, sizeof(packet2));
  1425. mavlink_msg_serial_udb_extra_f21_send(MAVLINK_COMM_1 , packet1.sue_accel_x_offset , packet1.sue_accel_y_offset , packet1.sue_accel_z_offset , packet1.sue_gyro_x_offset , packet1.sue_gyro_y_offset , packet1.sue_gyro_z_offset );
  1426. mavlink_msg_serial_udb_extra_f21_decode(last_msg, &packet2);
  1427. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1428. }
  1429. static void mavlink_test_serial_udb_extra_f22(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1430. {
  1431. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1432. mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0);
  1433. if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22 >= 256) {
  1434. return;
  1435. }
  1436. #endif
  1437. mavlink_message_t msg;
  1438. uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
  1439. uint16_t i;
  1440. mavlink_serial_udb_extra_f22_t packet_in = {
  1441. 17235,17339,17443,17547,17651,17755
  1442. };
  1443. mavlink_serial_udb_extra_f22_t packet1, packet2;
  1444. memset(&packet1, 0, sizeof(packet1));
  1445. packet1.sue_accel_x_at_calibration = packet_in.sue_accel_x_at_calibration;
  1446. packet1.sue_accel_y_at_calibration = packet_in.sue_accel_y_at_calibration;
  1447. packet1.sue_accel_z_at_calibration = packet_in.sue_accel_z_at_calibration;
  1448. packet1.sue_gyro_x_at_calibration = packet_in.sue_gyro_x_at_calibration;
  1449. packet1.sue_gyro_y_at_calibration = packet_in.sue_gyro_y_at_calibration;
  1450. packet1.sue_gyro_z_at_calibration = packet_in.sue_gyro_z_at_calibration;
  1451. #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1
  1452. if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) {
  1453. // cope with extensions
  1454. memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN);
  1455. }
  1456. #endif
  1457. memset(&packet2, 0, sizeof(packet2));
  1458. mavlink_msg_serial_udb_extra_f22_encode(system_id, component_id, &msg, &packet1);
  1459. mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2);
  1460. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1461. memset(&packet2, 0, sizeof(packet2));
  1462. mavlink_msg_serial_udb_extra_f22_pack(system_id, component_id, &msg , packet1.sue_accel_x_at_calibration , packet1.sue_accel_y_at_calibration , packet1.sue_accel_z_at_calibration , packet1.sue_gyro_x_at_calibration , packet1.sue_gyro_y_at_calibration , packet1.sue_gyro_z_at_calibration );
  1463. mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2);
  1464. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1465. memset(&packet2, 0, sizeof(packet2));
  1466. mavlink_msg_serial_udb_extra_f22_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_accel_x_at_calibration , packet1.sue_accel_y_at_calibration , packet1.sue_accel_z_at_calibration , packet1.sue_gyro_x_at_calibration , packet1.sue_gyro_y_at_calibration , packet1.sue_gyro_z_at_calibration );
  1467. mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2);
  1468. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1469. memset(&packet2, 0, sizeof(packet2));
  1470. mavlink_msg_to_send_buffer(buffer, &msg);
  1471. for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
  1472. comm_send_ch(MAVLINK_COMM_0, buffer[i]);
  1473. }
  1474. mavlink_msg_serial_udb_extra_f22_decode(last_msg, &packet2);
  1475. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1476. memset(&packet2, 0, sizeof(packet2));
  1477. mavlink_msg_serial_udb_extra_f22_send(MAVLINK_COMM_1 , packet1.sue_accel_x_at_calibration , packet1.sue_accel_y_at_calibration , packet1.sue_accel_z_at_calibration , packet1.sue_gyro_x_at_calibration , packet1.sue_gyro_y_at_calibration , packet1.sue_gyro_z_at_calibration );
  1478. mavlink_msg_serial_udb_extra_f22_decode(last_msg, &packet2);
  1479. MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
  1480. }
  1481. static void mavlink_test_matrixpilot(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
  1482. {
  1483. mavlink_test_flexifunction_set(system_id, component_id, last_msg);
  1484. mavlink_test_flexifunction_read_req(system_id, component_id, last_msg);
  1485. mavlink_test_flexifunction_buffer_function(system_id, component_id, last_msg);
  1486. mavlink_test_flexifunction_buffer_function_ack(system_id, component_id, last_msg);
  1487. mavlink_test_flexifunction_directory(system_id, component_id, last_msg);
  1488. mavlink_test_flexifunction_directory_ack(system_id, component_id, last_msg);
  1489. mavlink_test_flexifunction_command(system_id, component_id, last_msg);
  1490. mavlink_test_flexifunction_command_ack(system_id, component_id, last_msg);
  1491. mavlink_test_serial_udb_extra_f2_a(system_id, component_id, last_msg);
  1492. mavlink_test_serial_udb_extra_f2_b(system_id, component_id, last_msg);
  1493. mavlink_test_serial_udb_extra_f4(system_id, component_id, last_msg);
  1494. mavlink_test_serial_udb_extra_f5(system_id, component_id, last_msg);
  1495. mavlink_test_serial_udb_extra_f6(system_id, component_id, last_msg);
  1496. mavlink_test_serial_udb_extra_f7(system_id, component_id, last_msg);
  1497. mavlink_test_serial_udb_extra_f8(system_id, component_id, last_msg);
  1498. mavlink_test_serial_udb_extra_f13(system_id, component_id, last_msg);
  1499. mavlink_test_serial_udb_extra_f14(system_id, component_id, last_msg);
  1500. mavlink_test_serial_udb_extra_f15(system_id, component_id, last_msg);
  1501. mavlink_test_serial_udb_extra_f16(system_id, component_id, last_msg);
  1502. mavlink_test_altitudes(system_id, component_id, last_msg);
  1503. mavlink_test_airspeeds(system_id, component_id, last_msg);
  1504. mavlink_test_serial_udb_extra_f17(system_id, component_id, last_msg);
  1505. mavlink_test_serial_udb_extra_f18(system_id, component_id, last_msg);
  1506. mavlink_test_serial_udb_extra_f19(system_id, component_id, last_msg);
  1507. mavlink_test_serial_udb_extra_f20(system_id, component_id, last_msg);
  1508. mavlink_test_serial_udb_extra_f21(system_id, component_id, last_msg);
  1509. mavlink_test_serial_udb_extra_f22(system_id, component_id, last_msg);
  1510. }
  1511. #ifdef __cplusplus
  1512. }
  1513. #endif // __cplusplus
  1514. #endif // MATRIXPILOT_TESTSUITE_H