common/testsuite.h
Go to the documentation of this file.
1 
5 #ifndef COMMON_TESTSUITE_H
6 #define COMMON_TESTSUITE_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #ifndef MAVLINK_TEST_ALL
13 #define MAVLINK_TEST_ALL
14 
15 static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg);
16 
17 static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
18 {
19 
20  mavlink_test_common(system_id, component_id, last_msg);
21 }
22 #endif
23 
24 
25 
26 
27 static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
28 {
29  mavlink_message_t msg;
30  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
31  uint16_t i;
32  mavlink_heartbeat_t packet_in = {
33  963497464,17,84,151,218,3
34  };
35  mavlink_heartbeat_t packet1, packet2;
36  memset(&packet1, 0, sizeof(packet1));
37  packet1.custom_mode = packet_in.custom_mode;
38  packet1.type = packet_in.type;
39  packet1.autopilot = packet_in.autopilot;
40  packet1.base_mode = packet_in.base_mode;
41  packet1.system_status = packet_in.system_status;
42  packet1.mavlink_version = packet_in.mavlink_version;
43 
44 
45 
46  memset(&packet2, 0, sizeof(packet2));
47  mavlink_msg_heartbeat_encode(system_id, component_id, &msg, &packet1);
48  mavlink_msg_heartbeat_decode(&msg, &packet2);
49  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
50 
51  memset(&packet2, 0, sizeof(packet2));
52  mavlink_msg_heartbeat_pack(system_id, component_id, &msg , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
53  mavlink_msg_heartbeat_decode(&msg, &packet2);
54  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
55 
56  memset(&packet2, 0, sizeof(packet2));
57  mavlink_msg_heartbeat_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
58  mavlink_msg_heartbeat_decode(&msg, &packet2);
59  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
60 
61  memset(&packet2, 0, sizeof(packet2));
62  mavlink_msg_to_send_buffer(buffer, &msg);
63  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
64  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
65  }
66  mavlink_msg_heartbeat_decode(last_msg, &packet2);
67  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
68 
69  memset(&packet2, 0, sizeof(packet2));
70  mavlink_msg_heartbeat_send(MAVLINK_COMM_1 , packet1.type , packet1.autopilot , packet1.base_mode , packet1.custom_mode , packet1.system_status );
71  mavlink_msg_heartbeat_decode(last_msg, &packet2);
72  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
73 }
74 
75 static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
76 {
77  mavlink_message_t msg;
78  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
79  uint16_t i;
80  mavlink_sys_status_t packet_in = {
81  963497464,963497672,963497880,17859,17963,18067,18171,18275,18379,18483,18587,18691,223
82  };
83  mavlink_sys_status_t packet1, packet2;
84  memset(&packet1, 0, sizeof(packet1));
88  packet1.load = packet_in.load;
89  packet1.voltage_battery = packet_in.voltage_battery;
90  packet1.current_battery = packet_in.current_battery;
91  packet1.drop_rate_comm = packet_in.drop_rate_comm;
92  packet1.errors_comm = packet_in.errors_comm;
93  packet1.errors_count1 = packet_in.errors_count1;
94  packet1.errors_count2 = packet_in.errors_count2;
95  packet1.errors_count3 = packet_in.errors_count3;
96  packet1.errors_count4 = packet_in.errors_count4;
97  packet1.battery_remaining = packet_in.battery_remaining;
98 
99 
100 
101  memset(&packet2, 0, sizeof(packet2));
102  mavlink_msg_sys_status_encode(system_id, component_id, &msg, &packet1);
103  mavlink_msg_sys_status_decode(&msg, &packet2);
104  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
105 
106  memset(&packet2, 0, sizeof(packet2));
107  mavlink_msg_sys_status_pack(system_id, component_id, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
108  mavlink_msg_sys_status_decode(&msg, &packet2);
109  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
110 
111  memset(&packet2, 0, sizeof(packet2));
112  mavlink_msg_sys_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
113  mavlink_msg_sys_status_decode(&msg, &packet2);
114  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
115 
116  memset(&packet2, 0, sizeof(packet2));
117  mavlink_msg_to_send_buffer(buffer, &msg);
118  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
119  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
120  }
121  mavlink_msg_sys_status_decode(last_msg, &packet2);
122  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
123 
124  memset(&packet2, 0, sizeof(packet2));
125  mavlink_msg_sys_status_send(MAVLINK_COMM_1 , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 );
126  mavlink_msg_sys_status_decode(last_msg, &packet2);
127  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
128 }
129 
130 static void mavlink_test_system_time(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
131 {
132  mavlink_message_t msg;
133  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
134  uint16_t i;
135  mavlink_system_time_t packet_in = {
136  93372036854775807ULL,963497880
137  };
138  mavlink_system_time_t packet1, packet2;
139  memset(&packet1, 0, sizeof(packet1));
140  packet1.time_unix_usec = packet_in.time_unix_usec;
141  packet1.time_boot_ms = packet_in.time_boot_ms;
142 
143 
144 
145  memset(&packet2, 0, sizeof(packet2));
146  mavlink_msg_system_time_encode(system_id, component_id, &msg, &packet1);
147  mavlink_msg_system_time_decode(&msg, &packet2);
148  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
149 
150  memset(&packet2, 0, sizeof(packet2));
151  mavlink_msg_system_time_pack(system_id, component_id, &msg , packet1.time_unix_usec , packet1.time_boot_ms );
152  mavlink_msg_system_time_decode(&msg, &packet2);
153  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
154 
155  memset(&packet2, 0, sizeof(packet2));
156  mavlink_msg_system_time_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_unix_usec , packet1.time_boot_ms );
157  mavlink_msg_system_time_decode(&msg, &packet2);
158  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
159 
160  memset(&packet2, 0, sizeof(packet2));
161  mavlink_msg_to_send_buffer(buffer, &msg);
162  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
163  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
164  }
165  mavlink_msg_system_time_decode(last_msg, &packet2);
166  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
167 
168  memset(&packet2, 0, sizeof(packet2));
169  mavlink_msg_system_time_send(MAVLINK_COMM_1 , packet1.time_unix_usec , packet1.time_boot_ms );
170  mavlink_msg_system_time_decode(last_msg, &packet2);
171  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
172 }
173 
174 static void mavlink_test_ping(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
175 {
176  mavlink_message_t msg;
177  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
178  uint16_t i;
179  mavlink_ping_t packet_in = {
180  93372036854775807ULL,963497880,41,108
181  };
182  mavlink_ping_t packet1, packet2;
183  memset(&packet1, 0, sizeof(packet1));
184  packet1.time_usec = packet_in.time_usec;
185  packet1.seq = packet_in.seq;
186  packet1.target_system = packet_in.target_system;
187  packet1.target_component = packet_in.target_component;
188 
189 
190 
191  memset(&packet2, 0, sizeof(packet2));
192  mavlink_msg_ping_encode(system_id, component_id, &msg, &packet1);
193  mavlink_msg_ping_decode(&msg, &packet2);
194  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
195 
196  memset(&packet2, 0, sizeof(packet2));
197  mavlink_msg_ping_pack(system_id, component_id, &msg , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
198  mavlink_msg_ping_decode(&msg, &packet2);
199  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
200 
201  memset(&packet2, 0, sizeof(packet2));
202  mavlink_msg_ping_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
203  mavlink_msg_ping_decode(&msg, &packet2);
204  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
205 
206  memset(&packet2, 0, sizeof(packet2));
207  mavlink_msg_to_send_buffer(buffer, &msg);
208  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
209  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
210  }
211  mavlink_msg_ping_decode(last_msg, &packet2);
212  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
213 
214  memset(&packet2, 0, sizeof(packet2));
215  mavlink_msg_ping_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.seq , packet1.target_system , packet1.target_component );
216  mavlink_msg_ping_decode(last_msg, &packet2);
217  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
218 }
219 
220 static void mavlink_test_change_operator_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
221 {
222  mavlink_message_t msg;
223  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
224  uint16_t i;
226  5,72,139,"DEFGHIJKLMNOPQRSTUVWXYZA"
227  };
228  mavlink_change_operator_control_t packet1, packet2;
229  memset(&packet1, 0, sizeof(packet1));
230  packet1.target_system = packet_in.target_system;
231  packet1.control_request = packet_in.control_request;
232  packet1.version = packet_in.version;
233 
234  mav_array_memcpy(packet1.passkey, packet_in.passkey, sizeof(char)*25);
235 
236 
237  memset(&packet2, 0, sizeof(packet2));
238  mavlink_msg_change_operator_control_encode(system_id, component_id, &msg, &packet1);
240  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
241 
242  memset(&packet2, 0, sizeof(packet2));
243  mavlink_msg_change_operator_control_pack(system_id, component_id, &msg , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
245  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
246 
247  memset(&packet2, 0, sizeof(packet2));
248  mavlink_msg_change_operator_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
250  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
251 
252  memset(&packet2, 0, sizeof(packet2));
253  mavlink_msg_to_send_buffer(buffer, &msg);
254  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
255  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
256  }
257  mavlink_msg_change_operator_control_decode(last_msg, &packet2);
258  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
259 
260  memset(&packet2, 0, sizeof(packet2));
261  mavlink_msg_change_operator_control_send(MAVLINK_COMM_1 , packet1.target_system , packet1.control_request , packet1.version , packet1.passkey );
262  mavlink_msg_change_operator_control_decode(last_msg, &packet2);
263  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
264 }
265 
266 static void mavlink_test_change_operator_control_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
267 {
268  mavlink_message_t msg;
269  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
270  uint16_t i;
272  5,72,139
273  };
274  mavlink_change_operator_control_ack_t packet1, packet2;
275  memset(&packet1, 0, sizeof(packet1));
276  packet1.gcs_system_id = packet_in.gcs_system_id;
277  packet1.control_request = packet_in.control_request;
278  packet1.ack = packet_in.ack;
279 
280 
281 
282  memset(&packet2, 0, sizeof(packet2));
283  mavlink_msg_change_operator_control_ack_encode(system_id, component_id, &msg, &packet1);
285  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
286 
287  memset(&packet2, 0, sizeof(packet2));
288  mavlink_msg_change_operator_control_ack_pack(system_id, component_id, &msg , packet1.gcs_system_id , packet1.control_request , packet1.ack );
290  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
291 
292  memset(&packet2, 0, sizeof(packet2));
293  mavlink_msg_change_operator_control_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.gcs_system_id , packet1.control_request , packet1.ack );
295  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
296 
297  memset(&packet2, 0, sizeof(packet2));
298  mavlink_msg_to_send_buffer(buffer, &msg);
299  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
300  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
301  }
303  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
304 
305  memset(&packet2, 0, sizeof(packet2));
306  mavlink_msg_change_operator_control_ack_send(MAVLINK_COMM_1 , packet1.gcs_system_id , packet1.control_request , packet1.ack );
308  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
309 }
310 
311 static void mavlink_test_auth_key(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
312 {
313  mavlink_message_t msg;
314  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
315  uint16_t i;
316  mavlink_auth_key_t packet_in = {
317  "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDE"
318  };
319  mavlink_auth_key_t packet1, packet2;
320  memset(&packet1, 0, sizeof(packet1));
321 
322  mav_array_memcpy(packet1.key, packet_in.key, sizeof(char)*32);
323 
324 
325  memset(&packet2, 0, sizeof(packet2));
326  mavlink_msg_auth_key_encode(system_id, component_id, &msg, &packet1);
327  mavlink_msg_auth_key_decode(&msg, &packet2);
328  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
329 
330  memset(&packet2, 0, sizeof(packet2));
331  mavlink_msg_auth_key_pack(system_id, component_id, &msg , packet1.key );
332  mavlink_msg_auth_key_decode(&msg, &packet2);
333  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
334 
335  memset(&packet2, 0, sizeof(packet2));
336  mavlink_msg_auth_key_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.key );
337  mavlink_msg_auth_key_decode(&msg, &packet2);
338  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
339 
340  memset(&packet2, 0, sizeof(packet2));
341  mavlink_msg_to_send_buffer(buffer, &msg);
342  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
343  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
344  }
345  mavlink_msg_auth_key_decode(last_msg, &packet2);
346  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
347 
348  memset(&packet2, 0, sizeof(packet2));
349  mavlink_msg_auth_key_send(MAVLINK_COMM_1 , packet1.key );
350  mavlink_msg_auth_key_decode(last_msg, &packet2);
351  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
352 }
353 
354 static void mavlink_test_set_mode(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
355 {
356  mavlink_message_t msg;
357  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
358  uint16_t i;
359  mavlink_set_mode_t packet_in = {
360  963497464,17,84
361  };
362  mavlink_set_mode_t packet1, packet2;
363  memset(&packet1, 0, sizeof(packet1));
364  packet1.custom_mode = packet_in.custom_mode;
365  packet1.target_system = packet_in.target_system;
366  packet1.base_mode = packet_in.base_mode;
367 
368 
369 
370  memset(&packet2, 0, sizeof(packet2));
371  mavlink_msg_set_mode_encode(system_id, component_id, &msg, &packet1);
372  mavlink_msg_set_mode_decode(&msg, &packet2);
373  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
374 
375  memset(&packet2, 0, sizeof(packet2));
376  mavlink_msg_set_mode_pack(system_id, component_id, &msg , packet1.target_system , packet1.base_mode , packet1.custom_mode );
377  mavlink_msg_set_mode_decode(&msg, &packet2);
378  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
379 
380  memset(&packet2, 0, sizeof(packet2));
381  mavlink_msg_set_mode_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.base_mode , packet1.custom_mode );
382  mavlink_msg_set_mode_decode(&msg, &packet2);
383  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
384 
385  memset(&packet2, 0, sizeof(packet2));
386  mavlink_msg_to_send_buffer(buffer, &msg);
387  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
388  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
389  }
390  mavlink_msg_set_mode_decode(last_msg, &packet2);
391  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
392 
393  memset(&packet2, 0, sizeof(packet2));
394  mavlink_msg_set_mode_send(MAVLINK_COMM_1 , packet1.target_system , packet1.base_mode , packet1.custom_mode );
395  mavlink_msg_set_mode_decode(last_msg, &packet2);
396  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
397 }
398 
399 static void mavlink_test_param_request_read(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
400 {
401  mavlink_message_t msg;
402  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
403  uint16_t i;
404  mavlink_param_request_read_t packet_in = {
405  17235,139,206,"EFGHIJKLMNOPQRS"
406  };
407  mavlink_param_request_read_t packet1, packet2;
408  memset(&packet1, 0, sizeof(packet1));
409  packet1.param_index = packet_in.param_index;
410  packet1.target_system = packet_in.target_system;
411  packet1.target_component = packet_in.target_component;
412 
413  mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
414 
415 
416  memset(&packet2, 0, sizeof(packet2));
417  mavlink_msg_param_request_read_encode(system_id, component_id, &msg, &packet1);
419  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
420 
421  memset(&packet2, 0, sizeof(packet2));
422  mavlink_msg_param_request_read_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
424  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
425 
426  memset(&packet2, 0, sizeof(packet2));
427  mavlink_msg_param_request_read_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
429  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
430 
431  memset(&packet2, 0, sizeof(packet2));
432  mavlink_msg_to_send_buffer(buffer, &msg);
433  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
434  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
435  }
436  mavlink_msg_param_request_read_decode(last_msg, &packet2);
437  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
438 
439  memset(&packet2, 0, sizeof(packet2));
440  mavlink_msg_param_request_read_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index );
441  mavlink_msg_param_request_read_decode(last_msg, &packet2);
442  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
443 }
444 
445 static void mavlink_test_param_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
446 {
447  mavlink_message_t msg;
448  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
449  uint16_t i;
450  mavlink_param_request_list_t packet_in = {
451  5,72
452  };
453  mavlink_param_request_list_t packet1, packet2;
454  memset(&packet1, 0, sizeof(packet1));
455  packet1.target_system = packet_in.target_system;
456  packet1.target_component = packet_in.target_component;
457 
458 
459 
460  memset(&packet2, 0, sizeof(packet2));
461  mavlink_msg_param_request_list_encode(system_id, component_id, &msg, &packet1);
463  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
464 
465  memset(&packet2, 0, sizeof(packet2));
466  mavlink_msg_param_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
468  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
469 
470  memset(&packet2, 0, sizeof(packet2));
471  mavlink_msg_param_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
473  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
474 
475  memset(&packet2, 0, sizeof(packet2));
476  mavlink_msg_to_send_buffer(buffer, &msg);
477  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
478  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
479  }
480  mavlink_msg_param_request_list_decode(last_msg, &packet2);
481  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
482 
483  memset(&packet2, 0, sizeof(packet2));
484  mavlink_msg_param_request_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
485  mavlink_msg_param_request_list_decode(last_msg, &packet2);
486  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
487 }
488 
489 static void mavlink_test_param_value(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
490 {
491  mavlink_message_t msg;
492  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
493  uint16_t i;
494  mavlink_param_value_t packet_in = {
495  17.0,17443,17547,"IJKLMNOPQRSTUVW",77
496  };
497  mavlink_param_value_t packet1, packet2;
498  memset(&packet1, 0, sizeof(packet1));
499  packet1.param_value = packet_in.param_value;
500  packet1.param_count = packet_in.param_count;
501  packet1.param_index = packet_in.param_index;
502  packet1.param_type = packet_in.param_type;
503 
504  mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
505 
506 
507  memset(&packet2, 0, sizeof(packet2));
508  mavlink_msg_param_value_encode(system_id, component_id, &msg, &packet1);
509  mavlink_msg_param_value_decode(&msg, &packet2);
510  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
511 
512  memset(&packet2, 0, sizeof(packet2));
513  mavlink_msg_param_value_pack(system_id, component_id, &msg , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
514  mavlink_msg_param_value_decode(&msg, &packet2);
515  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
516 
517  memset(&packet2, 0, sizeof(packet2));
518  mavlink_msg_param_value_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
519  mavlink_msg_param_value_decode(&msg, &packet2);
520  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
521 
522  memset(&packet2, 0, sizeof(packet2));
523  mavlink_msg_to_send_buffer(buffer, &msg);
524  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
525  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
526  }
527  mavlink_msg_param_value_decode(last_msg, &packet2);
528  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
529 
530  memset(&packet2, 0, sizeof(packet2));
531  mavlink_msg_param_value_send(MAVLINK_COMM_1 , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_count , packet1.param_index );
532  mavlink_msg_param_value_decode(last_msg, &packet2);
533  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
534 }
535 
536 static void mavlink_test_param_set(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
537 {
538  mavlink_message_t msg;
539  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
540  uint16_t i;
541  mavlink_param_set_t packet_in = {
542  17.0,17,84,"GHIJKLMNOPQRSTU",199
543  };
544  mavlink_param_set_t packet1, packet2;
545  memset(&packet1, 0, sizeof(packet1));
546  packet1.param_value = packet_in.param_value;
547  packet1.target_system = packet_in.target_system;
548  packet1.target_component = packet_in.target_component;
549  packet1.param_type = packet_in.param_type;
550 
551  mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
552 
553 
554  memset(&packet2, 0, sizeof(packet2));
555  mavlink_msg_param_set_encode(system_id, component_id, &msg, &packet1);
556  mavlink_msg_param_set_decode(&msg, &packet2);
557  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
558 
559  memset(&packet2, 0, sizeof(packet2));
560  mavlink_msg_param_set_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
561  mavlink_msg_param_set_decode(&msg, &packet2);
562  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
563 
564  memset(&packet2, 0, sizeof(packet2));
565  mavlink_msg_param_set_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
566  mavlink_msg_param_set_decode(&msg, &packet2);
567  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
568 
569  memset(&packet2, 0, sizeof(packet2));
570  mavlink_msg_to_send_buffer(buffer, &msg);
571  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
572  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
573  }
574  mavlink_msg_param_set_decode(last_msg, &packet2);
575  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
576 
577  memset(&packet2, 0, sizeof(packet2));
578  mavlink_msg_param_set_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type );
579  mavlink_msg_param_set_decode(last_msg, &packet2);
580  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
581 }
582 
583 static void mavlink_test_gps_raw_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
584 {
585  mavlink_message_t msg;
586  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
587  uint16_t i;
588  mavlink_gps_raw_int_t packet_in = {
589  93372036854775807ULL,963497880,963498088,963498296,18275,18379,18483,18587,89,156
590  };
591  mavlink_gps_raw_int_t packet1, packet2;
592  memset(&packet1, 0, sizeof(packet1));
593  packet1.time_usec = packet_in.time_usec;
594  packet1.lat = packet_in.lat;
595  packet1.lon = packet_in.lon;
596  packet1.alt = packet_in.alt;
597  packet1.eph = packet_in.eph;
598  packet1.epv = packet_in.epv;
599  packet1.vel = packet_in.vel;
600  packet1.cog = packet_in.cog;
601  packet1.fix_type = packet_in.fix_type;
602  packet1.satellites_visible = packet_in.satellites_visible;
603 
604 
605 
606  memset(&packet2, 0, sizeof(packet2));
607  mavlink_msg_gps_raw_int_encode(system_id, component_id, &msg, &packet1);
608  mavlink_msg_gps_raw_int_decode(&msg, &packet2);
609  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
610 
611  memset(&packet2, 0, sizeof(packet2));
612  mavlink_msg_gps_raw_int_pack(system_id, component_id, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
613  mavlink_msg_gps_raw_int_decode(&msg, &packet2);
614  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
615 
616  memset(&packet2, 0, sizeof(packet2));
617  mavlink_msg_gps_raw_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
618  mavlink_msg_gps_raw_int_decode(&msg, &packet2);
619  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
620 
621  memset(&packet2, 0, sizeof(packet2));
622  mavlink_msg_to_send_buffer(buffer, &msg);
623  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
624  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
625  }
626  mavlink_msg_gps_raw_int_decode(last_msg, &packet2);
627  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
628 
629  memset(&packet2, 0, sizeof(packet2));
630  mavlink_msg_gps_raw_int_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible );
631  mavlink_msg_gps_raw_int_decode(last_msg, &packet2);
632  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
633 }
634 
635 static void mavlink_test_gps_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
636 {
637  mavlink_message_t msg;
638  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
639  uint16_t i;
640  mavlink_gps_status_t packet_in = {
641  5,{ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91 },{ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151 },{ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211 },{ 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },{ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75 }
642  };
643  mavlink_gps_status_t packet1, packet2;
644  memset(&packet1, 0, sizeof(packet1));
645  packet1.satellites_visible = packet_in.satellites_visible;
646 
647  mav_array_memcpy(packet1.satellite_prn, packet_in.satellite_prn, sizeof(uint8_t)*20);
648  mav_array_memcpy(packet1.satellite_used, packet_in.satellite_used, sizeof(uint8_t)*20);
649  mav_array_memcpy(packet1.satellite_elevation, packet_in.satellite_elevation, sizeof(uint8_t)*20);
650  mav_array_memcpy(packet1.satellite_azimuth, packet_in.satellite_azimuth, sizeof(uint8_t)*20);
651  mav_array_memcpy(packet1.satellite_snr, packet_in.satellite_snr, sizeof(uint8_t)*20);
652 
653 
654  memset(&packet2, 0, sizeof(packet2));
655  mavlink_msg_gps_status_encode(system_id, component_id, &msg, &packet1);
656  mavlink_msg_gps_status_decode(&msg, &packet2);
657  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
658 
659  memset(&packet2, 0, sizeof(packet2));
660  mavlink_msg_gps_status_pack(system_id, component_id, &msg , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
661  mavlink_msg_gps_status_decode(&msg, &packet2);
662  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
663 
664  memset(&packet2, 0, sizeof(packet2));
665  mavlink_msg_gps_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
666  mavlink_msg_gps_status_decode(&msg, &packet2);
667  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
668 
669  memset(&packet2, 0, sizeof(packet2));
670  mavlink_msg_to_send_buffer(buffer, &msg);
671  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
672  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
673  }
674  mavlink_msg_gps_status_decode(last_msg, &packet2);
675  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
676 
677  memset(&packet2, 0, sizeof(packet2));
678  mavlink_msg_gps_status_send(MAVLINK_COMM_1 , packet1.satellites_visible , packet1.satellite_prn , packet1.satellite_used , packet1.satellite_elevation , packet1.satellite_azimuth , packet1.satellite_snr );
679  mavlink_msg_gps_status_decode(last_msg, &packet2);
680  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
681 }
682 
683 static void mavlink_test_scaled_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
684 {
685  mavlink_message_t msg;
686  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
687  uint16_t i;
688  mavlink_scaled_imu_t packet_in = {
689  963497464,17443,17547,17651,17755,17859,17963,18067,18171,18275
690  };
691  mavlink_scaled_imu_t packet1, packet2;
692  memset(&packet1, 0, sizeof(packet1));
693  packet1.time_boot_ms = packet_in.time_boot_ms;
694  packet1.xacc = packet_in.xacc;
695  packet1.yacc = packet_in.yacc;
696  packet1.zacc = packet_in.zacc;
697  packet1.xgyro = packet_in.xgyro;
698  packet1.ygyro = packet_in.ygyro;
699  packet1.zgyro = packet_in.zgyro;
700  packet1.xmag = packet_in.xmag;
701  packet1.ymag = packet_in.ymag;
702  packet1.zmag = packet_in.zmag;
703 
704 
705 
706  memset(&packet2, 0, sizeof(packet2));
707  mavlink_msg_scaled_imu_encode(system_id, component_id, &msg, &packet1);
708  mavlink_msg_scaled_imu_decode(&msg, &packet2);
709  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
710 
711  memset(&packet2, 0, sizeof(packet2));
712  mavlink_msg_scaled_imu_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
713  mavlink_msg_scaled_imu_decode(&msg, &packet2);
714  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
715 
716  memset(&packet2, 0, sizeof(packet2));
717  mavlink_msg_scaled_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
718  mavlink_msg_scaled_imu_decode(&msg, &packet2);
719  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
720 
721  memset(&packet2, 0, sizeof(packet2));
722  mavlink_msg_to_send_buffer(buffer, &msg);
723  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
724  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
725  }
726  mavlink_msg_scaled_imu_decode(last_msg, &packet2);
727  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
728 
729  memset(&packet2, 0, sizeof(packet2));
730  mavlink_msg_scaled_imu_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
731  mavlink_msg_scaled_imu_decode(last_msg, &packet2);
732  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
733 }
734 
735 static void mavlink_test_raw_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
736 {
737  mavlink_message_t msg;
738  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
739  uint16_t i;
740  mavlink_raw_imu_t packet_in = {
741  93372036854775807ULL,17651,17755,17859,17963,18067,18171,18275,18379,18483
742  };
743  mavlink_raw_imu_t packet1, packet2;
744  memset(&packet1, 0, sizeof(packet1));
745  packet1.time_usec = packet_in.time_usec;
746  packet1.xacc = packet_in.xacc;
747  packet1.yacc = packet_in.yacc;
748  packet1.zacc = packet_in.zacc;
749  packet1.xgyro = packet_in.xgyro;
750  packet1.ygyro = packet_in.ygyro;
751  packet1.zgyro = packet_in.zgyro;
752  packet1.xmag = packet_in.xmag;
753  packet1.ymag = packet_in.ymag;
754  packet1.zmag = packet_in.zmag;
755 
756 
757 
758  memset(&packet2, 0, sizeof(packet2));
759  mavlink_msg_raw_imu_encode(system_id, component_id, &msg, &packet1);
760  mavlink_msg_raw_imu_decode(&msg, &packet2);
761  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
762 
763  memset(&packet2, 0, sizeof(packet2));
764  mavlink_msg_raw_imu_pack(system_id, component_id, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
765  mavlink_msg_raw_imu_decode(&msg, &packet2);
766  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
767 
768  memset(&packet2, 0, sizeof(packet2));
769  mavlink_msg_raw_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
770  mavlink_msg_raw_imu_decode(&msg, &packet2);
771  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
772 
773  memset(&packet2, 0, sizeof(packet2));
774  mavlink_msg_to_send_buffer(buffer, &msg);
775  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
776  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
777  }
778  mavlink_msg_raw_imu_decode(last_msg, &packet2);
779  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
780 
781  memset(&packet2, 0, sizeof(packet2));
782  mavlink_msg_raw_imu_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
783  mavlink_msg_raw_imu_decode(last_msg, &packet2);
784  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
785 }
786 
787 static void mavlink_test_raw_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
788 {
789  mavlink_message_t msg;
790  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
791  uint16_t i;
792  mavlink_raw_pressure_t packet_in = {
793  93372036854775807ULL,17651,17755,17859,17963
794  };
795  mavlink_raw_pressure_t packet1, packet2;
796  memset(&packet1, 0, sizeof(packet1));
797  packet1.time_usec = packet_in.time_usec;
798  packet1.press_abs = packet_in.press_abs;
799  packet1.press_diff1 = packet_in.press_diff1;
800  packet1.press_diff2 = packet_in.press_diff2;
801  packet1.temperature = packet_in.temperature;
802 
803 
804 
805  memset(&packet2, 0, sizeof(packet2));
806  mavlink_msg_raw_pressure_encode(system_id, component_id, &msg, &packet1);
807  mavlink_msg_raw_pressure_decode(&msg, &packet2);
808  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
809 
810  memset(&packet2, 0, sizeof(packet2));
811  mavlink_msg_raw_pressure_pack(system_id, component_id, &msg , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
812  mavlink_msg_raw_pressure_decode(&msg, &packet2);
813  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
814 
815  memset(&packet2, 0, sizeof(packet2));
816  mavlink_msg_raw_pressure_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
817  mavlink_msg_raw_pressure_decode(&msg, &packet2);
818  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
819 
820  memset(&packet2, 0, sizeof(packet2));
821  mavlink_msg_to_send_buffer(buffer, &msg);
822  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
823  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
824  }
825  mavlink_msg_raw_pressure_decode(last_msg, &packet2);
826  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
827 
828  memset(&packet2, 0, sizeof(packet2));
829  mavlink_msg_raw_pressure_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.press_abs , packet1.press_diff1 , packet1.press_diff2 , packet1.temperature );
830  mavlink_msg_raw_pressure_decode(last_msg, &packet2);
831  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
832 }
833 
834 static void mavlink_test_scaled_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
835 {
836  mavlink_message_t msg;
837  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
838  uint16_t i;
839  mavlink_scaled_pressure_t packet_in = {
840  963497464,45.0,73.0,17859
841  };
842  mavlink_scaled_pressure_t packet1, packet2;
843  memset(&packet1, 0, sizeof(packet1));
844  packet1.time_boot_ms = packet_in.time_boot_ms;
845  packet1.press_abs = packet_in.press_abs;
846  packet1.press_diff = packet_in.press_diff;
847  packet1.temperature = packet_in.temperature;
848 
849 
850 
851  memset(&packet2, 0, sizeof(packet2));
852  mavlink_msg_scaled_pressure_encode(system_id, component_id, &msg, &packet1);
853  mavlink_msg_scaled_pressure_decode(&msg, &packet2);
854  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
855 
856  memset(&packet2, 0, sizeof(packet2));
857  mavlink_msg_scaled_pressure_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
858  mavlink_msg_scaled_pressure_decode(&msg, &packet2);
859  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
860 
861  memset(&packet2, 0, sizeof(packet2));
862  mavlink_msg_scaled_pressure_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
863  mavlink_msg_scaled_pressure_decode(&msg, &packet2);
864  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
865 
866  memset(&packet2, 0, sizeof(packet2));
867  mavlink_msg_to_send_buffer(buffer, &msg);
868  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
869  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
870  }
871  mavlink_msg_scaled_pressure_decode(last_msg, &packet2);
872  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
873 
874  memset(&packet2, 0, sizeof(packet2));
875  mavlink_msg_scaled_pressure_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
876  mavlink_msg_scaled_pressure_decode(last_msg, &packet2);
877  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
878 }
879 
880 static void mavlink_test_attitude(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
881 {
882  mavlink_message_t msg;
883  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
884  uint16_t i;
885  mavlink_attitude_t packet_in = {
886  963497464,45.0,73.0,101.0,129.0,157.0,185.0
887  };
888  mavlink_attitude_t packet1, packet2;
889  memset(&packet1, 0, sizeof(packet1));
890  packet1.time_boot_ms = packet_in.time_boot_ms;
891  packet1.roll = packet_in.roll;
892  packet1.pitch = packet_in.pitch;
893  packet1.yaw = packet_in.yaw;
894  packet1.rollspeed = packet_in.rollspeed;
895  packet1.pitchspeed = packet_in.pitchspeed;
896  packet1.yawspeed = packet_in.yawspeed;
897 
898 
899 
900  memset(&packet2, 0, sizeof(packet2));
901  mavlink_msg_attitude_encode(system_id, component_id, &msg, &packet1);
902  mavlink_msg_attitude_decode(&msg, &packet2);
903  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
904 
905  memset(&packet2, 0, sizeof(packet2));
906  mavlink_msg_attitude_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
907  mavlink_msg_attitude_decode(&msg, &packet2);
908  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
909 
910  memset(&packet2, 0, sizeof(packet2));
911  mavlink_msg_attitude_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
912  mavlink_msg_attitude_decode(&msg, &packet2);
913  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
914 
915  memset(&packet2, 0, sizeof(packet2));
916  mavlink_msg_to_send_buffer(buffer, &msg);
917  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
918  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
919  }
920  mavlink_msg_attitude_decode(last_msg, &packet2);
921  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
922 
923  memset(&packet2, 0, sizeof(packet2));
924  mavlink_msg_attitude_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
925  mavlink_msg_attitude_decode(last_msg, &packet2);
926  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
927 }
928 
929 static void mavlink_test_attitude_quaternion(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
930 {
931  mavlink_message_t msg;
932  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
933  uint16_t i;
934  mavlink_attitude_quaternion_t packet_in = {
935  963497464,45.0,73.0,101.0,129.0,157.0,185.0,213.0
936  };
937  mavlink_attitude_quaternion_t packet1, packet2;
938  memset(&packet1, 0, sizeof(packet1));
939  packet1.time_boot_ms = packet_in.time_boot_ms;
940  packet1.q1 = packet_in.q1;
941  packet1.q2 = packet_in.q2;
942  packet1.q3 = packet_in.q3;
943  packet1.q4 = packet_in.q4;
944  packet1.rollspeed = packet_in.rollspeed;
945  packet1.pitchspeed = packet_in.pitchspeed;
946  packet1.yawspeed = packet_in.yawspeed;
947 
948 
949 
950  memset(&packet2, 0, sizeof(packet2));
951  mavlink_msg_attitude_quaternion_encode(system_id, component_id, &msg, &packet1);
953  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
954 
955  memset(&packet2, 0, sizeof(packet2));
956  mavlink_msg_attitude_quaternion_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
958  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
959 
960  memset(&packet2, 0, sizeof(packet2));
961  mavlink_msg_attitude_quaternion_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
963  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
964 
965  memset(&packet2, 0, sizeof(packet2));
966  mavlink_msg_to_send_buffer(buffer, &msg);
967  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
968  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
969  }
970  mavlink_msg_attitude_quaternion_decode(last_msg, &packet2);
971  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
972 
973  memset(&packet2, 0, sizeof(packet2));
974  mavlink_msg_attitude_quaternion_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed );
975  mavlink_msg_attitude_quaternion_decode(last_msg, &packet2);
976  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
977 }
978 
979 static void mavlink_test_local_position_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
980 {
981  mavlink_message_t msg;
982  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
983  uint16_t i;
984  mavlink_local_position_ned_t packet_in = {
985  963497464,45.0,73.0,101.0,129.0,157.0,185.0
986  };
987  mavlink_local_position_ned_t packet1, packet2;
988  memset(&packet1, 0, sizeof(packet1));
989  packet1.time_boot_ms = packet_in.time_boot_ms;
990  packet1.x = packet_in.x;
991  packet1.y = packet_in.y;
992  packet1.z = packet_in.z;
993  packet1.vx = packet_in.vx;
994  packet1.vy = packet_in.vy;
995  packet1.vz = packet_in.vz;
996 
997 
998 
999  memset(&packet2, 0, sizeof(packet2));
1000  mavlink_msg_local_position_ned_encode(system_id, component_id, &msg, &packet1);
1001  mavlink_msg_local_position_ned_decode(&msg, &packet2);
1002  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1003 
1004  memset(&packet2, 0, sizeof(packet2));
1005  mavlink_msg_local_position_ned_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
1006  mavlink_msg_local_position_ned_decode(&msg, &packet2);
1007  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1008 
1009  memset(&packet2, 0, sizeof(packet2));
1010  mavlink_msg_local_position_ned_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
1011  mavlink_msg_local_position_ned_decode(&msg, &packet2);
1012  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1013 
1014  memset(&packet2, 0, sizeof(packet2));
1015  mavlink_msg_to_send_buffer(buffer, &msg);
1016  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1017  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1018  }
1019  mavlink_msg_local_position_ned_decode(last_msg, &packet2);
1020  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1021 
1022  memset(&packet2, 0, sizeof(packet2));
1023  mavlink_msg_local_position_ned_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz );
1024  mavlink_msg_local_position_ned_decode(last_msg, &packet2);
1025  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1026 }
1027 
1028 static void mavlink_test_global_position_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1029 {
1030  mavlink_message_t msg;
1031  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1032  uint16_t i;
1033  mavlink_global_position_int_t packet_in = {
1034  963497464,963497672,963497880,963498088,963498296,18275,18379,18483,18587
1035  };
1036  mavlink_global_position_int_t packet1, packet2;
1037  memset(&packet1, 0, sizeof(packet1));
1038  packet1.time_boot_ms = packet_in.time_boot_ms;
1039  packet1.lat = packet_in.lat;
1040  packet1.lon = packet_in.lon;
1041  packet1.alt = packet_in.alt;
1042  packet1.relative_alt = packet_in.relative_alt;
1043  packet1.vx = packet_in.vx;
1044  packet1.vy = packet_in.vy;
1045  packet1.vz = packet_in.vz;
1046  packet1.hdg = packet_in.hdg;
1047 
1048 
1049 
1050  memset(&packet2, 0, sizeof(packet2));
1051  mavlink_msg_global_position_int_encode(system_id, component_id, &msg, &packet1);
1053  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1054 
1055  memset(&packet2, 0, sizeof(packet2));
1056  mavlink_msg_global_position_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
1058  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1059 
1060  memset(&packet2, 0, sizeof(packet2));
1061  mavlink_msg_global_position_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
1063  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1064 
1065  memset(&packet2, 0, sizeof(packet2));
1066  mavlink_msg_to_send_buffer(buffer, &msg);
1067  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1068  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1069  }
1070  mavlink_msg_global_position_int_decode(last_msg, &packet2);
1071  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1072 
1073  memset(&packet2, 0, sizeof(packet2));
1074  mavlink_msg_global_position_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.hdg );
1075  mavlink_msg_global_position_int_decode(last_msg, &packet2);
1076  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1077 }
1078 
1079 static void mavlink_test_rc_channels_scaled(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1080 {
1081  mavlink_message_t msg;
1082  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1083  uint16_t i;
1084  mavlink_rc_channels_scaled_t packet_in = {
1085  963497464,17443,17547,17651,17755,17859,17963,18067,18171,65,132
1086  };
1087  mavlink_rc_channels_scaled_t packet1, packet2;
1088  memset(&packet1, 0, sizeof(packet1));
1089  packet1.time_boot_ms = packet_in.time_boot_ms;
1090  packet1.chan1_scaled = packet_in.chan1_scaled;
1091  packet1.chan2_scaled = packet_in.chan2_scaled;
1092  packet1.chan3_scaled = packet_in.chan3_scaled;
1093  packet1.chan4_scaled = packet_in.chan4_scaled;
1094  packet1.chan5_scaled = packet_in.chan5_scaled;
1095  packet1.chan6_scaled = packet_in.chan6_scaled;
1096  packet1.chan7_scaled = packet_in.chan7_scaled;
1097  packet1.chan8_scaled = packet_in.chan8_scaled;
1098  packet1.port = packet_in.port;
1099  packet1.rssi = packet_in.rssi;
1100 
1101 
1102 
1103  memset(&packet2, 0, sizeof(packet2));
1104  mavlink_msg_rc_channels_scaled_encode(system_id, component_id, &msg, &packet1);
1105  mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
1106  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1107 
1108  memset(&packet2, 0, sizeof(packet2));
1109  mavlink_msg_rc_channels_scaled_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
1110  mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
1111  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1112 
1113  memset(&packet2, 0, sizeof(packet2));
1114  mavlink_msg_rc_channels_scaled_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
1115  mavlink_msg_rc_channels_scaled_decode(&msg, &packet2);
1116  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1117 
1118  memset(&packet2, 0, sizeof(packet2));
1119  mavlink_msg_to_send_buffer(buffer, &msg);
1120  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1121  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1122  }
1123  mavlink_msg_rc_channels_scaled_decode(last_msg, &packet2);
1124  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1125 
1126  memset(&packet2, 0, sizeof(packet2));
1127  mavlink_msg_rc_channels_scaled_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.port , packet1.chan1_scaled , packet1.chan2_scaled , packet1.chan3_scaled , packet1.chan4_scaled , packet1.chan5_scaled , packet1.chan6_scaled , packet1.chan7_scaled , packet1.chan8_scaled , packet1.rssi );
1128  mavlink_msg_rc_channels_scaled_decode(last_msg, &packet2);
1129  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1130 }
1131 
1132 static void mavlink_test_rc_channels_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1133 {
1134  mavlink_message_t msg;
1135  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1136  uint16_t i;
1137  mavlink_rc_channels_raw_t packet_in = {
1138  963497464,17443,17547,17651,17755,17859,17963,18067,18171,65,132
1139  };
1140  mavlink_rc_channels_raw_t packet1, packet2;
1141  memset(&packet1, 0, sizeof(packet1));
1142  packet1.time_boot_ms = packet_in.time_boot_ms;
1143  packet1.chan1_raw = packet_in.chan1_raw;
1144  packet1.chan2_raw = packet_in.chan2_raw;
1145  packet1.chan3_raw = packet_in.chan3_raw;
1146  packet1.chan4_raw = packet_in.chan4_raw;
1147  packet1.chan5_raw = packet_in.chan5_raw;
1148  packet1.chan6_raw = packet_in.chan6_raw;
1149  packet1.chan7_raw = packet_in.chan7_raw;
1150  packet1.chan8_raw = packet_in.chan8_raw;
1151  packet1.port = packet_in.port;
1152  packet1.rssi = packet_in.rssi;
1153 
1154 
1155 
1156  memset(&packet2, 0, sizeof(packet2));
1157  mavlink_msg_rc_channels_raw_encode(system_id, component_id, &msg, &packet1);
1158  mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
1159  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1160 
1161  memset(&packet2, 0, sizeof(packet2));
1162  mavlink_msg_rc_channels_raw_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
1163  mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
1164  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1165 
1166  memset(&packet2, 0, sizeof(packet2));
1167  mavlink_msg_rc_channels_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
1168  mavlink_msg_rc_channels_raw_decode(&msg, &packet2);
1169  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1170 
1171  memset(&packet2, 0, sizeof(packet2));
1172  mavlink_msg_to_send_buffer(buffer, &msg);
1173  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1174  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1175  }
1176  mavlink_msg_rc_channels_raw_decode(last_msg, &packet2);
1177  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1178 
1179  memset(&packet2, 0, sizeof(packet2));
1180  mavlink_msg_rc_channels_raw_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.port , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.rssi );
1181  mavlink_msg_rc_channels_raw_decode(last_msg, &packet2);
1182  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1183 }
1184 
1185 static void mavlink_test_servo_output_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1186 {
1187  mavlink_message_t msg;
1188  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1189  uint16_t i;
1190  mavlink_servo_output_raw_t packet_in = {
1191  963497464,17443,17547,17651,17755,17859,17963,18067,18171,65
1192  };
1193  mavlink_servo_output_raw_t packet1, packet2;
1194  memset(&packet1, 0, sizeof(packet1));
1195  packet1.time_usec = packet_in.time_usec;
1196  packet1.servo1_raw = packet_in.servo1_raw;
1197  packet1.servo2_raw = packet_in.servo2_raw;
1198  packet1.servo3_raw = packet_in.servo3_raw;
1199  packet1.servo4_raw = packet_in.servo4_raw;
1200  packet1.servo5_raw = packet_in.servo5_raw;
1201  packet1.servo6_raw = packet_in.servo6_raw;
1202  packet1.servo7_raw = packet_in.servo7_raw;
1203  packet1.servo8_raw = packet_in.servo8_raw;
1204  packet1.port = packet_in.port;
1205 
1206 
1207 
1208  memset(&packet2, 0, sizeof(packet2));
1209  mavlink_msg_servo_output_raw_encode(system_id, component_id, &msg, &packet1);
1210  mavlink_msg_servo_output_raw_decode(&msg, &packet2);
1211  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1212 
1213  memset(&packet2, 0, sizeof(packet2));
1214  mavlink_msg_servo_output_raw_pack(system_id, component_id, &msg , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
1215  mavlink_msg_servo_output_raw_decode(&msg, &packet2);
1216  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1217 
1218  memset(&packet2, 0, sizeof(packet2));
1219  mavlink_msg_servo_output_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
1220  mavlink_msg_servo_output_raw_decode(&msg, &packet2);
1221  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1222 
1223  memset(&packet2, 0, sizeof(packet2));
1224  mavlink_msg_to_send_buffer(buffer, &msg);
1225  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1226  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1227  }
1228  mavlink_msg_servo_output_raw_decode(last_msg, &packet2);
1229  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1230 
1231  memset(&packet2, 0, sizeof(packet2));
1232  mavlink_msg_servo_output_raw_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.port , packet1.servo1_raw , packet1.servo2_raw , packet1.servo3_raw , packet1.servo4_raw , packet1.servo5_raw , packet1.servo6_raw , packet1.servo7_raw , packet1.servo8_raw );
1233  mavlink_msg_servo_output_raw_decode(last_msg, &packet2);
1234  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1235 }
1236 
1237 static void mavlink_test_mission_request_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1238 {
1239  mavlink_message_t msg;
1240  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1241  uint16_t i;
1243  17235,17339,17,84
1244  };
1245  mavlink_mission_request_partial_list_t packet1, packet2;
1246  memset(&packet1, 0, sizeof(packet1));
1247  packet1.start_index = packet_in.start_index;
1248  packet1.end_index = packet_in.end_index;
1249  packet1.target_system = packet_in.target_system;
1250  packet1.target_component = packet_in.target_component;
1251 
1252 
1253 
1254  memset(&packet2, 0, sizeof(packet2));
1255  mavlink_msg_mission_request_partial_list_encode(system_id, component_id, &msg, &packet1);
1257  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1258 
1259  memset(&packet2, 0, sizeof(packet2));
1260  mavlink_msg_mission_request_partial_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1262  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1263 
1264  memset(&packet2, 0, sizeof(packet2));
1265  mavlink_msg_mission_request_partial_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1267  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1268 
1269  memset(&packet2, 0, sizeof(packet2));
1270  mavlink_msg_to_send_buffer(buffer, &msg);
1271  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1272  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1273  }
1275  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1276 
1277  memset(&packet2, 0, sizeof(packet2));
1278  mavlink_msg_mission_request_partial_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1280  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1281 }
1282 
1283 static void mavlink_test_mission_write_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1284 {
1285  mavlink_message_t msg;
1286  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1287  uint16_t i;
1289  17235,17339,17,84
1290  };
1291  mavlink_mission_write_partial_list_t packet1, packet2;
1292  memset(&packet1, 0, sizeof(packet1));
1293  packet1.start_index = packet_in.start_index;
1294  packet1.end_index = packet_in.end_index;
1295  packet1.target_system = packet_in.target_system;
1296  packet1.target_component = packet_in.target_component;
1297 
1298 
1299 
1300  memset(&packet2, 0, sizeof(packet2));
1301  mavlink_msg_mission_write_partial_list_encode(system_id, component_id, &msg, &packet1);
1303  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1304 
1305  memset(&packet2, 0, sizeof(packet2));
1306  mavlink_msg_mission_write_partial_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1308  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1309 
1310  memset(&packet2, 0, sizeof(packet2));
1311  mavlink_msg_mission_write_partial_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1313  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1314 
1315  memset(&packet2, 0, sizeof(packet2));
1316  mavlink_msg_to_send_buffer(buffer, &msg);
1317  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1318  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1319  }
1321  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1322 
1323  memset(&packet2, 0, sizeof(packet2));
1324  mavlink_msg_mission_write_partial_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.start_index , packet1.end_index );
1326  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1327 }
1328 
1329 static void mavlink_test_mission_item(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1330 {
1331  mavlink_message_t msg;
1332  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1333  uint16_t i;
1334  mavlink_mission_item_t packet_in = {
1335  17.0,45.0,73.0,101.0,129.0,157.0,185.0,18691,18795,101,168,235,46,113
1336  };
1337  mavlink_mission_item_t packet1, packet2;
1338  memset(&packet1, 0, sizeof(packet1));
1339  packet1.param1 = packet_in.param1;
1340  packet1.param2 = packet_in.param2;
1341  packet1.param3 = packet_in.param3;
1342  packet1.param4 = packet_in.param4;
1343  packet1.x = packet_in.x;
1344  packet1.y = packet_in.y;
1345  packet1.z = packet_in.z;
1346  packet1.seq = packet_in.seq;
1347  packet1.command = packet_in.command;
1348  packet1.target_system = packet_in.target_system;
1349  packet1.target_component = packet_in.target_component;
1350  packet1.frame = packet_in.frame;
1351  packet1.current = packet_in.current;
1352  packet1.autocontinue = packet_in.autocontinue;
1353 
1354 
1355 
1356  memset(&packet2, 0, sizeof(packet2));
1357  mavlink_msg_mission_item_encode(system_id, component_id, &msg, &packet1);
1358  mavlink_msg_mission_item_decode(&msg, &packet2);
1359  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1360 
1361  memset(&packet2, 0, sizeof(packet2));
1362  mavlink_msg_mission_item_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
1363  mavlink_msg_mission_item_decode(&msg, &packet2);
1364  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1365 
1366  memset(&packet2, 0, sizeof(packet2));
1367  mavlink_msg_mission_item_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
1368  mavlink_msg_mission_item_decode(&msg, &packet2);
1369  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1370 
1371  memset(&packet2, 0, sizeof(packet2));
1372  mavlink_msg_to_send_buffer(buffer, &msg);
1373  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1374  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1375  }
1376  mavlink_msg_mission_item_decode(last_msg, &packet2);
1377  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1378 
1379  memset(&packet2, 0, sizeof(packet2));
1380  mavlink_msg_mission_item_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
1381  mavlink_msg_mission_item_decode(last_msg, &packet2);
1382  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1383 }
1384 
1385 static void mavlink_test_mission_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1386 {
1387  mavlink_message_t msg;
1388  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1389  uint16_t i;
1390  mavlink_mission_request_t packet_in = {
1391  17235,139,206
1392  };
1393  mavlink_mission_request_t packet1, packet2;
1394  memset(&packet1, 0, sizeof(packet1));
1395  packet1.seq = packet_in.seq;
1396  packet1.target_system = packet_in.target_system;
1397  packet1.target_component = packet_in.target_component;
1398 
1399 
1400 
1401  memset(&packet2, 0, sizeof(packet2));
1402  mavlink_msg_mission_request_encode(system_id, component_id, &msg, &packet1);
1403  mavlink_msg_mission_request_decode(&msg, &packet2);
1404  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1405 
1406  memset(&packet2, 0, sizeof(packet2));
1407  mavlink_msg_mission_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1408  mavlink_msg_mission_request_decode(&msg, &packet2);
1409  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1410 
1411  memset(&packet2, 0, sizeof(packet2));
1412  mavlink_msg_mission_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1413  mavlink_msg_mission_request_decode(&msg, &packet2);
1414  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1415 
1416  memset(&packet2, 0, sizeof(packet2));
1417  mavlink_msg_to_send_buffer(buffer, &msg);
1418  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1419  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1420  }
1421  mavlink_msg_mission_request_decode(last_msg, &packet2);
1422  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1423 
1424  memset(&packet2, 0, sizeof(packet2));
1425  mavlink_msg_mission_request_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq );
1426  mavlink_msg_mission_request_decode(last_msg, &packet2);
1427  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1428 }
1429 
1430 static void mavlink_test_mission_set_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1431 {
1432  mavlink_message_t msg;
1433  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1434  uint16_t i;
1435  mavlink_mission_set_current_t packet_in = {
1436  17235,139,206
1437  };
1438  mavlink_mission_set_current_t packet1, packet2;
1439  memset(&packet1, 0, sizeof(packet1));
1440  packet1.seq = packet_in.seq;
1441  packet1.target_system = packet_in.target_system;
1442  packet1.target_component = packet_in.target_component;
1443 
1444 
1445 
1446  memset(&packet2, 0, sizeof(packet2));
1447  mavlink_msg_mission_set_current_encode(system_id, component_id, &msg, &packet1);
1449  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1450 
1451  memset(&packet2, 0, sizeof(packet2));
1452  mavlink_msg_mission_set_current_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1454  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1455 
1456  memset(&packet2, 0, sizeof(packet2));
1457  mavlink_msg_mission_set_current_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1459  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1460 
1461  memset(&packet2, 0, sizeof(packet2));
1462  mavlink_msg_to_send_buffer(buffer, &msg);
1463  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1464  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1465  }
1466  mavlink_msg_mission_set_current_decode(last_msg, &packet2);
1467  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1468 
1469  memset(&packet2, 0, sizeof(packet2));
1470  mavlink_msg_mission_set_current_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq );
1471  mavlink_msg_mission_set_current_decode(last_msg, &packet2);
1472  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1473 }
1474 
1475 static void mavlink_test_mission_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1476 {
1477  mavlink_message_t msg;
1478  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1479  uint16_t i;
1480  mavlink_mission_current_t packet_in = {
1481  17235
1482  };
1483  mavlink_mission_current_t packet1, packet2;
1484  memset(&packet1, 0, sizeof(packet1));
1485  packet1.seq = packet_in.seq;
1486 
1487 
1488 
1489  memset(&packet2, 0, sizeof(packet2));
1490  mavlink_msg_mission_current_encode(system_id, component_id, &msg, &packet1);
1491  mavlink_msg_mission_current_decode(&msg, &packet2);
1492  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1493 
1494  memset(&packet2, 0, sizeof(packet2));
1495  mavlink_msg_mission_current_pack(system_id, component_id, &msg , packet1.seq );
1496  mavlink_msg_mission_current_decode(&msg, &packet2);
1497  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1498 
1499  memset(&packet2, 0, sizeof(packet2));
1500  mavlink_msg_mission_current_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq );
1501  mavlink_msg_mission_current_decode(&msg, &packet2);
1502  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1503 
1504  memset(&packet2, 0, sizeof(packet2));
1505  mavlink_msg_to_send_buffer(buffer, &msg);
1506  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1507  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1508  }
1509  mavlink_msg_mission_current_decode(last_msg, &packet2);
1510  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1511 
1512  memset(&packet2, 0, sizeof(packet2));
1513  mavlink_msg_mission_current_send(MAVLINK_COMM_1 , packet1.seq );
1514  mavlink_msg_mission_current_decode(last_msg, &packet2);
1515  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1516 }
1517 
1518 static void mavlink_test_mission_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1519 {
1520  mavlink_message_t msg;
1521  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1522  uint16_t i;
1523  mavlink_mission_request_list_t packet_in = {
1524  5,72
1525  };
1526  mavlink_mission_request_list_t packet1, packet2;
1527  memset(&packet1, 0, sizeof(packet1));
1528  packet1.target_system = packet_in.target_system;
1529  packet1.target_component = packet_in.target_component;
1530 
1531 
1532 
1533  memset(&packet2, 0, sizeof(packet2));
1534  mavlink_msg_mission_request_list_encode(system_id, component_id, &msg, &packet1);
1536  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1537 
1538  memset(&packet2, 0, sizeof(packet2));
1539  mavlink_msg_mission_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
1541  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1542 
1543  memset(&packet2, 0, sizeof(packet2));
1544  mavlink_msg_mission_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
1546  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1547 
1548  memset(&packet2, 0, sizeof(packet2));
1549  mavlink_msg_to_send_buffer(buffer, &msg);
1550  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1551  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1552  }
1553  mavlink_msg_mission_request_list_decode(last_msg, &packet2);
1554  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1555 
1556  memset(&packet2, 0, sizeof(packet2));
1557  mavlink_msg_mission_request_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
1558  mavlink_msg_mission_request_list_decode(last_msg, &packet2);
1559  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1560 }
1561 
1562 static void mavlink_test_mission_count(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1563 {
1564  mavlink_message_t msg;
1565  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1566  uint16_t i;
1567  mavlink_mission_count_t packet_in = {
1568  17235,139,206
1569  };
1570  mavlink_mission_count_t packet1, packet2;
1571  memset(&packet1, 0, sizeof(packet1));
1572  packet1.count = packet_in.count;
1573  packet1.target_system = packet_in.target_system;
1574  packet1.target_component = packet_in.target_component;
1575 
1576 
1577 
1578  memset(&packet2, 0, sizeof(packet2));
1579  mavlink_msg_mission_count_encode(system_id, component_id, &msg, &packet1);
1580  mavlink_msg_mission_count_decode(&msg, &packet2);
1581  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1582 
1583  memset(&packet2, 0, sizeof(packet2));
1584  mavlink_msg_mission_count_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.count );
1585  mavlink_msg_mission_count_decode(&msg, &packet2);
1586  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1587 
1588  memset(&packet2, 0, sizeof(packet2));
1589  mavlink_msg_mission_count_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.count );
1590  mavlink_msg_mission_count_decode(&msg, &packet2);
1591  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1592 
1593  memset(&packet2, 0, sizeof(packet2));
1594  mavlink_msg_to_send_buffer(buffer, &msg);
1595  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1596  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1597  }
1598  mavlink_msg_mission_count_decode(last_msg, &packet2);
1599  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1600 
1601  memset(&packet2, 0, sizeof(packet2));
1602  mavlink_msg_mission_count_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.count );
1603  mavlink_msg_mission_count_decode(last_msg, &packet2);
1604  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1605 }
1606 
1607 static void mavlink_test_mission_clear_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1608 {
1609  mavlink_message_t msg;
1610  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1611  uint16_t i;
1612  mavlink_mission_clear_all_t packet_in = {
1613  5,72
1614  };
1615  mavlink_mission_clear_all_t packet1, packet2;
1616  memset(&packet1, 0, sizeof(packet1));
1617  packet1.target_system = packet_in.target_system;
1618  packet1.target_component = packet_in.target_component;
1619 
1620 
1621 
1622  memset(&packet2, 0, sizeof(packet2));
1623  mavlink_msg_mission_clear_all_encode(system_id, component_id, &msg, &packet1);
1624  mavlink_msg_mission_clear_all_decode(&msg, &packet2);
1625  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1626 
1627  memset(&packet2, 0, sizeof(packet2));
1628  mavlink_msg_mission_clear_all_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
1629  mavlink_msg_mission_clear_all_decode(&msg, &packet2);
1630  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1631 
1632  memset(&packet2, 0, sizeof(packet2));
1633  mavlink_msg_mission_clear_all_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
1634  mavlink_msg_mission_clear_all_decode(&msg, &packet2);
1635  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1636 
1637  memset(&packet2, 0, sizeof(packet2));
1638  mavlink_msg_to_send_buffer(buffer, &msg);
1639  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1640  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1641  }
1642  mavlink_msg_mission_clear_all_decode(last_msg, &packet2);
1643  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1644 
1645  memset(&packet2, 0, sizeof(packet2));
1646  mavlink_msg_mission_clear_all_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
1647  mavlink_msg_mission_clear_all_decode(last_msg, &packet2);
1648  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1649 }
1650 
1651 static void mavlink_test_mission_item_reached(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1652 {
1653  mavlink_message_t msg;
1654  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1655  uint16_t i;
1656  mavlink_mission_item_reached_t packet_in = {
1657  17235
1658  };
1659  mavlink_mission_item_reached_t packet1, packet2;
1660  memset(&packet1, 0, sizeof(packet1));
1661  packet1.seq = packet_in.seq;
1662 
1663 
1664 
1665  memset(&packet2, 0, sizeof(packet2));
1666  mavlink_msg_mission_item_reached_encode(system_id, component_id, &msg, &packet1);
1668  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1669 
1670  memset(&packet2, 0, sizeof(packet2));
1671  mavlink_msg_mission_item_reached_pack(system_id, component_id, &msg , packet1.seq );
1673  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1674 
1675  memset(&packet2, 0, sizeof(packet2));
1676  mavlink_msg_mission_item_reached_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq );
1678  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1679 
1680  memset(&packet2, 0, sizeof(packet2));
1681  mavlink_msg_to_send_buffer(buffer, &msg);
1682  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1683  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1684  }
1685  mavlink_msg_mission_item_reached_decode(last_msg, &packet2);
1686  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1687 
1688  memset(&packet2, 0, sizeof(packet2));
1689  mavlink_msg_mission_item_reached_send(MAVLINK_COMM_1 , packet1.seq );
1690  mavlink_msg_mission_item_reached_decode(last_msg, &packet2);
1691  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1692 }
1693 
1694 static void mavlink_test_mission_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1695 {
1696  mavlink_message_t msg;
1697  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1698  uint16_t i;
1699  mavlink_mission_ack_t packet_in = {
1700  5,72,139
1701  };
1702  mavlink_mission_ack_t packet1, packet2;
1703  memset(&packet1, 0, sizeof(packet1));
1704  packet1.target_system = packet_in.target_system;
1705  packet1.target_component = packet_in.target_component;
1706  packet1.type = packet_in.type;
1707 
1708 
1709 
1710  memset(&packet2, 0, sizeof(packet2));
1711  mavlink_msg_mission_ack_encode(system_id, component_id, &msg, &packet1);
1712  mavlink_msg_mission_ack_decode(&msg, &packet2);
1713  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1714 
1715  memset(&packet2, 0, sizeof(packet2));
1716  mavlink_msg_mission_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.type );
1717  mavlink_msg_mission_ack_decode(&msg, &packet2);
1718  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1719 
1720  memset(&packet2, 0, sizeof(packet2));
1721  mavlink_msg_mission_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.type );
1722  mavlink_msg_mission_ack_decode(&msg, &packet2);
1723  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1724 
1725  memset(&packet2, 0, sizeof(packet2));
1726  mavlink_msg_to_send_buffer(buffer, &msg);
1727  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1728  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1729  }
1730  mavlink_msg_mission_ack_decode(last_msg, &packet2);
1731  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1732 
1733  memset(&packet2, 0, sizeof(packet2));
1734  mavlink_msg_mission_ack_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.type );
1735  mavlink_msg_mission_ack_decode(last_msg, &packet2);
1736  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1737 }
1738 
1739 static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1740 {
1741  mavlink_message_t msg;
1742  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1743  uint16_t i;
1744  mavlink_set_gps_global_origin_t packet_in = {
1745  963497464,963497672,963497880,41
1746  };
1747  mavlink_set_gps_global_origin_t packet1, packet2;
1748  memset(&packet1, 0, sizeof(packet1));
1749  packet1.latitude = packet_in.latitude;
1750  packet1.longitude = packet_in.longitude;
1751  packet1.altitude = packet_in.altitude;
1752  packet1.target_system = packet_in.target_system;
1753 
1754 
1755 
1756  memset(&packet2, 0, sizeof(packet2));
1757  mavlink_msg_set_gps_global_origin_encode(system_id, component_id, &msg, &packet1);
1759  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1760 
1761  memset(&packet2, 0, sizeof(packet2));
1762  mavlink_msg_set_gps_global_origin_pack(system_id, component_id, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
1764  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1765 
1766  memset(&packet2, 0, sizeof(packet2));
1767  mavlink_msg_set_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
1769  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1770 
1771  memset(&packet2, 0, sizeof(packet2));
1772  mavlink_msg_to_send_buffer(buffer, &msg);
1773  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1774  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1775  }
1776  mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2);
1777  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1778 
1779  memset(&packet2, 0, sizeof(packet2));
1780  mavlink_msg_set_gps_global_origin_send(MAVLINK_COMM_1 , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude );
1781  mavlink_msg_set_gps_global_origin_decode(last_msg, &packet2);
1782  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1783 }
1784 
1785 static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1786 {
1787  mavlink_message_t msg;
1788  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1789  uint16_t i;
1790  mavlink_gps_global_origin_t packet_in = {
1791  963497464,963497672,963497880
1792  };
1793  mavlink_gps_global_origin_t packet1, packet2;
1794  memset(&packet1, 0, sizeof(packet1));
1795  packet1.latitude = packet_in.latitude;
1796  packet1.longitude = packet_in.longitude;
1797  packet1.altitude = packet_in.altitude;
1798 
1799 
1800 
1801  memset(&packet2, 0, sizeof(packet2));
1802  mavlink_msg_gps_global_origin_encode(system_id, component_id, &msg, &packet1);
1803  mavlink_msg_gps_global_origin_decode(&msg, &packet2);
1804  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1805 
1806  memset(&packet2, 0, sizeof(packet2));
1807  mavlink_msg_gps_global_origin_pack(system_id, component_id, &msg , packet1.latitude , packet1.longitude , packet1.altitude );
1808  mavlink_msg_gps_global_origin_decode(&msg, &packet2);
1809  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1810 
1811  memset(&packet2, 0, sizeof(packet2));
1812  mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.latitude , packet1.longitude , packet1.altitude );
1813  mavlink_msg_gps_global_origin_decode(&msg, &packet2);
1814  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1815 
1816  memset(&packet2, 0, sizeof(packet2));
1817  mavlink_msg_to_send_buffer(buffer, &msg);
1818  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1819  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1820  }
1821  mavlink_msg_gps_global_origin_decode(last_msg, &packet2);
1822  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1823 
1824  memset(&packet2, 0, sizeof(packet2));
1825  mavlink_msg_gps_global_origin_send(MAVLINK_COMM_1 , packet1.latitude , packet1.longitude , packet1.altitude );
1826  mavlink_msg_gps_global_origin_decode(last_msg, &packet2);
1827  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1828 }
1829 
1830 static void mavlink_test_param_map_rc(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1831 {
1832  mavlink_message_t msg;
1833  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1834  uint16_t i;
1835  mavlink_param_map_rc_t packet_in = {
1836  17.0,45.0,73.0,101.0,18067,187,254,"UVWXYZABCDEFGHI",113
1837  };
1838  mavlink_param_map_rc_t packet1, packet2;
1839  memset(&packet1, 0, sizeof(packet1));
1840  packet1.param_value0 = packet_in.param_value0;
1841  packet1.scale = packet_in.scale;
1842  packet1.param_value_min = packet_in.param_value_min;
1843  packet1.param_value_max = packet_in.param_value_max;
1844  packet1.param_index = packet_in.param_index;
1845  packet1.target_system = packet_in.target_system;
1846  packet1.target_component = packet_in.target_component;
1848 
1849  mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
1850 
1851 
1852  memset(&packet2, 0, sizeof(packet2));
1853  mavlink_msg_param_map_rc_encode(system_id, component_id, &msg, &packet1);
1854  mavlink_msg_param_map_rc_decode(&msg, &packet2);
1855  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1856 
1857  memset(&packet2, 0, sizeof(packet2));
1858  mavlink_msg_param_map_rc_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
1859  mavlink_msg_param_map_rc_decode(&msg, &packet2);
1860  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1861 
1862  memset(&packet2, 0, sizeof(packet2));
1863  mavlink_msg_param_map_rc_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
1864  mavlink_msg_param_map_rc_decode(&msg, &packet2);
1865  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1866 
1867  memset(&packet2, 0, sizeof(packet2));
1868  mavlink_msg_to_send_buffer(buffer, &msg);
1869  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1870  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1871  }
1872  mavlink_msg_param_map_rc_decode(last_msg, &packet2);
1873  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1874 
1875  memset(&packet2, 0, sizeof(packet2));
1876  mavlink_msg_param_map_rc_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
1877  mavlink_msg_param_map_rc_decode(last_msg, &packet2);
1878  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1879 }
1880 
1881 static void mavlink_test_mission_request_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1882 {
1883  mavlink_message_t msg;
1884  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1885  uint16_t i;
1886  mavlink_mission_request_int_t packet_in = {
1887  17235,139,206
1888  };
1889  mavlink_mission_request_int_t packet1, packet2;
1890  memset(&packet1, 0, sizeof(packet1));
1891  packet1.seq = packet_in.seq;
1892  packet1.target_system = packet_in.target_system;
1893  packet1.target_component = packet_in.target_component;
1894 
1895 
1896 
1897  memset(&packet2, 0, sizeof(packet2));
1898  mavlink_msg_mission_request_int_encode(system_id, component_id, &msg, &packet1);
1900  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1901 
1902  memset(&packet2, 0, sizeof(packet2));
1903  mavlink_msg_mission_request_int_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1905  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1906 
1907  memset(&packet2, 0, sizeof(packet2));
1908  mavlink_msg_mission_request_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq );
1910  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1911 
1912  memset(&packet2, 0, sizeof(packet2));
1913  mavlink_msg_to_send_buffer(buffer, &msg);
1914  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1915  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1916  }
1917  mavlink_msg_mission_request_int_decode(last_msg, &packet2);
1918  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1919 
1920  memset(&packet2, 0, sizeof(packet2));
1921  mavlink_msg_mission_request_int_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq );
1922  mavlink_msg_mission_request_int_decode(last_msg, &packet2);
1923  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1924 }
1925 
1926 static void mavlink_test_safety_set_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1927 {
1928  mavlink_message_t msg;
1929  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1930  uint16_t i;
1931  mavlink_safety_set_allowed_area_t packet_in = {
1932  17.0,45.0,73.0,101.0,129.0,157.0,77,144,211
1933  };
1934  mavlink_safety_set_allowed_area_t packet1, packet2;
1935  memset(&packet1, 0, sizeof(packet1));
1936  packet1.p1x = packet_in.p1x;
1937  packet1.p1y = packet_in.p1y;
1938  packet1.p1z = packet_in.p1z;
1939  packet1.p2x = packet_in.p2x;
1940  packet1.p2y = packet_in.p2y;
1941  packet1.p2z = packet_in.p2z;
1942  packet1.target_system = packet_in.target_system;
1943  packet1.target_component = packet_in.target_component;
1944  packet1.frame = packet_in.frame;
1945 
1946 
1947 
1948  memset(&packet2, 0, sizeof(packet2));
1949  mavlink_msg_safety_set_allowed_area_encode(system_id, component_id, &msg, &packet1);
1951  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1952 
1953  memset(&packet2, 0, sizeof(packet2));
1954  mavlink_msg_safety_set_allowed_area_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
1956  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1957 
1958  memset(&packet2, 0, sizeof(packet2));
1959  mavlink_msg_safety_set_allowed_area_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
1961  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1962 
1963  memset(&packet2, 0, sizeof(packet2));
1964  mavlink_msg_to_send_buffer(buffer, &msg);
1965  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
1966  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
1967  }
1968  mavlink_msg_safety_set_allowed_area_decode(last_msg, &packet2);
1969  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1970 
1971  memset(&packet2, 0, sizeof(packet2));
1972  mavlink_msg_safety_set_allowed_area_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
1973  mavlink_msg_safety_set_allowed_area_decode(last_msg, &packet2);
1974  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
1975 }
1976 
1977 static void mavlink_test_safety_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
1978 {
1979  mavlink_message_t msg;
1980  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
1981  uint16_t i;
1982  mavlink_safety_allowed_area_t packet_in = {
1983  17.0,45.0,73.0,101.0,129.0,157.0,77
1984  };
1985  mavlink_safety_allowed_area_t packet1, packet2;
1986  memset(&packet1, 0, sizeof(packet1));
1987  packet1.p1x = packet_in.p1x;
1988  packet1.p1y = packet_in.p1y;
1989  packet1.p1z = packet_in.p1z;
1990  packet1.p2x = packet_in.p2x;
1991  packet1.p2y = packet_in.p2y;
1992  packet1.p2z = packet_in.p2z;
1993  packet1.frame = packet_in.frame;
1994 
1995 
1996 
1997  memset(&packet2, 0, sizeof(packet2));
1998  mavlink_msg_safety_allowed_area_encode(system_id, component_id, &msg, &packet1);
2000  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2001 
2002  memset(&packet2, 0, sizeof(packet2));
2003  mavlink_msg_safety_allowed_area_pack(system_id, component_id, &msg , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
2005  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2006 
2007  memset(&packet2, 0, sizeof(packet2));
2008  mavlink_msg_safety_allowed_area_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
2010  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2011 
2012  memset(&packet2, 0, sizeof(packet2));
2013  mavlink_msg_to_send_buffer(buffer, &msg);
2014  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2015  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2016  }
2017  mavlink_msg_safety_allowed_area_decode(last_msg, &packet2);
2018  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2019 
2020  memset(&packet2, 0, sizeof(packet2));
2021  mavlink_msg_safety_allowed_area_send(MAVLINK_COMM_1 , packet1.frame , packet1.p1x , packet1.p1y , packet1.p1z , packet1.p2x , packet1.p2y , packet1.p2z );
2022  mavlink_msg_safety_allowed_area_decode(last_msg, &packet2);
2023  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2024 }
2025 
2026 static void mavlink_test_attitude_quaternion_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2027 {
2028  mavlink_message_t msg;
2029  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2030  uint16_t i;
2031  mavlink_attitude_quaternion_cov_t packet_in = {
2032  963497464,{ 45.0, 46.0, 47.0, 48.0 },157.0,185.0,213.0,{ 241.0, 242.0, 243.0, 244.0, 245.0, 246.0, 247.0, 248.0, 249.0 }
2033  };
2034  mavlink_attitude_quaternion_cov_t packet1, packet2;
2035  memset(&packet1, 0, sizeof(packet1));
2036  packet1.time_boot_ms = packet_in.time_boot_ms;
2037  packet1.rollspeed = packet_in.rollspeed;
2038  packet1.pitchspeed = packet_in.pitchspeed;
2039  packet1.yawspeed = packet_in.yawspeed;
2040 
2041  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
2042  mav_array_memcpy(packet1.covariance, packet_in.covariance, sizeof(float)*9);
2043 
2044 
2045  memset(&packet2, 0, sizeof(packet2));
2046  mavlink_msg_attitude_quaternion_cov_encode(system_id, component_id, &msg, &packet1);
2048  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2049 
2050  memset(&packet2, 0, sizeof(packet2));
2051  mavlink_msg_attitude_quaternion_cov_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.q , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.covariance );
2053  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2054 
2055  memset(&packet2, 0, sizeof(packet2));
2056  mavlink_msg_attitude_quaternion_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.q , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.covariance );
2058  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2059 
2060  memset(&packet2, 0, sizeof(packet2));
2061  mavlink_msg_to_send_buffer(buffer, &msg);
2062  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2063  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2064  }
2065  mavlink_msg_attitude_quaternion_cov_decode(last_msg, &packet2);
2066  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2067 
2068  memset(&packet2, 0, sizeof(packet2));
2069  mavlink_msg_attitude_quaternion_cov_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.q , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.covariance );
2070  mavlink_msg_attitude_quaternion_cov_decode(last_msg, &packet2);
2071  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2072 }
2073 
2074 static void mavlink_test_nav_controller_output(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2075 {
2076  mavlink_message_t msg;
2077  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2078  uint16_t i;
2079  mavlink_nav_controller_output_t packet_in = {
2080  17.0,45.0,73.0,101.0,129.0,18275,18379,18483
2081  };
2082  mavlink_nav_controller_output_t packet1, packet2;
2083  memset(&packet1, 0, sizeof(packet1));
2084  packet1.nav_roll = packet_in.nav_roll;
2085  packet1.nav_pitch = packet_in.nav_pitch;
2086  packet1.alt_error = packet_in.alt_error;
2087  packet1.aspd_error = packet_in.aspd_error;
2088  packet1.xtrack_error = packet_in.xtrack_error;
2089  packet1.nav_bearing = packet_in.nav_bearing;
2090  packet1.target_bearing = packet_in.target_bearing;
2091  packet1.wp_dist = packet_in.wp_dist;
2092 
2093 
2094 
2095  memset(&packet2, 0, sizeof(packet2));
2096  mavlink_msg_nav_controller_output_encode(system_id, component_id, &msg, &packet1);
2098  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2099 
2100  memset(&packet2, 0, sizeof(packet2));
2101  mavlink_msg_nav_controller_output_pack(system_id, component_id, &msg , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
2103  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2104 
2105  memset(&packet2, 0, sizeof(packet2));
2106  mavlink_msg_nav_controller_output_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
2108  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2109 
2110  memset(&packet2, 0, sizeof(packet2));
2111  mavlink_msg_to_send_buffer(buffer, &msg);
2112  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2113  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2114  }
2115  mavlink_msg_nav_controller_output_decode(last_msg, &packet2);
2116  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2117 
2118  memset(&packet2, 0, sizeof(packet2));
2119  mavlink_msg_nav_controller_output_send(MAVLINK_COMM_1 , packet1.nav_roll , packet1.nav_pitch , packet1.nav_bearing , packet1.target_bearing , packet1.wp_dist , packet1.alt_error , packet1.aspd_error , packet1.xtrack_error );
2120  mavlink_msg_nav_controller_output_decode(last_msg, &packet2);
2121  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2122 }
2123 
2124 static void mavlink_test_global_position_int_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2125 {
2126  mavlink_message_t msg;
2127  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2128  uint16_t i;
2129  mavlink_global_position_int_cov_t packet_in = {
2130  93372036854775807ULL,963497880,963498088,963498296,963498504,963498712,213.0,241.0,269.0,{ 297.0, 298.0, 299.0, 300.0, 301.0, 302.0, 303.0, 304.0, 305.0, 306.0, 307.0, 308.0, 309.0, 310.0, 311.0, 312.0, 313.0, 314.0, 315.0, 316.0, 317.0, 318.0, 319.0, 320.0, 321.0, 322.0, 323.0, 324.0, 325.0, 326.0, 327.0, 328.0, 329.0, 330.0, 331.0, 332.0 },45
2131  };
2132  mavlink_global_position_int_cov_t packet1, packet2;
2133  memset(&packet1, 0, sizeof(packet1));
2134  packet1.time_utc = packet_in.time_utc;
2135  packet1.time_boot_ms = packet_in.time_boot_ms;
2136  packet1.lat = packet_in.lat;
2137  packet1.lon = packet_in.lon;
2138  packet1.alt = packet_in.alt;
2139  packet1.relative_alt = packet_in.relative_alt;
2140  packet1.vx = packet_in.vx;
2141  packet1.vy = packet_in.vy;
2142  packet1.vz = packet_in.vz;
2143  packet1.estimator_type = packet_in.estimator_type;
2144 
2145  mav_array_memcpy(packet1.covariance, packet_in.covariance, sizeof(float)*36);
2146 
2147 
2148  memset(&packet2, 0, sizeof(packet2));
2149  mavlink_msg_global_position_int_cov_encode(system_id, component_id, &msg, &packet1);
2151  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2152 
2153  memset(&packet2, 0, sizeof(packet2));
2154  mavlink_msg_global_position_int_cov_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.covariance );
2156  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2157 
2158  memset(&packet2, 0, sizeof(packet2));
2159  mavlink_msg_global_position_int_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.covariance );
2161  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2162 
2163  memset(&packet2, 0, sizeof(packet2));
2164  mavlink_msg_to_send_buffer(buffer, &msg);
2165  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2166  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2167  }
2168  mavlink_msg_global_position_int_cov_decode(last_msg, &packet2);
2169  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2170 
2171  memset(&packet2, 0, sizeof(packet2));
2172  mavlink_msg_global_position_int_cov_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.covariance );
2173  mavlink_msg_global_position_int_cov_decode(last_msg, &packet2);
2174  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2175 }
2176 
2177 static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2178 {
2179  mavlink_message_t msg;
2180  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2181  uint16_t i;
2182  mavlink_local_position_ned_cov_t packet_in = {
2183  93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,{ 353.0, 354.0, 355.0, 356.0, 357.0, 358.0, 359.0, 360.0, 361.0, 362.0, 363.0, 364.0, 365.0, 366.0, 367.0, 368.0, 369.0, 370.0, 371.0, 372.0, 373.0, 374.0, 375.0, 376.0, 377.0, 378.0, 379.0, 380.0, 381.0, 382.0, 383.0, 384.0, 385.0, 386.0, 387.0, 388.0, 389.0, 390.0, 391.0, 392.0, 393.0, 394.0, 395.0, 396.0, 397.0 },177
2184  };
2185  mavlink_local_position_ned_cov_t packet1, packet2;
2186  memset(&packet1, 0, sizeof(packet1));
2187  packet1.time_utc = packet_in.time_utc;
2188  packet1.time_boot_ms = packet_in.time_boot_ms;
2189  packet1.x = packet_in.x;
2190  packet1.y = packet_in.y;
2191  packet1.z = packet_in.z;
2192  packet1.vx = packet_in.vx;
2193  packet1.vy = packet_in.vy;
2194  packet1.vz = packet_in.vz;
2195  packet1.ax = packet_in.ax;
2196  packet1.ay = packet_in.ay;
2197  packet1.az = packet_in.az;
2198  packet1.estimator_type = packet_in.estimator_type;
2199 
2200  mav_array_memcpy(packet1.covariance, packet_in.covariance, sizeof(float)*45);
2201 
2202 
2203  memset(&packet2, 0, sizeof(packet2));
2204  mavlink_msg_local_position_ned_cov_encode(system_id, component_id, &msg, &packet1);
2206  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2207 
2208  memset(&packet2, 0, sizeof(packet2));
2209  mavlink_msg_local_position_ned_cov_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance );
2211  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2212 
2213  memset(&packet2, 0, sizeof(packet2));
2214  mavlink_msg_local_position_ned_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance );
2216  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2217 
2218  memset(&packet2, 0, sizeof(packet2));
2219  mavlink_msg_to_send_buffer(buffer, &msg);
2220  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2221  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2222  }
2223  mavlink_msg_local_position_ned_cov_decode(last_msg, &packet2);
2224  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2225 
2226  memset(&packet2, 0, sizeof(packet2));
2227  mavlink_msg_local_position_ned_cov_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.time_utc , packet1.estimator_type , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.ax , packet1.ay , packet1.az , packet1.covariance );
2228  mavlink_msg_local_position_ned_cov_decode(last_msg, &packet2);
2229  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2230 }
2231 
2232 static void mavlink_test_rc_channels(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2233 {
2234  mavlink_message_t msg;
2235  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2236  uint16_t i;
2237  mavlink_rc_channels_t packet_in = {
2238  963497464,17443,17547,17651,17755,17859,17963,18067,18171,18275,18379,18483,18587,18691,18795,18899,19003,19107,19211,125,192
2239  };
2240  mavlink_rc_channels_t packet1, packet2;
2241  memset(&packet1, 0, sizeof(packet1));
2242  packet1.time_boot_ms = packet_in.time_boot_ms;
2243  packet1.chan1_raw = packet_in.chan1_raw;
2244  packet1.chan2_raw = packet_in.chan2_raw;
2245  packet1.chan3_raw = packet_in.chan3_raw;
2246  packet1.chan4_raw = packet_in.chan4_raw;
2247  packet1.chan5_raw = packet_in.chan5_raw;
2248  packet1.chan6_raw = packet_in.chan6_raw;
2249  packet1.chan7_raw = packet_in.chan7_raw;
2250  packet1.chan8_raw = packet_in.chan8_raw;
2251  packet1.chan9_raw = packet_in.chan9_raw;
2252  packet1.chan10_raw = packet_in.chan10_raw;
2253  packet1.chan11_raw = packet_in.chan11_raw;
2254  packet1.chan12_raw = packet_in.chan12_raw;
2255  packet1.chan13_raw = packet_in.chan13_raw;
2256  packet1.chan14_raw = packet_in.chan14_raw;
2257  packet1.chan15_raw = packet_in.chan15_raw;
2258  packet1.chan16_raw = packet_in.chan16_raw;
2259  packet1.chan17_raw = packet_in.chan17_raw;
2260  packet1.chan18_raw = packet_in.chan18_raw;
2261  packet1.chancount = packet_in.chancount;
2262  packet1.rssi = packet_in.rssi;
2263 
2264 
2265 
2266  memset(&packet2, 0, sizeof(packet2));
2267  mavlink_msg_rc_channels_encode(system_id, component_id, &msg, &packet1);
2268  mavlink_msg_rc_channels_decode(&msg, &packet2);
2269  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2270 
2271  memset(&packet2, 0, sizeof(packet2));
2272  mavlink_msg_rc_channels_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.chancount , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.chan13_raw , packet1.chan14_raw , packet1.chan15_raw , packet1.chan16_raw , packet1.chan17_raw , packet1.chan18_raw , packet1.rssi );
2273  mavlink_msg_rc_channels_decode(&msg, &packet2);
2274  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2275 
2276  memset(&packet2, 0, sizeof(packet2));
2277  mavlink_msg_rc_channels_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.chancount , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.chan13_raw , packet1.chan14_raw , packet1.chan15_raw , packet1.chan16_raw , packet1.chan17_raw , packet1.chan18_raw , packet1.rssi );
2278  mavlink_msg_rc_channels_decode(&msg, &packet2);
2279  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2280 
2281  memset(&packet2, 0, sizeof(packet2));
2282  mavlink_msg_to_send_buffer(buffer, &msg);
2283  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2284  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2285  }
2286  mavlink_msg_rc_channels_decode(last_msg, &packet2);
2287  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2288 
2289  memset(&packet2, 0, sizeof(packet2));
2290  mavlink_msg_rc_channels_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.chancount , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.chan13_raw , packet1.chan14_raw , packet1.chan15_raw , packet1.chan16_raw , packet1.chan17_raw , packet1.chan18_raw , packet1.rssi );
2291  mavlink_msg_rc_channels_decode(last_msg, &packet2);
2292  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2293 }
2294 
2295 static void mavlink_test_request_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2296 {
2297  mavlink_message_t msg;
2298  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2299  uint16_t i;
2300  mavlink_request_data_stream_t packet_in = {
2301  17235,139,206,17,84
2302  };
2303  mavlink_request_data_stream_t packet1, packet2;
2304  memset(&packet1, 0, sizeof(packet1));
2305  packet1.req_message_rate = packet_in.req_message_rate;
2306  packet1.target_system = packet_in.target_system;
2307  packet1.target_component = packet_in.target_component;
2308  packet1.req_stream_id = packet_in.req_stream_id;
2309  packet1.start_stop = packet_in.start_stop;
2310 
2311 
2312 
2313  memset(&packet2, 0, sizeof(packet2));
2314  mavlink_msg_request_data_stream_encode(system_id, component_id, &msg, &packet1);
2316  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2317 
2318  memset(&packet2, 0, sizeof(packet2));
2319  mavlink_msg_request_data_stream_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
2321  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2322 
2323  memset(&packet2, 0, sizeof(packet2));
2324  mavlink_msg_request_data_stream_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
2326  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2327 
2328  memset(&packet2, 0, sizeof(packet2));
2329  mavlink_msg_to_send_buffer(buffer, &msg);
2330  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2331  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2332  }
2333  mavlink_msg_request_data_stream_decode(last_msg, &packet2);
2334  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2335 
2336  memset(&packet2, 0, sizeof(packet2));
2337  mavlink_msg_request_data_stream_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.req_stream_id , packet1.req_message_rate , packet1.start_stop );
2338  mavlink_msg_request_data_stream_decode(last_msg, &packet2);
2339  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2340 }
2341 
2342 static void mavlink_test_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2343 {
2344  mavlink_message_t msg;
2345  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2346  uint16_t i;
2347  mavlink_data_stream_t packet_in = {
2348  17235,139,206
2349  };
2350  mavlink_data_stream_t packet1, packet2;
2351  memset(&packet1, 0, sizeof(packet1));
2352  packet1.message_rate = packet_in.message_rate;
2353  packet1.stream_id = packet_in.stream_id;
2354  packet1.on_off = packet_in.on_off;
2355 
2356 
2357 
2358  memset(&packet2, 0, sizeof(packet2));
2359  mavlink_msg_data_stream_encode(system_id, component_id, &msg, &packet1);
2360  mavlink_msg_data_stream_decode(&msg, &packet2);
2361  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2362 
2363  memset(&packet2, 0, sizeof(packet2));
2364  mavlink_msg_data_stream_pack(system_id, component_id, &msg , packet1.stream_id , packet1.message_rate , packet1.on_off );
2365  mavlink_msg_data_stream_decode(&msg, &packet2);
2366  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2367 
2368  memset(&packet2, 0, sizeof(packet2));
2369  mavlink_msg_data_stream_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.stream_id , packet1.message_rate , packet1.on_off );
2370  mavlink_msg_data_stream_decode(&msg, &packet2);
2371  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2372 
2373  memset(&packet2, 0, sizeof(packet2));
2374  mavlink_msg_to_send_buffer(buffer, &msg);
2375  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2376  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2377  }
2378  mavlink_msg_data_stream_decode(last_msg, &packet2);
2379  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2380 
2381  memset(&packet2, 0, sizeof(packet2));
2382  mavlink_msg_data_stream_send(MAVLINK_COMM_1 , packet1.stream_id , packet1.message_rate , packet1.on_off );
2383  mavlink_msg_data_stream_decode(last_msg, &packet2);
2384  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2385 }
2386 
2387 static void mavlink_test_manual_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2388 {
2389  mavlink_message_t msg;
2390  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2391  uint16_t i;
2392  mavlink_manual_control_t packet_in = {
2393  17235,17339,17443,17547,17651,163
2394  };
2395  mavlink_manual_control_t packet1, packet2;
2396  memset(&packet1, 0, sizeof(packet1));
2397  packet1.x = packet_in.x;
2398  packet1.y = packet_in.y;
2399  packet1.z = packet_in.z;
2400  packet1.r = packet_in.r;
2401  packet1.buttons = packet_in.buttons;
2402  packet1.target = packet_in.target;
2403 
2404 
2405 
2406  memset(&packet2, 0, sizeof(packet2));
2407  mavlink_msg_manual_control_encode(system_id, component_id, &msg, &packet1);
2408  mavlink_msg_manual_control_decode(&msg, &packet2);
2409  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2410 
2411  memset(&packet2, 0, sizeof(packet2));
2412  mavlink_msg_manual_control_pack(system_id, component_id, &msg , packet1.target , packet1.x , packet1.y , packet1.z , packet1.r , packet1.buttons );
2413  mavlink_msg_manual_control_decode(&msg, &packet2);
2414  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2415 
2416  memset(&packet2, 0, sizeof(packet2));
2417  mavlink_msg_manual_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target , packet1.x , packet1.y , packet1.z , packet1.r , packet1.buttons );
2418  mavlink_msg_manual_control_decode(&msg, &packet2);
2419  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2420 
2421  memset(&packet2, 0, sizeof(packet2));
2422  mavlink_msg_to_send_buffer(buffer, &msg);
2423  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2424  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2425  }
2426  mavlink_msg_manual_control_decode(last_msg, &packet2);
2427  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2428 
2429  memset(&packet2, 0, sizeof(packet2));
2430  mavlink_msg_manual_control_send(MAVLINK_COMM_1 , packet1.target , packet1.x , packet1.y , packet1.z , packet1.r , packet1.buttons );
2431  mavlink_msg_manual_control_decode(last_msg, &packet2);
2432  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2433 }
2434 
2435 static void mavlink_test_rc_channels_override(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2436 {
2437  mavlink_message_t msg;
2438  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2439  uint16_t i;
2440  mavlink_rc_channels_override_t packet_in = {
2441  17235,17339,17443,17547,17651,17755,17859,17963,53,120
2442  };
2443  mavlink_rc_channels_override_t packet1, packet2;
2444  memset(&packet1, 0, sizeof(packet1));
2445  packet1.chan1_raw = packet_in.chan1_raw;
2446  packet1.chan2_raw = packet_in.chan2_raw;
2447  packet1.chan3_raw = packet_in.chan3_raw;
2448  packet1.chan4_raw = packet_in.chan4_raw;
2449  packet1.chan5_raw = packet_in.chan5_raw;
2450  packet1.chan6_raw = packet_in.chan6_raw;
2451  packet1.chan7_raw = packet_in.chan7_raw;
2452  packet1.chan8_raw = packet_in.chan8_raw;
2453  packet1.target_system = packet_in.target_system;
2454  packet1.target_component = packet_in.target_component;
2455 
2456 
2457 
2458  memset(&packet2, 0, sizeof(packet2));
2459  mavlink_msg_rc_channels_override_encode(system_id, component_id, &msg, &packet1);
2461  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2462 
2463  memset(&packet2, 0, sizeof(packet2));
2464  mavlink_msg_rc_channels_override_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
2466  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2467 
2468  memset(&packet2, 0, sizeof(packet2));
2469  mavlink_msg_rc_channels_override_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
2471  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2472 
2473  memset(&packet2, 0, sizeof(packet2));
2474  mavlink_msg_to_send_buffer(buffer, &msg);
2475  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2476  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2477  }
2478  mavlink_msg_rc_channels_override_decode(last_msg, &packet2);
2479  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2480 
2481  memset(&packet2, 0, sizeof(packet2));
2482  mavlink_msg_rc_channels_override_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw );
2483  mavlink_msg_rc_channels_override_decode(last_msg, &packet2);
2484  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2485 }
2486 
2487 static void mavlink_test_mission_item_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2488 {
2489  mavlink_message_t msg;
2490  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2491  uint16_t i;
2492  mavlink_mission_item_int_t packet_in = {
2493  17.0,45.0,73.0,101.0,963498296,963498504,185.0,18691,18795,101,168,235,46,113
2494  };
2495  mavlink_mission_item_int_t packet1, packet2;
2496  memset(&packet1, 0, sizeof(packet1));
2497  packet1.param1 = packet_in.param1;
2498  packet1.param2 = packet_in.param2;
2499  packet1.param3 = packet_in.param3;
2500  packet1.param4 = packet_in.param4;
2501  packet1.x = packet_in.x;
2502  packet1.y = packet_in.y;
2503  packet1.z = packet_in.z;
2504  packet1.seq = packet_in.seq;
2505  packet1.command = packet_in.command;
2506  packet1.target_system = packet_in.target_system;
2507  packet1.target_component = packet_in.target_component;
2508  packet1.frame = packet_in.frame;
2509  packet1.current = packet_in.current;
2510  packet1.autocontinue = packet_in.autocontinue;
2511 
2512 
2513 
2514  memset(&packet2, 0, sizeof(packet2));
2515  mavlink_msg_mission_item_int_encode(system_id, component_id, &msg, &packet1);
2516  mavlink_msg_mission_item_int_decode(&msg, &packet2);
2517  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2518 
2519  memset(&packet2, 0, sizeof(packet2));
2520  mavlink_msg_mission_item_int_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2521  mavlink_msg_mission_item_int_decode(&msg, &packet2);
2522  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2523 
2524  memset(&packet2, 0, sizeof(packet2));
2525  mavlink_msg_mission_item_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2526  mavlink_msg_mission_item_int_decode(&msg, &packet2);
2527  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2528 
2529  memset(&packet2, 0, sizeof(packet2));
2530  mavlink_msg_to_send_buffer(buffer, &msg);
2531  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2532  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2533  }
2534  mavlink_msg_mission_item_int_decode(last_msg, &packet2);
2535  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2536 
2537  memset(&packet2, 0, sizeof(packet2));
2538  mavlink_msg_mission_item_int_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.seq , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2539  mavlink_msg_mission_item_int_decode(last_msg, &packet2);
2540  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2541 }
2542 
2543 static void mavlink_test_vfr_hud(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2544 {
2545  mavlink_message_t msg;
2546  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2547  uint16_t i;
2548  mavlink_vfr_hud_t packet_in = {
2549  17.0,45.0,73.0,101.0,18067,18171
2550  };
2551  mavlink_vfr_hud_t packet1, packet2;
2552  memset(&packet1, 0, sizeof(packet1));
2553  packet1.airspeed = packet_in.airspeed;
2554  packet1.groundspeed = packet_in.groundspeed;
2555  packet1.alt = packet_in.alt;
2556  packet1.climb = packet_in.climb;
2557  packet1.heading = packet_in.heading;
2558  packet1.throttle = packet_in.throttle;
2559 
2560 
2561 
2562  memset(&packet2, 0, sizeof(packet2));
2563  mavlink_msg_vfr_hud_encode(system_id, component_id, &msg, &packet1);
2564  mavlink_msg_vfr_hud_decode(&msg, &packet2);
2565  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2566 
2567  memset(&packet2, 0, sizeof(packet2));
2568  mavlink_msg_vfr_hud_pack(system_id, component_id, &msg , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
2569  mavlink_msg_vfr_hud_decode(&msg, &packet2);
2570  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2571 
2572  memset(&packet2, 0, sizeof(packet2));
2573  mavlink_msg_vfr_hud_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
2574  mavlink_msg_vfr_hud_decode(&msg, &packet2);
2575  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2576 
2577  memset(&packet2, 0, sizeof(packet2));
2578  mavlink_msg_to_send_buffer(buffer, &msg);
2579  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2580  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2581  }
2582  mavlink_msg_vfr_hud_decode(last_msg, &packet2);
2583  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2584 
2585  memset(&packet2, 0, sizeof(packet2));
2586  mavlink_msg_vfr_hud_send(MAVLINK_COMM_1 , packet1.airspeed , packet1.groundspeed , packet1.heading , packet1.throttle , packet1.alt , packet1.climb );
2587  mavlink_msg_vfr_hud_decode(last_msg, &packet2);
2588  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2589 }
2590 
2591 static void mavlink_test_command_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2592 {
2593  mavlink_message_t msg;
2594  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2595  uint16_t i;
2596  mavlink_command_int_t packet_in = {
2597  17.0,45.0,73.0,101.0,963498296,963498504,185.0,18691,223,34,101,168,235
2598  };
2599  mavlink_command_int_t packet1, packet2;
2600  memset(&packet1, 0, sizeof(packet1));
2601  packet1.param1 = packet_in.param1;
2602  packet1.param2 = packet_in.param2;
2603  packet1.param3 = packet_in.param3;
2604  packet1.param4 = packet_in.param4;
2605  packet1.x = packet_in.x;
2606  packet1.y = packet_in.y;
2607  packet1.z = packet_in.z;
2608  packet1.command = packet_in.command;
2609  packet1.target_system = packet_in.target_system;
2610  packet1.target_component = packet_in.target_component;
2611  packet1.frame = packet_in.frame;
2612  packet1.current = packet_in.current;
2613  packet1.autocontinue = packet_in.autocontinue;
2614 
2615 
2616 
2617  memset(&packet2, 0, sizeof(packet2));
2618  mavlink_msg_command_int_encode(system_id, component_id, &msg, &packet1);
2619  mavlink_msg_command_int_decode(&msg, &packet2);
2620  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2621 
2622  memset(&packet2, 0, sizeof(packet2));
2623  mavlink_msg_command_int_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2624  mavlink_msg_command_int_decode(&msg, &packet2);
2625  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2626 
2627  memset(&packet2, 0, sizeof(packet2));
2628  mavlink_msg_command_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2629  mavlink_msg_command_int_decode(&msg, &packet2);
2630  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2631 
2632  memset(&packet2, 0, sizeof(packet2));
2633  mavlink_msg_to_send_buffer(buffer, &msg);
2634  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2635  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2636  }
2637  mavlink_msg_command_int_decode(last_msg, &packet2);
2638  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2639 
2640  memset(&packet2, 0, sizeof(packet2));
2641  mavlink_msg_command_int_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.frame , packet1.command , packet1.current , packet1.autocontinue , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.x , packet1.y , packet1.z );
2642  mavlink_msg_command_int_decode(last_msg, &packet2);
2643  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2644 }
2645 
2646 static void mavlink_test_command_long(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2647 {
2648  mavlink_message_t msg;
2649  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2650  uint16_t i;
2651  mavlink_command_long_t packet_in = {
2652  17.0,45.0,73.0,101.0,129.0,157.0,185.0,18691,223,34,101
2653  };
2654  mavlink_command_long_t packet1, packet2;
2655  memset(&packet1, 0, sizeof(packet1));
2656  packet1.param1 = packet_in.param1;
2657  packet1.param2 = packet_in.param2;
2658  packet1.param3 = packet_in.param3;
2659  packet1.param4 = packet_in.param4;
2660  packet1.param5 = packet_in.param5;
2661  packet1.param6 = packet_in.param6;
2662  packet1.param7 = packet_in.param7;
2663  packet1.command = packet_in.command;
2664  packet1.target_system = packet_in.target_system;
2665  packet1.target_component = packet_in.target_component;
2666  packet1.confirmation = packet_in.confirmation;
2667 
2668 
2669 
2670  memset(&packet2, 0, sizeof(packet2));
2671  mavlink_msg_command_long_encode(system_id, component_id, &msg, &packet1);
2672  mavlink_msg_command_long_decode(&msg, &packet2);
2673  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2674 
2675  memset(&packet2, 0, sizeof(packet2));
2676  mavlink_msg_command_long_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
2677  mavlink_msg_command_long_decode(&msg, &packet2);
2678  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2679 
2680  memset(&packet2, 0, sizeof(packet2));
2681  mavlink_msg_command_long_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
2682  mavlink_msg_command_long_decode(&msg, &packet2);
2683  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2684 
2685  memset(&packet2, 0, sizeof(packet2));
2686  mavlink_msg_to_send_buffer(buffer, &msg);
2687  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2688  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2689  }
2690  mavlink_msg_command_long_decode(last_msg, &packet2);
2691  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2692 
2693  memset(&packet2, 0, sizeof(packet2));
2694  mavlink_msg_command_long_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.command , packet1.confirmation , packet1.param1 , packet1.param2 , packet1.param3 , packet1.param4 , packet1.param5 , packet1.param6 , packet1.param7 );
2695  mavlink_msg_command_long_decode(last_msg, &packet2);
2696  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2697 }
2698 
2699 static void mavlink_test_command_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2700 {
2701  mavlink_message_t msg;
2702  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2703  uint16_t i;
2704  mavlink_command_ack_t packet_in = {
2705  17235,139
2706  };
2707  mavlink_command_ack_t packet1, packet2;
2708  memset(&packet1, 0, sizeof(packet1));
2709  packet1.command = packet_in.command;
2710  packet1.result = packet_in.result;
2711 
2712 
2713 
2714  memset(&packet2, 0, sizeof(packet2));
2715  mavlink_msg_command_ack_encode(system_id, component_id, &msg, &packet1);
2716  mavlink_msg_command_ack_decode(&msg, &packet2);
2717  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2718 
2719  memset(&packet2, 0, sizeof(packet2));
2720  mavlink_msg_command_ack_pack(system_id, component_id, &msg , packet1.command , packet1.result );
2721  mavlink_msg_command_ack_decode(&msg, &packet2);
2722  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2723 
2724  memset(&packet2, 0, sizeof(packet2));
2725  mavlink_msg_command_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.command , packet1.result );
2726  mavlink_msg_command_ack_decode(&msg, &packet2);
2727  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2728 
2729  memset(&packet2, 0, sizeof(packet2));
2730  mavlink_msg_to_send_buffer(buffer, &msg);
2731  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2732  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2733  }
2734  mavlink_msg_command_ack_decode(last_msg, &packet2);
2735  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2736 
2737  memset(&packet2, 0, sizeof(packet2));
2738  mavlink_msg_command_ack_send(MAVLINK_COMM_1 , packet1.command , packet1.result );
2739  mavlink_msg_command_ack_decode(last_msg, &packet2);
2740  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2741 }
2742 
2743 static void mavlink_test_manual_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2744 {
2745  mavlink_message_t msg;
2746  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2747  uint16_t i;
2748  mavlink_manual_setpoint_t packet_in = {
2749  963497464,45.0,73.0,101.0,129.0,65,132
2750  };
2751  mavlink_manual_setpoint_t packet1, packet2;
2752  memset(&packet1, 0, sizeof(packet1));
2753  packet1.time_boot_ms = packet_in.time_boot_ms;
2754  packet1.roll = packet_in.roll;
2755  packet1.pitch = packet_in.pitch;
2756  packet1.yaw = packet_in.yaw;
2757  packet1.thrust = packet_in.thrust;
2758  packet1.mode_switch = packet_in.mode_switch;
2759  packet1.manual_override_switch = packet_in.manual_override_switch;
2760 
2761 
2762 
2763  memset(&packet2, 0, sizeof(packet2));
2764  mavlink_msg_manual_setpoint_encode(system_id, component_id, &msg, &packet1);
2765  mavlink_msg_manual_setpoint_decode(&msg, &packet2);
2766  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2767 
2768  memset(&packet2, 0, sizeof(packet2));
2769  mavlink_msg_manual_setpoint_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.mode_switch , packet1.manual_override_switch );
2770  mavlink_msg_manual_setpoint_decode(&msg, &packet2);
2771  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2772 
2773  memset(&packet2, 0, sizeof(packet2));
2774  mavlink_msg_manual_setpoint_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.mode_switch , packet1.manual_override_switch );
2775  mavlink_msg_manual_setpoint_decode(&msg, &packet2);
2776  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2777 
2778  memset(&packet2, 0, sizeof(packet2));
2779  mavlink_msg_to_send_buffer(buffer, &msg);
2780  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2781  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2782  }
2783  mavlink_msg_manual_setpoint_decode(last_msg, &packet2);
2784  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2785 
2786  memset(&packet2, 0, sizeof(packet2));
2787  mavlink_msg_manual_setpoint_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.roll , packet1.pitch , packet1.yaw , packet1.thrust , packet1.mode_switch , packet1.manual_override_switch );
2788  mavlink_msg_manual_setpoint_decode(last_msg, &packet2);
2789  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2790 }
2791 
2792 static void mavlink_test_set_attitude_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2793 {
2794  mavlink_message_t msg;
2795  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2796  uint16_t i;
2797  mavlink_set_attitude_target_t packet_in = {
2798  963497464,{ 45.0, 46.0, 47.0, 48.0 },157.0,185.0,213.0,241.0,113,180,247
2799  };
2800  mavlink_set_attitude_target_t packet1, packet2;
2801  memset(&packet1, 0, sizeof(packet1));
2802  packet1.time_boot_ms = packet_in.time_boot_ms;
2803  packet1.body_roll_rate = packet_in.body_roll_rate;
2804  packet1.body_pitch_rate = packet_in.body_pitch_rate;
2805  packet1.body_yaw_rate = packet_in.body_yaw_rate;
2806  packet1.thrust = packet_in.thrust;
2807  packet1.target_system = packet_in.target_system;
2808  packet1.target_component = packet_in.target_component;
2809  packet1.type_mask = packet_in.type_mask;
2810 
2811  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
2812 
2813 
2814  memset(&packet2, 0, sizeof(packet2));
2815  mavlink_msg_set_attitude_target_encode(system_id, component_id, &msg, &packet1);
2817  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2818 
2819  memset(&packet2, 0, sizeof(packet2));
2820  mavlink_msg_set_attitude_target_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2822  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2823 
2824  memset(&packet2, 0, sizeof(packet2));
2825  mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2827  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2828 
2829  memset(&packet2, 0, sizeof(packet2));
2830  mavlink_msg_to_send_buffer(buffer, &msg);
2831  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2832  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2833  }
2834  mavlink_msg_set_attitude_target_decode(last_msg, &packet2);
2835  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2836 
2837  memset(&packet2, 0, sizeof(packet2));
2838  mavlink_msg_set_attitude_target_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2839  mavlink_msg_set_attitude_target_decode(last_msg, &packet2);
2840  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2841 }
2842 
2843 static void mavlink_test_attitude_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2844 {
2845  mavlink_message_t msg;
2846  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2847  uint16_t i;
2848  mavlink_attitude_target_t packet_in = {
2849  963497464,{ 45.0, 46.0, 47.0, 48.0 },157.0,185.0,213.0,241.0,113
2850  };
2851  mavlink_attitude_target_t packet1, packet2;
2852  memset(&packet1, 0, sizeof(packet1));
2853  packet1.time_boot_ms = packet_in.time_boot_ms;
2854  packet1.body_roll_rate = packet_in.body_roll_rate;
2855  packet1.body_pitch_rate = packet_in.body_pitch_rate;
2856  packet1.body_yaw_rate = packet_in.body_yaw_rate;
2857  packet1.thrust = packet_in.thrust;
2858  packet1.type_mask = packet_in.type_mask;
2859 
2860  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
2861 
2862 
2863  memset(&packet2, 0, sizeof(packet2));
2864  mavlink_msg_attitude_target_encode(system_id, component_id, &msg, &packet1);
2865  mavlink_msg_attitude_target_decode(&msg, &packet2);
2866  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2867 
2868  memset(&packet2, 0, sizeof(packet2));
2869  mavlink_msg_attitude_target_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2870  mavlink_msg_attitude_target_decode(&msg, &packet2);
2871  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2872 
2873  memset(&packet2, 0, sizeof(packet2));
2874  mavlink_msg_attitude_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2875  mavlink_msg_attitude_target_decode(&msg, &packet2);
2876  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2877 
2878  memset(&packet2, 0, sizeof(packet2));
2879  mavlink_msg_to_send_buffer(buffer, &msg);
2880  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2881  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2882  }
2883  mavlink_msg_attitude_target_decode(last_msg, &packet2);
2884  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2885 
2886  memset(&packet2, 0, sizeof(packet2));
2887  mavlink_msg_attitude_target_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust );
2888  mavlink_msg_attitude_target_decode(last_msg, &packet2);
2889  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2890 }
2891 
2892 static void mavlink_test_set_position_target_local_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2893 {
2894  mavlink_message_t msg;
2895  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2896  uint16_t i;
2898  963497464,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,19731,27,94,161
2899  };
2900  mavlink_set_position_target_local_ned_t packet1, packet2;
2901  memset(&packet1, 0, sizeof(packet1));
2902  packet1.time_boot_ms = packet_in.time_boot_ms;
2903  packet1.x = packet_in.x;
2904  packet1.y = packet_in.y;
2905  packet1.z = packet_in.z;
2906  packet1.vx = packet_in.vx;
2907  packet1.vy = packet_in.vy;
2908  packet1.vz = packet_in.vz;
2909  packet1.afx = packet_in.afx;
2910  packet1.afy = packet_in.afy;
2911  packet1.afz = packet_in.afz;
2912  packet1.yaw = packet_in.yaw;
2913  packet1.yaw_rate = packet_in.yaw_rate;
2914  packet1.type_mask = packet_in.type_mask;
2915  packet1.target_system = packet_in.target_system;
2916  packet1.target_component = packet_in.target_component;
2917  packet1.coordinate_frame = packet_in.coordinate_frame;
2918 
2919 
2920 
2921  memset(&packet2, 0, sizeof(packet2));
2922  mavlink_msg_set_position_target_local_ned_encode(system_id, component_id, &msg, &packet1);
2924  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2925 
2926  memset(&packet2, 0, sizeof(packet2));
2927  mavlink_msg_set_position_target_local_ned_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
2929  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2930 
2931  memset(&packet2, 0, sizeof(packet2));
2932  mavlink_msg_set_position_target_local_ned_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
2934  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2935 
2936  memset(&packet2, 0, sizeof(packet2));
2937  mavlink_msg_to_send_buffer(buffer, &msg);
2938  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2939  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2940  }
2942  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2943 
2944  memset(&packet2, 0, sizeof(packet2));
2945  mavlink_msg_set_position_target_local_ned_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
2947  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2948 }
2949 
2950 static void mavlink_test_position_target_local_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
2951 {
2952  mavlink_message_t msg;
2953  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
2954  uint16_t i;
2956  963497464,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,19731,27
2957  };
2958  mavlink_position_target_local_ned_t packet1, packet2;
2959  memset(&packet1, 0, sizeof(packet1));
2960  packet1.time_boot_ms = packet_in.time_boot_ms;
2961  packet1.x = packet_in.x;
2962  packet1.y = packet_in.y;
2963  packet1.z = packet_in.z;
2964  packet1.vx = packet_in.vx;
2965  packet1.vy = packet_in.vy;
2966  packet1.vz = packet_in.vz;
2967  packet1.afx = packet_in.afx;
2968  packet1.afy = packet_in.afy;
2969  packet1.afz = packet_in.afz;
2970  packet1.yaw = packet_in.yaw;
2971  packet1.yaw_rate = packet_in.yaw_rate;
2972  packet1.type_mask = packet_in.type_mask;
2973  packet1.coordinate_frame = packet_in.coordinate_frame;
2974 
2975 
2976 
2977  memset(&packet2, 0, sizeof(packet2));
2978  mavlink_msg_position_target_local_ned_encode(system_id, component_id, &msg, &packet1);
2980  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2981 
2982  memset(&packet2, 0, sizeof(packet2));
2983  mavlink_msg_position_target_local_ned_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
2985  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2986 
2987  memset(&packet2, 0, sizeof(packet2));
2988  mavlink_msg_position_target_local_ned_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
2990  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2991 
2992  memset(&packet2, 0, sizeof(packet2));
2993  mavlink_msg_to_send_buffer(buffer, &msg);
2994  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
2995  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
2996  }
2998  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
2999 
3000  memset(&packet2, 0, sizeof(packet2));
3001  mavlink_msg_position_target_local_ned_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.x , packet1.y , packet1.z , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3003  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3004 }
3005 
3006 static void mavlink_test_set_position_target_global_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3007 {
3008  mavlink_message_t msg;
3009  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3010  uint16_t i;
3012  963497464,963497672,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,19731,27,94,161
3013  };
3015  memset(&packet1, 0, sizeof(packet1));
3016  packet1.time_boot_ms = packet_in.time_boot_ms;
3017  packet1.lat_int = packet_in.lat_int;
3018  packet1.lon_int = packet_in.lon_int;
3019  packet1.alt = packet_in.alt;
3020  packet1.vx = packet_in.vx;
3021  packet1.vy = packet_in.vy;
3022  packet1.vz = packet_in.vz;
3023  packet1.afx = packet_in.afx;
3024  packet1.afy = packet_in.afy;
3025  packet1.afz = packet_in.afz;
3026  packet1.yaw = packet_in.yaw;
3027  packet1.yaw_rate = packet_in.yaw_rate;
3028  packet1.type_mask = packet_in.type_mask;
3029  packet1.target_system = packet_in.target_system;
3030  packet1.target_component = packet_in.target_component;
3031  packet1.coordinate_frame = packet_in.coordinate_frame;
3032 
3033 
3034 
3035  memset(&packet2, 0, sizeof(packet2));
3036  mavlink_msg_set_position_target_global_int_encode(system_id, component_id, &msg, &packet1);
3038  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3039 
3040  memset(&packet2, 0, sizeof(packet2));
3041  mavlink_msg_set_position_target_global_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3043  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3044 
3045  memset(&packet2, 0, sizeof(packet2));
3046  mavlink_msg_set_position_target_global_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3048  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3049 
3050  memset(&packet2, 0, sizeof(packet2));
3051  mavlink_msg_to_send_buffer(buffer, &msg);
3052  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3053  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3054  }
3056  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3057 
3058  memset(&packet2, 0, sizeof(packet2));
3059  mavlink_msg_set_position_target_global_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3061  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3062 }
3063 
3064 static void mavlink_test_position_target_global_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3065 {
3066  mavlink_message_t msg;
3067  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3068  uint16_t i;
3070  963497464,963497672,963497880,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,19731,27
3071  };
3072  mavlink_position_target_global_int_t packet1, packet2;
3073  memset(&packet1, 0, sizeof(packet1));
3074  packet1.time_boot_ms = packet_in.time_boot_ms;
3075  packet1.lat_int = packet_in.lat_int;
3076  packet1.lon_int = packet_in.lon_int;
3077  packet1.alt = packet_in.alt;
3078  packet1.vx = packet_in.vx;
3079  packet1.vy = packet_in.vy;
3080  packet1.vz = packet_in.vz;
3081  packet1.afx = packet_in.afx;
3082  packet1.afy = packet_in.afy;
3083  packet1.afz = packet_in.afz;
3084  packet1.yaw = packet_in.yaw;
3085  packet1.yaw_rate = packet_in.yaw_rate;
3086  packet1.type_mask = packet_in.type_mask;
3087  packet1.coordinate_frame = packet_in.coordinate_frame;
3088 
3089 
3090 
3091  memset(&packet2, 0, sizeof(packet2));
3092  mavlink_msg_position_target_global_int_encode(system_id, component_id, &msg, &packet1);
3094  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3095 
3096  memset(&packet2, 0, sizeof(packet2));
3097  mavlink_msg_position_target_global_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3099  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3100 
3101  memset(&packet2, 0, sizeof(packet2));
3102  mavlink_msg_position_target_global_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3104  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3105 
3106  memset(&packet2, 0, sizeof(packet2));
3107  mavlink_msg_to_send_buffer(buffer, &msg);
3108  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3109  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3110  }
3112  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3113 
3114  memset(&packet2, 0, sizeof(packet2));
3115  mavlink_msg_position_target_global_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.coordinate_frame , packet1.type_mask , packet1.lat_int , packet1.lon_int , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.afx , packet1.afy , packet1.afz , packet1.yaw , packet1.yaw_rate );
3117  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3118 }
3119 
3120 static void mavlink_test_local_position_ned_system_global_offset(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3121 {
3122  mavlink_message_t msg;
3123  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3124  uint16_t i;
3126  963497464,45.0,73.0,101.0,129.0,157.0,185.0
3127  };
3129  memset(&packet1, 0, sizeof(packet1));
3130  packet1.time_boot_ms = packet_in.time_boot_ms;
3131  packet1.x = packet_in.x;
3132  packet1.y = packet_in.y;
3133  packet1.z = packet_in.z;
3134  packet1.roll = packet_in.roll;
3135  packet1.pitch = packet_in.pitch;
3136  packet1.yaw = packet_in.yaw;
3137 
3138 
3139 
3140  memset(&packet2, 0, sizeof(packet2));
3141  mavlink_msg_local_position_ned_system_global_offset_encode(system_id, component_id, &msg, &packet1);
3143  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3144 
3145  memset(&packet2, 0, sizeof(packet2));
3146  mavlink_msg_local_position_ned_system_global_offset_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3148  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3149 
3150  memset(&packet2, 0, sizeof(packet2));
3151  mavlink_msg_local_position_ned_system_global_offset_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3153  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3154 
3155  memset(&packet2, 0, sizeof(packet2));
3156  mavlink_msg_to_send_buffer(buffer, &msg);
3157  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3158  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3159  }
3161  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3162 
3163  memset(&packet2, 0, sizeof(packet2));
3164  mavlink_msg_local_position_ned_system_global_offset_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3166  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3167 }
3168 
3169 static void mavlink_test_hil_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3170 {
3171  mavlink_message_t msg;
3172  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3173  uint16_t i;
3174  mavlink_hil_state_t packet_in = {
3175  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,963499128,963499336,963499544,19523,19627,19731,19835,19939,20043
3176  };
3177  mavlink_hil_state_t packet1, packet2;
3178  memset(&packet1, 0, sizeof(packet1));
3179  packet1.time_usec = packet_in.time_usec;
3180  packet1.roll = packet_in.roll;
3181  packet1.pitch = packet_in.pitch;
3182  packet1.yaw = packet_in.yaw;
3183  packet1.rollspeed = packet_in.rollspeed;
3184  packet1.pitchspeed = packet_in.pitchspeed;
3185  packet1.yawspeed = packet_in.yawspeed;
3186  packet1.lat = packet_in.lat;
3187  packet1.lon = packet_in.lon;
3188  packet1.alt = packet_in.alt;
3189  packet1.vx = packet_in.vx;
3190  packet1.vy = packet_in.vy;
3191  packet1.vz = packet_in.vz;
3192  packet1.xacc = packet_in.xacc;
3193  packet1.yacc = packet_in.yacc;
3194  packet1.zacc = packet_in.zacc;
3195 
3196 
3197 
3198  memset(&packet2, 0, sizeof(packet2));
3199  mavlink_msg_hil_state_encode(system_id, component_id, &msg, &packet1);
3200  mavlink_msg_hil_state_decode(&msg, &packet2);
3201  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3202 
3203  memset(&packet2, 0, sizeof(packet2));
3204  mavlink_msg_hil_state_pack(system_id, component_id, &msg , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
3205  mavlink_msg_hil_state_decode(&msg, &packet2);
3206  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3207 
3208  memset(&packet2, 0, sizeof(packet2));
3209  mavlink_msg_hil_state_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
3210  mavlink_msg_hil_state_decode(&msg, &packet2);
3211  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3212 
3213  memset(&packet2, 0, sizeof(packet2));
3214  mavlink_msg_to_send_buffer(buffer, &msg);
3215  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3216  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3217  }
3218  mavlink_msg_hil_state_decode(last_msg, &packet2);
3219  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3220 
3221  memset(&packet2, 0, sizeof(packet2));
3222  mavlink_msg_hil_state_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.roll , packet1.pitch , packet1.yaw , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.xacc , packet1.yacc , packet1.zacc );
3223  mavlink_msg_hil_state_decode(last_msg, &packet2);
3224  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3225 }
3226 
3227 static void mavlink_test_hil_controls(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3228 {
3229  mavlink_message_t msg;
3230  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3231  uint16_t i;
3232  mavlink_hil_controls_t packet_in = {
3233  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,125,192
3234  };
3235  mavlink_hil_controls_t packet1, packet2;
3236  memset(&packet1, 0, sizeof(packet1));
3237  packet1.time_usec = packet_in.time_usec;
3238  packet1.roll_ailerons = packet_in.roll_ailerons;
3239  packet1.pitch_elevator = packet_in.pitch_elevator;
3240  packet1.yaw_rudder = packet_in.yaw_rudder;
3241  packet1.throttle = packet_in.throttle;
3242  packet1.aux1 = packet_in.aux1;
3243  packet1.aux2 = packet_in.aux2;
3244  packet1.aux3 = packet_in.aux3;
3245  packet1.aux4 = packet_in.aux4;
3246  packet1.mode = packet_in.mode;
3247  packet1.nav_mode = packet_in.nav_mode;
3248 
3249 
3250 
3251  memset(&packet2, 0, sizeof(packet2));
3252  mavlink_msg_hil_controls_encode(system_id, component_id, &msg, &packet1);
3253  mavlink_msg_hil_controls_decode(&msg, &packet2);
3254  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3255 
3256  memset(&packet2, 0, sizeof(packet2));
3257  mavlink_msg_hil_controls_pack(system_id, component_id, &msg , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
3258  mavlink_msg_hil_controls_decode(&msg, &packet2);
3259  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3260 
3261  memset(&packet2, 0, sizeof(packet2));
3262  mavlink_msg_hil_controls_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
3263  mavlink_msg_hil_controls_decode(&msg, &packet2);
3264  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3265 
3266  memset(&packet2, 0, sizeof(packet2));
3267  mavlink_msg_to_send_buffer(buffer, &msg);
3268  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3269  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3270  }
3271  mavlink_msg_hil_controls_decode(last_msg, &packet2);
3272  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3273 
3274  memset(&packet2, 0, sizeof(packet2));
3275  mavlink_msg_hil_controls_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.roll_ailerons , packet1.pitch_elevator , packet1.yaw_rudder , packet1.throttle , packet1.aux1 , packet1.aux2 , packet1.aux3 , packet1.aux4 , packet1.mode , packet1.nav_mode );
3276  mavlink_msg_hil_controls_decode(last_msg, &packet2);
3277  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3278 }
3279 
3280 static void mavlink_test_hil_rc_inputs_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3281 {
3282  mavlink_message_t msg;
3283  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3284  uint16_t i;
3285  mavlink_hil_rc_inputs_raw_t packet_in = {
3286  93372036854775807ULL,17651,17755,17859,17963,18067,18171,18275,18379,18483,18587,18691,18795,101
3287  };
3288  mavlink_hil_rc_inputs_raw_t packet1, packet2;
3289  memset(&packet1, 0, sizeof(packet1));
3290  packet1.time_usec = packet_in.time_usec;
3291  packet1.chan1_raw = packet_in.chan1_raw;
3292  packet1.chan2_raw = packet_in.chan2_raw;
3293  packet1.chan3_raw = packet_in.chan3_raw;
3294  packet1.chan4_raw = packet_in.chan4_raw;
3295  packet1.chan5_raw = packet_in.chan5_raw;
3296  packet1.chan6_raw = packet_in.chan6_raw;
3297  packet1.chan7_raw = packet_in.chan7_raw;
3298  packet1.chan8_raw = packet_in.chan8_raw;
3299  packet1.chan9_raw = packet_in.chan9_raw;
3300  packet1.chan10_raw = packet_in.chan10_raw;
3301  packet1.chan11_raw = packet_in.chan11_raw;
3302  packet1.chan12_raw = packet_in.chan12_raw;
3303  packet1.rssi = packet_in.rssi;
3304 
3305 
3306 
3307  memset(&packet2, 0, sizeof(packet2));
3308  mavlink_msg_hil_rc_inputs_raw_encode(system_id, component_id, &msg, &packet1);
3309  mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
3310  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3311 
3312  memset(&packet2, 0, sizeof(packet2));
3313  mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, &msg , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
3314  mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
3315  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3316 
3317  memset(&packet2, 0, sizeof(packet2));
3318  mavlink_msg_hil_rc_inputs_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
3319  mavlink_msg_hil_rc_inputs_raw_decode(&msg, &packet2);
3320  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3321 
3322  memset(&packet2, 0, sizeof(packet2));
3323  mavlink_msg_to_send_buffer(buffer, &msg);
3324  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3325  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3326  }
3327  mavlink_msg_hil_rc_inputs_raw_decode(last_msg, &packet2);
3328  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3329 
3330  memset(&packet2, 0, sizeof(packet2));
3331  mavlink_msg_hil_rc_inputs_raw_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.chan1_raw , packet1.chan2_raw , packet1.chan3_raw , packet1.chan4_raw , packet1.chan5_raw , packet1.chan6_raw , packet1.chan7_raw , packet1.chan8_raw , packet1.chan9_raw , packet1.chan10_raw , packet1.chan11_raw , packet1.chan12_raw , packet1.rssi );
3332  mavlink_msg_hil_rc_inputs_raw_decode(last_msg, &packet2);
3333  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3334 }
3335 
3336 static void mavlink_test_optical_flow(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3337 {
3338  mavlink_message_t msg;
3339  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3340  uint16_t i;
3341  mavlink_optical_flow_t packet_in = {
3342  93372036854775807ULL,73.0,101.0,129.0,18275,18379,77,144
3343  };
3344  mavlink_optical_flow_t packet1, packet2;
3345  memset(&packet1, 0, sizeof(packet1));
3346  packet1.time_usec = packet_in.time_usec;
3347  packet1.flow_comp_m_x = packet_in.flow_comp_m_x;
3348  packet1.flow_comp_m_y = packet_in.flow_comp_m_y;
3349  packet1.ground_distance = packet_in.ground_distance;
3350  packet1.flow_x = packet_in.flow_x;
3351  packet1.flow_y = packet_in.flow_y;
3352  packet1.sensor_id = packet_in.sensor_id;
3353  packet1.quality = packet_in.quality;
3354 
3355 
3356 
3357  memset(&packet2, 0, sizeof(packet2));
3358  mavlink_msg_optical_flow_encode(system_id, component_id, &msg, &packet1);
3359  mavlink_msg_optical_flow_decode(&msg, &packet2);
3360  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3361 
3362  memset(&packet2, 0, sizeof(packet2));
3363  mavlink_msg_optical_flow_pack(system_id, component_id, &msg , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
3364  mavlink_msg_optical_flow_decode(&msg, &packet2);
3365  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3366 
3367  memset(&packet2, 0, sizeof(packet2));
3368  mavlink_msg_optical_flow_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
3369  mavlink_msg_optical_flow_decode(&msg, &packet2);
3370  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3371 
3372  memset(&packet2, 0, sizeof(packet2));
3373  mavlink_msg_to_send_buffer(buffer, &msg);
3374  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3375  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3376  }
3377  mavlink_msg_optical_flow_decode(last_msg, &packet2);
3378  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3379 
3380  memset(&packet2, 0, sizeof(packet2));
3381  mavlink_msg_optical_flow_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.sensor_id , packet1.flow_x , packet1.flow_y , packet1.flow_comp_m_x , packet1.flow_comp_m_y , packet1.quality , packet1.ground_distance );
3382  mavlink_msg_optical_flow_decode(last_msg, &packet2);
3383  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3384 }
3385 
3386 static void mavlink_test_global_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3387 {
3388  mavlink_message_t msg;
3389  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3390  uint16_t i;
3392  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0
3393  };
3395  memset(&packet1, 0, sizeof(packet1));
3396  packet1.usec = packet_in.usec;
3397  packet1.x = packet_in.x;
3398  packet1.y = packet_in.y;
3399  packet1.z = packet_in.z;
3400  packet1.roll = packet_in.roll;
3401  packet1.pitch = packet_in.pitch;
3402  packet1.yaw = packet_in.yaw;
3403 
3404 
3405 
3406  memset(&packet2, 0, sizeof(packet2));
3407  mavlink_msg_global_vision_position_estimate_encode(system_id, component_id, &msg, &packet1);
3409  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3410 
3411  memset(&packet2, 0, sizeof(packet2));
3412  mavlink_msg_global_vision_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3414  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3415 
3416  memset(&packet2, 0, sizeof(packet2));
3417  mavlink_msg_global_vision_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3419  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3420 
3421  memset(&packet2, 0, sizeof(packet2));
3422  mavlink_msg_to_send_buffer(buffer, &msg);
3423  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3424  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3425  }
3427  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3428 
3429  memset(&packet2, 0, sizeof(packet2));
3430  mavlink_msg_global_vision_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3432  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3433 }
3434 
3435 static void mavlink_test_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3436 {
3437  mavlink_message_t msg;
3438  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3439  uint16_t i;
3441  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0
3442  };
3443  mavlink_vision_position_estimate_t packet1, packet2;
3444  memset(&packet1, 0, sizeof(packet1));
3445  packet1.usec = packet_in.usec;
3446  packet1.x = packet_in.x;
3447  packet1.y = packet_in.y;
3448  packet1.z = packet_in.z;
3449  packet1.roll = packet_in.roll;
3450  packet1.pitch = packet_in.pitch;
3451  packet1.yaw = packet_in.yaw;
3452 
3453 
3454 
3455  memset(&packet2, 0, sizeof(packet2));
3456  mavlink_msg_vision_position_estimate_encode(system_id, component_id, &msg, &packet1);
3458  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3459 
3460  memset(&packet2, 0, sizeof(packet2));
3461  mavlink_msg_vision_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3463  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3464 
3465  memset(&packet2, 0, sizeof(packet2));
3466  mavlink_msg_vision_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3468  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3469 
3470  memset(&packet2, 0, sizeof(packet2));
3471  mavlink_msg_to_send_buffer(buffer, &msg);
3472  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3473  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3474  }
3475  mavlink_msg_vision_position_estimate_decode(last_msg, &packet2);
3476  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3477 
3478  memset(&packet2, 0, sizeof(packet2));
3479  mavlink_msg_vision_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3480  mavlink_msg_vision_position_estimate_decode(last_msg, &packet2);
3481  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3482 }
3483 
3484 static void mavlink_test_vision_speed_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3485 {
3486  mavlink_message_t msg;
3487  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3488  uint16_t i;
3489  mavlink_vision_speed_estimate_t packet_in = {
3490  93372036854775807ULL,73.0,101.0,129.0
3491  };
3492  mavlink_vision_speed_estimate_t packet1, packet2;
3493  memset(&packet1, 0, sizeof(packet1));
3494  packet1.usec = packet_in.usec;
3495  packet1.x = packet_in.x;
3496  packet1.y = packet_in.y;
3497  packet1.z = packet_in.z;
3498 
3499 
3500 
3501  memset(&packet2, 0, sizeof(packet2));
3502  mavlink_msg_vision_speed_estimate_encode(system_id, component_id, &msg, &packet1);
3504  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3505 
3506  memset(&packet2, 0, sizeof(packet2));
3507  mavlink_msg_vision_speed_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z );
3509  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3510 
3511  memset(&packet2, 0, sizeof(packet2));
3512  mavlink_msg_vision_speed_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z );
3514  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3515 
3516  memset(&packet2, 0, sizeof(packet2));
3517  mavlink_msg_to_send_buffer(buffer, &msg);
3518  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3519  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3520  }
3521  mavlink_msg_vision_speed_estimate_decode(last_msg, &packet2);
3522  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3523 
3524  memset(&packet2, 0, sizeof(packet2));
3525  mavlink_msg_vision_speed_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z );
3526  mavlink_msg_vision_speed_estimate_decode(last_msg, &packet2);
3527  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3528 }
3529 
3530 static void mavlink_test_vicon_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3531 {
3532  mavlink_message_t msg;
3533  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3534  uint16_t i;
3535  mavlink_vicon_position_estimate_t packet_in = {
3536  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0
3537  };
3538  mavlink_vicon_position_estimate_t packet1, packet2;
3539  memset(&packet1, 0, sizeof(packet1));
3540  packet1.usec = packet_in.usec;
3541  packet1.x = packet_in.x;
3542  packet1.y = packet_in.y;
3543  packet1.z = packet_in.z;
3544  packet1.roll = packet_in.roll;
3545  packet1.pitch = packet_in.pitch;
3546  packet1.yaw = packet_in.yaw;
3547 
3548 
3549 
3550  memset(&packet2, 0, sizeof(packet2));
3551  mavlink_msg_vicon_position_estimate_encode(system_id, component_id, &msg, &packet1);
3553  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3554 
3555  memset(&packet2, 0, sizeof(packet2));
3556  mavlink_msg_vicon_position_estimate_pack(system_id, component_id, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3558  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3559 
3560  memset(&packet2, 0, sizeof(packet2));
3561  mavlink_msg_vicon_position_estimate_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3563  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3564 
3565  memset(&packet2, 0, sizeof(packet2));
3566  mavlink_msg_to_send_buffer(buffer, &msg);
3567  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3568  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3569  }
3570  mavlink_msg_vicon_position_estimate_decode(last_msg, &packet2);
3571  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3572 
3573  memset(&packet2, 0, sizeof(packet2));
3574  mavlink_msg_vicon_position_estimate_send(MAVLINK_COMM_1 , packet1.usec , packet1.x , packet1.y , packet1.z , packet1.roll , packet1.pitch , packet1.yaw );
3575  mavlink_msg_vicon_position_estimate_decode(last_msg, &packet2);
3576  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3577 }
3578 
3579 static void mavlink_test_highres_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3580 {
3581  mavlink_message_t msg;
3582  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3583  uint16_t i;
3584  mavlink_highres_imu_t packet_in = {
3585  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,20355
3586  };
3587  mavlink_highres_imu_t packet1, packet2;
3588  memset(&packet1, 0, sizeof(packet1));
3589  packet1.time_usec = packet_in.time_usec;
3590  packet1.xacc = packet_in.xacc;
3591  packet1.yacc = packet_in.yacc;
3592  packet1.zacc = packet_in.zacc;
3593  packet1.xgyro = packet_in.xgyro;
3594  packet1.ygyro = packet_in.ygyro;
3595  packet1.zgyro = packet_in.zgyro;
3596  packet1.xmag = packet_in.xmag;
3597  packet1.ymag = packet_in.ymag;
3598  packet1.zmag = packet_in.zmag;
3599  packet1.abs_pressure = packet_in.abs_pressure;
3600  packet1.diff_pressure = packet_in.diff_pressure;
3601  packet1.pressure_alt = packet_in.pressure_alt;
3602  packet1.temperature = packet_in.temperature;
3603  packet1.fields_updated = packet_in.fields_updated;
3604 
3605 
3606 
3607  memset(&packet2, 0, sizeof(packet2));
3608  mavlink_msg_highres_imu_encode(system_id, component_id, &msg, &packet1);
3609  mavlink_msg_highres_imu_decode(&msg, &packet2);
3610  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3611 
3612  memset(&packet2, 0, sizeof(packet2));
3613  mavlink_msg_highres_imu_pack(system_id, component_id, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3614  mavlink_msg_highres_imu_decode(&msg, &packet2);
3615  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3616 
3617  memset(&packet2, 0, sizeof(packet2));
3618  mavlink_msg_highres_imu_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3619  mavlink_msg_highres_imu_decode(&msg, &packet2);
3620  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3621 
3622  memset(&packet2, 0, sizeof(packet2));
3623  mavlink_msg_to_send_buffer(buffer, &msg);
3624  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3625  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3626  }
3627  mavlink_msg_highres_imu_decode(last_msg, &packet2);
3628  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3629 
3630  memset(&packet2, 0, sizeof(packet2));
3631  mavlink_msg_highres_imu_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3632  mavlink_msg_highres_imu_decode(last_msg, &packet2);
3633  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3634 }
3635 
3636 static void mavlink_test_optical_flow_rad(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3637 {
3638  mavlink_message_t msg;
3639  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3640  uint16_t i;
3641  mavlink_optical_flow_rad_t packet_in = {
3642  93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,963499128,269.0,19315,3,70
3643  };
3644  mavlink_optical_flow_rad_t packet1, packet2;
3645  memset(&packet1, 0, sizeof(packet1));
3646  packet1.time_usec = packet_in.time_usec;
3647  packet1.integration_time_us = packet_in.integration_time_us;
3648  packet1.integrated_x = packet_in.integrated_x;
3649  packet1.integrated_y = packet_in.integrated_y;
3650  packet1.integrated_xgyro = packet_in.integrated_xgyro;
3651  packet1.integrated_ygyro = packet_in.integrated_ygyro;
3652  packet1.integrated_zgyro = packet_in.integrated_zgyro;
3653  packet1.time_delta_distance_us = packet_in.time_delta_distance_us;
3654  packet1.distance = packet_in.distance;
3655  packet1.temperature = packet_in.temperature;
3656  packet1.sensor_id = packet_in.sensor_id;
3657  packet1.quality = packet_in.quality;
3658 
3659 
3660 
3661  memset(&packet2, 0, sizeof(packet2));
3662  mavlink_msg_optical_flow_rad_encode(system_id, component_id, &msg, &packet1);
3663  mavlink_msg_optical_flow_rad_decode(&msg, &packet2);
3664  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3665 
3666  memset(&packet2, 0, sizeof(packet2));
3667  mavlink_msg_optical_flow_rad_pack(system_id, component_id, &msg , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
3668  mavlink_msg_optical_flow_rad_decode(&msg, &packet2);
3669  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3670 
3671  memset(&packet2, 0, sizeof(packet2));
3672  mavlink_msg_optical_flow_rad_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
3673  mavlink_msg_optical_flow_rad_decode(&msg, &packet2);
3674  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3675 
3676  memset(&packet2, 0, sizeof(packet2));
3677  mavlink_msg_to_send_buffer(buffer, &msg);
3678  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3679  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3680  }
3681  mavlink_msg_optical_flow_rad_decode(last_msg, &packet2);
3682  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3683 
3684  memset(&packet2, 0, sizeof(packet2));
3685  mavlink_msg_optical_flow_rad_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
3686  mavlink_msg_optical_flow_rad_decode(last_msg, &packet2);
3687  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3688 }
3689 
3690 static void mavlink_test_hil_sensor(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3691 {
3692  mavlink_message_t msg;
3693  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3694  uint16_t i;
3695  mavlink_hil_sensor_t packet_in = {
3696  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,963500584
3697  };
3698  mavlink_hil_sensor_t packet1, packet2;
3699  memset(&packet1, 0, sizeof(packet1));
3700  packet1.time_usec = packet_in.time_usec;
3701  packet1.xacc = packet_in.xacc;
3702  packet1.yacc = packet_in.yacc;
3703  packet1.zacc = packet_in.zacc;
3704  packet1.xgyro = packet_in.xgyro;
3705  packet1.ygyro = packet_in.ygyro;
3706  packet1.zgyro = packet_in.zgyro;
3707  packet1.xmag = packet_in.xmag;
3708  packet1.ymag = packet_in.ymag;
3709  packet1.zmag = packet_in.zmag;
3710  packet1.abs_pressure = packet_in.abs_pressure;
3711  packet1.diff_pressure = packet_in.diff_pressure;
3712  packet1.pressure_alt = packet_in.pressure_alt;
3713  packet1.temperature = packet_in.temperature;
3714  packet1.fields_updated = packet_in.fields_updated;
3715 
3716 
3717 
3718  memset(&packet2, 0, sizeof(packet2));
3719  mavlink_msg_hil_sensor_encode(system_id, component_id, &msg, &packet1);
3720  mavlink_msg_hil_sensor_decode(&msg, &packet2);
3721  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3722 
3723  memset(&packet2, 0, sizeof(packet2));
3724  mavlink_msg_hil_sensor_pack(system_id, component_id, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3725  mavlink_msg_hil_sensor_decode(&msg, &packet2);
3726  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3727 
3728  memset(&packet2, 0, sizeof(packet2));
3729  mavlink_msg_hil_sensor_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3730  mavlink_msg_hil_sensor_decode(&msg, &packet2);
3731  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3732 
3733  memset(&packet2, 0, sizeof(packet2));
3734  mavlink_msg_to_send_buffer(buffer, &msg);
3735  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3736  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3737  }
3738  mavlink_msg_hil_sensor_decode(last_msg, &packet2);
3739  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3740 
3741  memset(&packet2, 0, sizeof(packet2));
3742  mavlink_msg_hil_sensor_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag , packet1.abs_pressure , packet1.diff_pressure , packet1.pressure_alt , packet1.temperature , packet1.fields_updated );
3743  mavlink_msg_hil_sensor_decode(last_msg, &packet2);
3744  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3745 }
3746 
3747 static void mavlink_test_sim_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3748 {
3749  mavlink_message_t msg;
3750  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3751  uint16_t i;
3752  mavlink_sim_state_t packet_in = {
3753  17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,577.0
3754  };
3755  mavlink_sim_state_t packet1, packet2;
3756  memset(&packet1, 0, sizeof(packet1));
3757  packet1.q1 = packet_in.q1;
3758  packet1.q2 = packet_in.q2;
3759  packet1.q3 = packet_in.q3;
3760  packet1.q4 = packet_in.q4;
3761  packet1.roll = packet_in.roll;
3762  packet1.pitch = packet_in.pitch;
3763  packet1.yaw = packet_in.yaw;
3764  packet1.xacc = packet_in.xacc;
3765  packet1.yacc = packet_in.yacc;
3766  packet1.zacc = packet_in.zacc;
3767  packet1.xgyro = packet_in.xgyro;
3768  packet1.ygyro = packet_in.ygyro;
3769  packet1.zgyro = packet_in.zgyro;
3770  packet1.lat = packet_in.lat;
3771  packet1.lon = packet_in.lon;
3772  packet1.alt = packet_in.alt;
3773  packet1.std_dev_horz = packet_in.std_dev_horz;
3774  packet1.std_dev_vert = packet_in.std_dev_vert;
3775  packet1.vn = packet_in.vn;
3776  packet1.ve = packet_in.ve;
3777  packet1.vd = packet_in.vd;
3778 
3779 
3780 
3781  memset(&packet2, 0, sizeof(packet2));
3782  mavlink_msg_sim_state_encode(system_id, component_id, &msg, &packet1);
3783  mavlink_msg_sim_state_decode(&msg, &packet2);
3784  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3785 
3786  memset(&packet2, 0, sizeof(packet2));
3787  mavlink_msg_sim_state_pack(system_id, component_id, &msg , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.roll , packet1.pitch , packet1.yaw , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.lat , packet1.lon , packet1.alt , packet1.std_dev_horz , packet1.std_dev_vert , packet1.vn , packet1.ve , packet1.vd );
3788  mavlink_msg_sim_state_decode(&msg, &packet2);
3789  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3790 
3791  memset(&packet2, 0, sizeof(packet2));
3792  mavlink_msg_sim_state_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.roll , packet1.pitch , packet1.yaw , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.lat , packet1.lon , packet1.alt , packet1.std_dev_horz , packet1.std_dev_vert , packet1.vn , packet1.ve , packet1.vd );
3793  mavlink_msg_sim_state_decode(&msg, &packet2);
3794  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3795 
3796  memset(&packet2, 0, sizeof(packet2));
3797  mavlink_msg_to_send_buffer(buffer, &msg);
3798  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3799  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3800  }
3801  mavlink_msg_sim_state_decode(last_msg, &packet2);
3802  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3803 
3804  memset(&packet2, 0, sizeof(packet2));
3805  mavlink_msg_sim_state_send(MAVLINK_COMM_1 , packet1.q1 , packet1.q2 , packet1.q3 , packet1.q4 , packet1.roll , packet1.pitch , packet1.yaw , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.lat , packet1.lon , packet1.alt , packet1.std_dev_horz , packet1.std_dev_vert , packet1.vn , packet1.ve , packet1.vd );
3806  mavlink_msg_sim_state_decode(last_msg, &packet2);
3807  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3808 }
3809 
3810 static void mavlink_test_radio_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3811 {
3812  mavlink_message_t msg;
3813  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3814  uint16_t i;
3815  mavlink_radio_status_t packet_in = {
3816  17235,17339,17,84,151,218,29
3817  };
3818  mavlink_radio_status_t packet1, packet2;
3819  memset(&packet1, 0, sizeof(packet1));
3820  packet1.rxerrors = packet_in.rxerrors;
3821  packet1.fixed = packet_in.fixed;
3822  packet1.rssi = packet_in.rssi;
3823  packet1.remrssi = packet_in.remrssi;
3824  packet1.txbuf = packet_in.txbuf;
3825  packet1.noise = packet_in.noise;
3826  packet1.remnoise = packet_in.remnoise;
3827 
3828 
3829 
3830  memset(&packet2, 0, sizeof(packet2));
3831  mavlink_msg_radio_status_encode(system_id, component_id, &msg, &packet1);
3832  mavlink_msg_radio_status_decode(&msg, &packet2);
3833  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3834 
3835  memset(&packet2, 0, sizeof(packet2));
3836  mavlink_msg_radio_status_pack(system_id, component_id, &msg , packet1.rssi , packet1.remrssi , packet1.txbuf , packet1.noise , packet1.remnoise , packet1.rxerrors , packet1.fixed );
3837  mavlink_msg_radio_status_decode(&msg, &packet2);
3838  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3839 
3840  memset(&packet2, 0, sizeof(packet2));
3841  mavlink_msg_radio_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.rssi , packet1.remrssi , packet1.txbuf , packet1.noise , packet1.remnoise , packet1.rxerrors , packet1.fixed );
3842  mavlink_msg_radio_status_decode(&msg, &packet2);
3843  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3844 
3845  memset(&packet2, 0, sizeof(packet2));
3846  mavlink_msg_to_send_buffer(buffer, &msg);
3847  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3848  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3849  }
3850  mavlink_msg_radio_status_decode(last_msg, &packet2);
3851  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3852 
3853  memset(&packet2, 0, sizeof(packet2));
3854  mavlink_msg_radio_status_send(MAVLINK_COMM_1 , packet1.rssi , packet1.remrssi , packet1.txbuf , packet1.noise , packet1.remnoise , packet1.rxerrors , packet1.fixed );
3855  mavlink_msg_radio_status_decode(last_msg, &packet2);
3856  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3857 }
3858 
3859 static void mavlink_test_file_transfer_protocol(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3860 {
3861  mavlink_message_t msg;
3862  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3863  uint16_t i;
3864  mavlink_file_transfer_protocol_t packet_in = {
3865  5,72,139,{ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 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, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 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, 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, 195, 196, 197, 198, 199, 200 }
3866  };
3867  mavlink_file_transfer_protocol_t packet1, packet2;
3868  memset(&packet1, 0, sizeof(packet1));
3869  packet1.target_network = packet_in.target_network;
3870  packet1.target_system = packet_in.target_system;
3871  packet1.target_component = packet_in.target_component;
3872 
3873  mav_array_memcpy(packet1.payload, packet_in.payload, sizeof(uint8_t)*251);
3874 
3875 
3876  memset(&packet2, 0, sizeof(packet2));
3877  mavlink_msg_file_transfer_protocol_encode(system_id, component_id, &msg, &packet1);
3879  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3880 
3881  memset(&packet2, 0, sizeof(packet2));
3882  mavlink_msg_file_transfer_protocol_pack(system_id, component_id, &msg , packet1.target_network , packet1.target_system , packet1.target_component , packet1.payload );
3884  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3885 
3886  memset(&packet2, 0, sizeof(packet2));
3887  mavlink_msg_file_transfer_protocol_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_network , packet1.target_system , packet1.target_component , packet1.payload );
3889  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3890 
3891  memset(&packet2, 0, sizeof(packet2));
3892  mavlink_msg_to_send_buffer(buffer, &msg);
3893  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3894  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3895  }
3896  mavlink_msg_file_transfer_protocol_decode(last_msg, &packet2);
3897  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3898 
3899  memset(&packet2, 0, sizeof(packet2));
3900  mavlink_msg_file_transfer_protocol_send(MAVLINK_COMM_1 , packet1.target_network , packet1.target_system , packet1.target_component , packet1.payload );
3901  mavlink_msg_file_transfer_protocol_decode(last_msg, &packet2);
3902  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3903 }
3904 
3905 static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3906 {
3907  mavlink_message_t msg;
3908  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3909  uint16_t i;
3910  mavlink_timesync_t packet_in = {
3911  93372036854775807LL,93372036854776311LL
3912  };
3913  mavlink_timesync_t packet1, packet2;
3914  memset(&packet1, 0, sizeof(packet1));
3915  packet1.tc1 = packet_in.tc1;
3916  packet1.ts1 = packet_in.ts1;
3917 
3918 
3919 
3920  memset(&packet2, 0, sizeof(packet2));
3921  mavlink_msg_timesync_encode(system_id, component_id, &msg, &packet1);
3922  mavlink_msg_timesync_decode(&msg, &packet2);
3923  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3924 
3925  memset(&packet2, 0, sizeof(packet2));
3926  mavlink_msg_timesync_pack(system_id, component_id, &msg , packet1.tc1 , packet1.ts1 );
3927  mavlink_msg_timesync_decode(&msg, &packet2);
3928  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3929 
3930  memset(&packet2, 0, sizeof(packet2));
3931  mavlink_msg_timesync_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.tc1 , packet1.ts1 );
3932  mavlink_msg_timesync_decode(&msg, &packet2);
3933  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3934 
3935  memset(&packet2, 0, sizeof(packet2));
3936  mavlink_msg_to_send_buffer(buffer, &msg);
3937  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3938  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3939  }
3940  mavlink_msg_timesync_decode(last_msg, &packet2);
3941  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3942 
3943  memset(&packet2, 0, sizeof(packet2));
3944  mavlink_msg_timesync_send(MAVLINK_COMM_1 , packet1.tc1 , packet1.ts1 );
3945  mavlink_msg_timesync_decode(last_msg, &packet2);
3946  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3947 }
3948 
3949 static void mavlink_test_camera_trigger(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3950 {
3951  mavlink_message_t msg;
3952  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3953  uint16_t i;
3954  mavlink_camera_trigger_t packet_in = {
3955  93372036854775807ULL,963497880
3956  };
3957  mavlink_camera_trigger_t packet1, packet2;
3958  memset(&packet1, 0, sizeof(packet1));
3959  packet1.time_usec = packet_in.time_usec;
3960  packet1.seq = packet_in.seq;
3961 
3962 
3963 
3964  memset(&packet2, 0, sizeof(packet2));
3965  mavlink_msg_camera_trigger_encode(system_id, component_id, &msg, &packet1);
3966  mavlink_msg_camera_trigger_decode(&msg, &packet2);
3967  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3968 
3969  memset(&packet2, 0, sizeof(packet2));
3970  mavlink_msg_camera_trigger_pack(system_id, component_id, &msg , packet1.time_usec , packet1.seq );
3971  mavlink_msg_camera_trigger_decode(&msg, &packet2);
3972  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3973 
3974  memset(&packet2, 0, sizeof(packet2));
3975  mavlink_msg_camera_trigger_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.seq );
3976  mavlink_msg_camera_trigger_decode(&msg, &packet2);
3977  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3978 
3979  memset(&packet2, 0, sizeof(packet2));
3980  mavlink_msg_to_send_buffer(buffer, &msg);
3981  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
3982  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
3983  }
3984  mavlink_msg_camera_trigger_decode(last_msg, &packet2);
3985  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3986 
3987  memset(&packet2, 0, sizeof(packet2));
3988  mavlink_msg_camera_trigger_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.seq );
3989  mavlink_msg_camera_trigger_decode(last_msg, &packet2);
3990  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
3991 }
3992 
3993 static void mavlink_test_hil_gps(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
3994 {
3995  mavlink_message_t msg;
3996  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
3997  uint16_t i;
3998  mavlink_hil_gps_t packet_in = {
3999  93372036854775807ULL,963497880,963498088,963498296,18275,18379,18483,18587,18691,18795,18899,235,46
4000  };
4001  mavlink_hil_gps_t packet1, packet2;
4002  memset(&packet1, 0, sizeof(packet1));
4003  packet1.time_usec = packet_in.time_usec;
4004  packet1.lat = packet_in.lat;
4005  packet1.lon = packet_in.lon;
4006  packet1.alt = packet_in.alt;
4007  packet1.eph = packet_in.eph;
4008  packet1.epv = packet_in.epv;
4009  packet1.vel = packet_in.vel;
4010  packet1.vn = packet_in.vn;
4011  packet1.ve = packet_in.ve;
4012  packet1.vd = packet_in.vd;
4013  packet1.cog = packet_in.cog;
4014  packet1.fix_type = packet_in.fix_type;
4015  packet1.satellites_visible = packet_in.satellites_visible;
4016 
4017 
4018 
4019  memset(&packet2, 0, sizeof(packet2));
4020  mavlink_msg_hil_gps_encode(system_id, component_id, &msg, &packet1);
4021  mavlink_msg_hil_gps_decode(&msg, &packet2);
4022  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4023 
4024  memset(&packet2, 0, sizeof(packet2));
4025  mavlink_msg_hil_gps_pack(system_id, component_id, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.vn , packet1.ve , packet1.vd , packet1.cog , packet1.satellites_visible );
4026  mavlink_msg_hil_gps_decode(&msg, &packet2);
4027  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4028 
4029  memset(&packet2, 0, sizeof(packet2));
4030  mavlink_msg_hil_gps_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.vn , packet1.ve , packet1.vd , packet1.cog , packet1.satellites_visible );
4031  mavlink_msg_hil_gps_decode(&msg, &packet2);
4032  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4033 
4034  memset(&packet2, 0, sizeof(packet2));
4035  mavlink_msg_to_send_buffer(buffer, &msg);
4036  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4037  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4038  }
4039  mavlink_msg_hil_gps_decode(last_msg, &packet2);
4040  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4041 
4042  memset(&packet2, 0, sizeof(packet2));
4043  mavlink_msg_hil_gps_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.vn , packet1.ve , packet1.vd , packet1.cog , packet1.satellites_visible );
4044  mavlink_msg_hil_gps_decode(last_msg, &packet2);
4045  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4046 }
4047 
4048 static void mavlink_test_hil_optical_flow(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4049 {
4050  mavlink_message_t msg;
4051  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4052  uint16_t i;
4053  mavlink_hil_optical_flow_t packet_in = {
4054  93372036854775807ULL,963497880,101.0,129.0,157.0,185.0,213.0,963499128,269.0,19315,3,70
4055  };
4056  mavlink_hil_optical_flow_t packet1, packet2;
4057  memset(&packet1, 0, sizeof(packet1));
4058  packet1.time_usec = packet_in.time_usec;
4059  packet1.integration_time_us = packet_in.integration_time_us;
4060  packet1.integrated_x = packet_in.integrated_x;
4061  packet1.integrated_y = packet_in.integrated_y;
4062  packet1.integrated_xgyro = packet_in.integrated_xgyro;
4063  packet1.integrated_ygyro = packet_in.integrated_ygyro;
4064  packet1.integrated_zgyro = packet_in.integrated_zgyro;
4065  packet1.time_delta_distance_us = packet_in.time_delta_distance_us;
4066  packet1.distance = packet_in.distance;
4067  packet1.temperature = packet_in.temperature;
4068  packet1.sensor_id = packet_in.sensor_id;
4069  packet1.quality = packet_in.quality;
4070 
4071 
4072 
4073  memset(&packet2, 0, sizeof(packet2));
4074  mavlink_msg_hil_optical_flow_encode(system_id, component_id, &msg, &packet1);
4075  mavlink_msg_hil_optical_flow_decode(&msg, &packet2);
4076  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4077 
4078  memset(&packet2, 0, sizeof(packet2));
4079  mavlink_msg_hil_optical_flow_pack(system_id, component_id, &msg , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
4080  mavlink_msg_hil_optical_flow_decode(&msg, &packet2);
4081  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4082 
4083  memset(&packet2, 0, sizeof(packet2));
4084  mavlink_msg_hil_optical_flow_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
4085  mavlink_msg_hil_optical_flow_decode(&msg, &packet2);
4086  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4087 
4088  memset(&packet2, 0, sizeof(packet2));
4089  mavlink_msg_to_send_buffer(buffer, &msg);
4090  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4091  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4092  }
4093  mavlink_msg_hil_optical_flow_decode(last_msg, &packet2);
4094  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4095 
4096  memset(&packet2, 0, sizeof(packet2));
4097  mavlink_msg_hil_optical_flow_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.sensor_id , packet1.integration_time_us , packet1.integrated_x , packet1.integrated_y , packet1.integrated_xgyro , packet1.integrated_ygyro , packet1.integrated_zgyro , packet1.temperature , packet1.quality , packet1.time_delta_distance_us , packet1.distance );
4098  mavlink_msg_hil_optical_flow_decode(last_msg, &packet2);
4099  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4100 }
4101 
4102 static void mavlink_test_hil_state_quaternion(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4103 {
4104  mavlink_message_t msg;
4105  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4106  uint16_t i;
4107  mavlink_hil_state_quaternion_t packet_in = {
4108  93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0 },185.0,213.0,241.0,963499336,963499544,963499752,19731,19835,19939,20043,20147,20251,20355,20459
4109  };
4110  mavlink_hil_state_quaternion_t packet1, packet2;
4111  memset(&packet1, 0, sizeof(packet1));
4112  packet1.time_usec = packet_in.time_usec;
4113  packet1.rollspeed = packet_in.rollspeed;
4114  packet1.pitchspeed = packet_in.pitchspeed;
4115  packet1.yawspeed = packet_in.yawspeed;
4116  packet1.lat = packet_in.lat;
4117  packet1.lon = packet_in.lon;
4118  packet1.alt = packet_in.alt;
4119  packet1.vx = packet_in.vx;
4120  packet1.vy = packet_in.vy;
4121  packet1.vz = packet_in.vz;
4122  packet1.ind_airspeed = packet_in.ind_airspeed;
4123  packet1.true_airspeed = packet_in.true_airspeed;
4124  packet1.xacc = packet_in.xacc;
4125  packet1.yacc = packet_in.yacc;
4126  packet1.zacc = packet_in.zacc;
4127 
4128  mav_array_memcpy(packet1.attitude_quaternion, packet_in.attitude_quaternion, sizeof(float)*4);
4129 
4130 
4131  memset(&packet2, 0, sizeof(packet2));
4132  mavlink_msg_hil_state_quaternion_encode(system_id, component_id, &msg, &packet1);
4134  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4135 
4136  memset(&packet2, 0, sizeof(packet2));
4137  mavlink_msg_hil_state_quaternion_pack(system_id, component_id, &msg , packet1.time_usec , packet1.attitude_quaternion , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ind_airspeed , packet1.true_airspeed , packet1.xacc , packet1.yacc , packet1.zacc );
4139  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4140 
4141  memset(&packet2, 0, sizeof(packet2));
4142  mavlink_msg_hil_state_quaternion_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.attitude_quaternion , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ind_airspeed , packet1.true_airspeed , packet1.xacc , packet1.yacc , packet1.zacc );
4144  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4145 
4146  memset(&packet2, 0, sizeof(packet2));
4147  mavlink_msg_to_send_buffer(buffer, &msg);
4148  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4149  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4150  }
4151  mavlink_msg_hil_state_quaternion_decode(last_msg, &packet2);
4152  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4153 
4154  memset(&packet2, 0, sizeof(packet2));
4155  mavlink_msg_hil_state_quaternion_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.attitude_quaternion , packet1.rollspeed , packet1.pitchspeed , packet1.yawspeed , packet1.lat , packet1.lon , packet1.alt , packet1.vx , packet1.vy , packet1.vz , packet1.ind_airspeed , packet1.true_airspeed , packet1.xacc , packet1.yacc , packet1.zacc );
4156  mavlink_msg_hil_state_quaternion_decode(last_msg, &packet2);
4157  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4158 }
4159 
4160 static void mavlink_test_scaled_imu2(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4161 {
4162  mavlink_message_t msg;
4163  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4164  uint16_t i;
4165  mavlink_scaled_imu2_t packet_in = {
4166  963497464,17443,17547,17651,17755,17859,17963,18067,18171,18275
4167  };
4168  mavlink_scaled_imu2_t packet1, packet2;
4169  memset(&packet1, 0, sizeof(packet1));
4170  packet1.time_boot_ms = packet_in.time_boot_ms;
4171  packet1.xacc = packet_in.xacc;
4172  packet1.yacc = packet_in.yacc;
4173  packet1.zacc = packet_in.zacc;
4174  packet1.xgyro = packet_in.xgyro;
4175  packet1.ygyro = packet_in.ygyro;
4176  packet1.zgyro = packet_in.zgyro;
4177  packet1.xmag = packet_in.xmag;
4178  packet1.ymag = packet_in.ymag;
4179  packet1.zmag = packet_in.zmag;
4180 
4181 
4182 
4183  memset(&packet2, 0, sizeof(packet2));
4184  mavlink_msg_scaled_imu2_encode(system_id, component_id, &msg, &packet1);
4185  mavlink_msg_scaled_imu2_decode(&msg, &packet2);
4186  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4187 
4188  memset(&packet2, 0, sizeof(packet2));
4189  mavlink_msg_scaled_imu2_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4190  mavlink_msg_scaled_imu2_decode(&msg, &packet2);
4191  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4192 
4193  memset(&packet2, 0, sizeof(packet2));
4194  mavlink_msg_scaled_imu2_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4195  mavlink_msg_scaled_imu2_decode(&msg, &packet2);
4196  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4197 
4198  memset(&packet2, 0, sizeof(packet2));
4199  mavlink_msg_to_send_buffer(buffer, &msg);
4200  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4201  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4202  }
4203  mavlink_msg_scaled_imu2_decode(last_msg, &packet2);
4204  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4205 
4206  memset(&packet2, 0, sizeof(packet2));
4207  mavlink_msg_scaled_imu2_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4208  mavlink_msg_scaled_imu2_decode(last_msg, &packet2);
4209  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4210 }
4211 
4212 static void mavlink_test_log_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4213 {
4214  mavlink_message_t msg;
4215  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4216  uint16_t i;
4217  mavlink_log_request_list_t packet_in = {
4218  17235,17339,17,84
4219  };
4220  mavlink_log_request_list_t packet1, packet2;
4221  memset(&packet1, 0, sizeof(packet1));
4222  packet1.start = packet_in.start;
4223  packet1.end = packet_in.end;
4224  packet1.target_system = packet_in.target_system;
4225  packet1.target_component = packet_in.target_component;
4226 
4227 
4228 
4229  memset(&packet2, 0, sizeof(packet2));
4230  mavlink_msg_log_request_list_encode(system_id, component_id, &msg, &packet1);
4231  mavlink_msg_log_request_list_decode(&msg, &packet2);
4232  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4233 
4234  memset(&packet2, 0, sizeof(packet2));
4235  mavlink_msg_log_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.start , packet1.end );
4236  mavlink_msg_log_request_list_decode(&msg, &packet2);
4237  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4238 
4239  memset(&packet2, 0, sizeof(packet2));
4240  mavlink_msg_log_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.start , packet1.end );
4241  mavlink_msg_log_request_list_decode(&msg, &packet2);
4242  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4243 
4244  memset(&packet2, 0, sizeof(packet2));
4245  mavlink_msg_to_send_buffer(buffer, &msg);
4246  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4247  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4248  }
4249  mavlink_msg_log_request_list_decode(last_msg, &packet2);
4250  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4251 
4252  memset(&packet2, 0, sizeof(packet2));
4253  mavlink_msg_log_request_list_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.start , packet1.end );
4254  mavlink_msg_log_request_list_decode(last_msg, &packet2);
4255  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4256 }
4257 
4258 static void mavlink_test_log_entry(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4259 {
4260  mavlink_message_t msg;
4261  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4262  uint16_t i;
4263  mavlink_log_entry_t packet_in = {
4264  963497464,963497672,17651,17755,17859
4265  };
4266  mavlink_log_entry_t packet1, packet2;
4267  memset(&packet1, 0, sizeof(packet1));
4268  packet1.time_utc = packet_in.time_utc;
4269  packet1.size = packet_in.size;
4270  packet1.id = packet_in.id;
4271  packet1.num_logs = packet_in.num_logs;
4272  packet1.last_log_num = packet_in.last_log_num;
4273 
4274 
4275 
4276  memset(&packet2, 0, sizeof(packet2));
4277  mavlink_msg_log_entry_encode(system_id, component_id, &msg, &packet1);
4278  mavlink_msg_log_entry_decode(&msg, &packet2);
4279  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4280 
4281  memset(&packet2, 0, sizeof(packet2));
4282  mavlink_msg_log_entry_pack(system_id, component_id, &msg , packet1.id , packet1.num_logs , packet1.last_log_num , packet1.time_utc , packet1.size );
4283  mavlink_msg_log_entry_decode(&msg, &packet2);
4284  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4285 
4286  memset(&packet2, 0, sizeof(packet2));
4287  mavlink_msg_log_entry_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.num_logs , packet1.last_log_num , packet1.time_utc , packet1.size );
4288  mavlink_msg_log_entry_decode(&msg, &packet2);
4289  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4290 
4291  memset(&packet2, 0, sizeof(packet2));
4292  mavlink_msg_to_send_buffer(buffer, &msg);
4293  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4294  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4295  }
4296  mavlink_msg_log_entry_decode(last_msg, &packet2);
4297  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4298 
4299  memset(&packet2, 0, sizeof(packet2));
4300  mavlink_msg_log_entry_send(MAVLINK_COMM_1 , packet1.id , packet1.num_logs , packet1.last_log_num , packet1.time_utc , packet1.size );
4301  mavlink_msg_log_entry_decode(last_msg, &packet2);
4302  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4303 }
4304 
4305 static void mavlink_test_log_request_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4306 {
4307  mavlink_message_t msg;
4308  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4309  uint16_t i;
4310  mavlink_log_request_data_t packet_in = {
4311  963497464,963497672,17651,163,230
4312  };
4313  mavlink_log_request_data_t packet1, packet2;
4314  memset(&packet1, 0, sizeof(packet1));
4315  packet1.ofs = packet_in.ofs;
4316  packet1.count = packet_in.count;
4317  packet1.id = packet_in.id;
4318  packet1.target_system = packet_in.target_system;
4319  packet1.target_component = packet_in.target_component;
4320 
4321 
4322 
4323  memset(&packet2, 0, sizeof(packet2));
4324  mavlink_msg_log_request_data_encode(system_id, component_id, &msg, &packet1);
4325  mavlink_msg_log_request_data_decode(&msg, &packet2);
4326  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4327 
4328  memset(&packet2, 0, sizeof(packet2));
4329  mavlink_msg_log_request_data_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.id , packet1.ofs , packet1.count );
4330  mavlink_msg_log_request_data_decode(&msg, &packet2);
4331  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4332 
4333  memset(&packet2, 0, sizeof(packet2));
4334  mavlink_msg_log_request_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.id , packet1.ofs , packet1.count );
4335  mavlink_msg_log_request_data_decode(&msg, &packet2);
4336  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4337 
4338  memset(&packet2, 0, sizeof(packet2));
4339  mavlink_msg_to_send_buffer(buffer, &msg);
4340  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4341  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4342  }
4343  mavlink_msg_log_request_data_decode(last_msg, &packet2);
4344  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4345 
4346  memset(&packet2, 0, sizeof(packet2));
4347  mavlink_msg_log_request_data_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.id , packet1.ofs , packet1.count );
4348  mavlink_msg_log_request_data_decode(last_msg, &packet2);
4349  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4350 }
4351 
4352 static void mavlink_test_log_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4353 {
4354  mavlink_message_t msg;
4355  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4356  uint16_t i;
4357  mavlink_log_data_t packet_in = {
4358  963497464,17443,151,{ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 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, 45, 46, 47, 48, 49, 50, 51 }
4359  };
4360  mavlink_log_data_t packet1, packet2;
4361  memset(&packet1, 0, sizeof(packet1));
4362  packet1.ofs = packet_in.ofs;
4363  packet1.id = packet_in.id;
4364  packet1.count = packet_in.count;
4365 
4366  mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*90);
4367 
4368 
4369  memset(&packet2, 0, sizeof(packet2));
4370  mavlink_msg_log_data_encode(system_id, component_id, &msg, &packet1);
4371  mavlink_msg_log_data_decode(&msg, &packet2);
4372  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4373 
4374  memset(&packet2, 0, sizeof(packet2));
4375  mavlink_msg_log_data_pack(system_id, component_id, &msg , packet1.id , packet1.ofs , packet1.count , packet1.data );
4376  mavlink_msg_log_data_decode(&msg, &packet2);
4377  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4378 
4379  memset(&packet2, 0, sizeof(packet2));
4380  mavlink_msg_log_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.ofs , packet1.count , packet1.data );
4381  mavlink_msg_log_data_decode(&msg, &packet2);
4382  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4383 
4384  memset(&packet2, 0, sizeof(packet2));
4385  mavlink_msg_to_send_buffer(buffer, &msg);
4386  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4387  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4388  }
4389  mavlink_msg_log_data_decode(last_msg, &packet2);
4390  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4391 
4392  memset(&packet2, 0, sizeof(packet2));
4393  mavlink_msg_log_data_send(MAVLINK_COMM_1 , packet1.id , packet1.ofs , packet1.count , packet1.data );
4394  mavlink_msg_log_data_decode(last_msg, &packet2);
4395  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4396 }
4397 
4398 static void mavlink_test_log_erase(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4399 {
4400  mavlink_message_t msg;
4401  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4402  uint16_t i;
4403  mavlink_log_erase_t packet_in = {
4404  5,72
4405  };
4406  mavlink_log_erase_t packet1, packet2;
4407  memset(&packet1, 0, sizeof(packet1));
4408  packet1.target_system = packet_in.target_system;
4409  packet1.target_component = packet_in.target_component;
4410 
4411 
4412 
4413  memset(&packet2, 0, sizeof(packet2));
4414  mavlink_msg_log_erase_encode(system_id, component_id, &msg, &packet1);
4415  mavlink_msg_log_erase_decode(&msg, &packet2);
4416  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4417 
4418  memset(&packet2, 0, sizeof(packet2));
4419  mavlink_msg_log_erase_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
4420  mavlink_msg_log_erase_decode(&msg, &packet2);
4421  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4422 
4423  memset(&packet2, 0, sizeof(packet2));
4424  mavlink_msg_log_erase_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
4425  mavlink_msg_log_erase_decode(&msg, &packet2);
4426  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4427 
4428  memset(&packet2, 0, sizeof(packet2));
4429  mavlink_msg_to_send_buffer(buffer, &msg);
4430  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4431  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4432  }
4433  mavlink_msg_log_erase_decode(last_msg, &packet2);
4434  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4435 
4436  memset(&packet2, 0, sizeof(packet2));
4437  mavlink_msg_log_erase_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
4438  mavlink_msg_log_erase_decode(last_msg, &packet2);
4439  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4440 }
4441 
4442 static void mavlink_test_log_request_end(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4443 {
4444  mavlink_message_t msg;
4445  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4446  uint16_t i;
4447  mavlink_log_request_end_t packet_in = {
4448  5,72
4449  };
4450  mavlink_log_request_end_t packet1, packet2;
4451  memset(&packet1, 0, sizeof(packet1));
4452  packet1.target_system = packet_in.target_system;
4453  packet1.target_component = packet_in.target_component;
4454 
4455 
4456 
4457  memset(&packet2, 0, sizeof(packet2));
4458  mavlink_msg_log_request_end_encode(system_id, component_id, &msg, &packet1);
4459  mavlink_msg_log_request_end_decode(&msg, &packet2);
4460  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4461 
4462  memset(&packet2, 0, sizeof(packet2));
4463  mavlink_msg_log_request_end_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component );
4464  mavlink_msg_log_request_end_decode(&msg, &packet2);
4465  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4466 
4467  memset(&packet2, 0, sizeof(packet2));
4468  mavlink_msg_log_request_end_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component );
4469  mavlink_msg_log_request_end_decode(&msg, &packet2);
4470  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4471 
4472  memset(&packet2, 0, sizeof(packet2));
4473  mavlink_msg_to_send_buffer(buffer, &msg);
4474  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4475  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4476  }
4477  mavlink_msg_log_request_end_decode(last_msg, &packet2);
4478  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4479 
4480  memset(&packet2, 0, sizeof(packet2));
4481  mavlink_msg_log_request_end_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component );
4482  mavlink_msg_log_request_end_decode(last_msg, &packet2);
4483  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4484 }
4485 
4486 static void mavlink_test_gps_inject_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4487 {
4488  mavlink_message_t msg;
4489  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4490  uint16_t i;
4491  mavlink_gps_inject_data_t packet_in = {
4492  5,72,139,{ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 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, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }
4493  };
4494  mavlink_gps_inject_data_t packet1, packet2;
4495  memset(&packet1, 0, sizeof(packet1));
4496  packet1.target_system = packet_in.target_system;
4497  packet1.target_component = packet_in.target_component;
4498  packet1.len = packet_in.len;
4499 
4500  mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*110);
4501 
4502 
4503  memset(&packet2, 0, sizeof(packet2));
4504  mavlink_msg_gps_inject_data_encode(system_id, component_id, &msg, &packet1);
4505  mavlink_msg_gps_inject_data_decode(&msg, &packet2);
4506  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4507 
4508  memset(&packet2, 0, sizeof(packet2));
4509  mavlink_msg_gps_inject_data_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.len , packet1.data );
4510  mavlink_msg_gps_inject_data_decode(&msg, &packet2);
4511  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4512 
4513  memset(&packet2, 0, sizeof(packet2));
4514  mavlink_msg_gps_inject_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.len , packet1.data );
4515  mavlink_msg_gps_inject_data_decode(&msg, &packet2);
4516  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4517 
4518  memset(&packet2, 0, sizeof(packet2));
4519  mavlink_msg_to_send_buffer(buffer, &msg);
4520  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4521  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4522  }
4523  mavlink_msg_gps_inject_data_decode(last_msg, &packet2);
4524  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4525 
4526  memset(&packet2, 0, sizeof(packet2));
4527  mavlink_msg_gps_inject_data_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.len , packet1.data );
4528  mavlink_msg_gps_inject_data_decode(last_msg, &packet2);
4529  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4530 }
4531 
4532 static void mavlink_test_gps2_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4533 {
4534  mavlink_message_t msg;
4535  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4536  uint16_t i;
4537  mavlink_gps2_raw_t packet_in = {
4538  93372036854775807ULL,963497880,963498088,963498296,963498504,18483,18587,18691,18795,101,168,235
4539  };
4540  mavlink_gps2_raw_t packet1, packet2;
4541  memset(&packet1, 0, sizeof(packet1));
4542  packet1.time_usec = packet_in.time_usec;
4543  packet1.lat = packet_in.lat;
4544  packet1.lon = packet_in.lon;
4545  packet1.alt = packet_in.alt;
4546  packet1.dgps_age = packet_in.dgps_age;
4547  packet1.eph = packet_in.eph;
4548  packet1.epv = packet_in.epv;
4549  packet1.vel = packet_in.vel;
4550  packet1.cog = packet_in.cog;
4551  packet1.fix_type = packet_in.fix_type;
4552  packet1.satellites_visible = packet_in.satellites_visible;
4553  packet1.dgps_numch = packet_in.dgps_numch;
4554 
4555 
4556 
4557  memset(&packet2, 0, sizeof(packet2));
4558  mavlink_msg_gps2_raw_encode(system_id, component_id, &msg, &packet1);
4559  mavlink_msg_gps2_raw_decode(&msg, &packet2);
4560  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4561 
4562  memset(&packet2, 0, sizeof(packet2));
4563  mavlink_msg_gps2_raw_pack(system_id, component_id, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible , packet1.dgps_numch , packet1.dgps_age );
4564  mavlink_msg_gps2_raw_decode(&msg, &packet2);
4565  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4566 
4567  memset(&packet2, 0, sizeof(packet2));
4568  mavlink_msg_gps2_raw_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible , packet1.dgps_numch , packet1.dgps_age );
4569  mavlink_msg_gps2_raw_decode(&msg, &packet2);
4570  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4571 
4572  memset(&packet2, 0, sizeof(packet2));
4573  mavlink_msg_to_send_buffer(buffer, &msg);
4574  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4575  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4576  }
4577  mavlink_msg_gps2_raw_decode(last_msg, &packet2);
4578  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4579 
4580  memset(&packet2, 0, sizeof(packet2));
4581  mavlink_msg_gps2_raw_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.fix_type , packet1.lat , packet1.lon , packet1.alt , packet1.eph , packet1.epv , packet1.vel , packet1.cog , packet1.satellites_visible , packet1.dgps_numch , packet1.dgps_age );
4582  mavlink_msg_gps2_raw_decode(last_msg, &packet2);
4583  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4584 }
4585 
4586 static void mavlink_test_power_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4587 {
4588  mavlink_message_t msg;
4589  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4590  uint16_t i;
4591  mavlink_power_status_t packet_in = {
4592  17235,17339,17443
4593  };
4594  mavlink_power_status_t packet1, packet2;
4595  memset(&packet1, 0, sizeof(packet1));
4596  packet1.Vcc = packet_in.Vcc;
4597  packet1.Vservo = packet_in.Vservo;
4598  packet1.flags = packet_in.flags;
4599 
4600 
4601 
4602  memset(&packet2, 0, sizeof(packet2));
4603  mavlink_msg_power_status_encode(system_id, component_id, &msg, &packet1);
4604  mavlink_msg_power_status_decode(&msg, &packet2);
4605  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4606 
4607  memset(&packet2, 0, sizeof(packet2));
4608  mavlink_msg_power_status_pack(system_id, component_id, &msg , packet1.Vcc , packet1.Vservo , packet1.flags );
4609  mavlink_msg_power_status_decode(&msg, &packet2);
4610  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4611 
4612  memset(&packet2, 0, sizeof(packet2));
4613  mavlink_msg_power_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.Vcc , packet1.Vservo , packet1.flags );
4614  mavlink_msg_power_status_decode(&msg, &packet2);
4615  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4616 
4617  memset(&packet2, 0, sizeof(packet2));
4618  mavlink_msg_to_send_buffer(buffer, &msg);
4619  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4620  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4621  }
4622  mavlink_msg_power_status_decode(last_msg, &packet2);
4623  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4624 
4625  memset(&packet2, 0, sizeof(packet2));
4626  mavlink_msg_power_status_send(MAVLINK_COMM_1 , packet1.Vcc , packet1.Vservo , packet1.flags );
4627  mavlink_msg_power_status_decode(last_msg, &packet2);
4628  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4629 }
4630 
4631 static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4632 {
4633  mavlink_message_t msg;
4634  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4635  uint16_t i;
4636  mavlink_serial_control_t packet_in = {
4637  963497464,17443,151,218,29,{ 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, 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 }
4638  };
4639  mavlink_serial_control_t packet1, packet2;
4640  memset(&packet1, 0, sizeof(packet1));
4641  packet1.baudrate = packet_in.baudrate;
4642  packet1.timeout = packet_in.timeout;
4643  packet1.device = packet_in.device;
4644  packet1.flags = packet_in.flags;
4645  packet1.count = packet_in.count;
4646 
4647  mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*70);
4648 
4649 
4650  memset(&packet2, 0, sizeof(packet2));
4651  mavlink_msg_serial_control_encode(system_id, component_id, &msg, &packet1);
4652  mavlink_msg_serial_control_decode(&msg, &packet2);
4653  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4654 
4655  memset(&packet2, 0, sizeof(packet2));
4656  mavlink_msg_serial_control_pack(system_id, component_id, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data );
4657  mavlink_msg_serial_control_decode(&msg, &packet2);
4658  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4659 
4660  memset(&packet2, 0, sizeof(packet2));
4661  mavlink_msg_serial_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data );
4662  mavlink_msg_serial_control_decode(&msg, &packet2);
4663  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4664 
4665  memset(&packet2, 0, sizeof(packet2));
4666  mavlink_msg_to_send_buffer(buffer, &msg);
4667  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4668  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4669  }
4670  mavlink_msg_serial_control_decode(last_msg, &packet2);
4671  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4672 
4673  memset(&packet2, 0, sizeof(packet2));
4674  mavlink_msg_serial_control_send(MAVLINK_COMM_1 , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data );
4675  mavlink_msg_serial_control_decode(last_msg, &packet2);
4676  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4677 }
4678 
4679 static void mavlink_test_gps_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4680 {
4681  mavlink_message_t msg;
4682  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4683  uint16_t i;
4684  mavlink_gps_rtk_t packet_in = {
4685  963497464,963497672,963497880,963498088,963498296,963498504,963498712,18691,223,34,101,168,235
4686  };
4687  mavlink_gps_rtk_t packet1, packet2;
4688  memset(&packet1, 0, sizeof(packet1));
4689  packet1.time_last_baseline_ms = packet_in.time_last_baseline_ms;
4690  packet1.tow = packet_in.tow;
4691  packet1.baseline_a_mm = packet_in.baseline_a_mm;
4692  packet1.baseline_b_mm = packet_in.baseline_b_mm;
4693  packet1.baseline_c_mm = packet_in.baseline_c_mm;
4694  packet1.accuracy = packet_in.accuracy;
4695  packet1.iar_num_hypotheses = packet_in.iar_num_hypotheses;
4696  packet1.wn = packet_in.wn;
4697  packet1.rtk_receiver_id = packet_in.rtk_receiver_id;
4698  packet1.rtk_health = packet_in.rtk_health;
4699  packet1.rtk_rate = packet_in.rtk_rate;
4700  packet1.nsats = packet_in.nsats;
4701  packet1.baseline_coords_type = packet_in.baseline_coords_type;
4702 
4703 
4704 
4705  memset(&packet2, 0, sizeof(packet2));
4706  mavlink_msg_gps_rtk_encode(system_id, component_id, &msg, &packet1);
4707  mavlink_msg_gps_rtk_decode(&msg, &packet2);
4708  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4709 
4710  memset(&packet2, 0, sizeof(packet2));
4711  mavlink_msg_gps_rtk_pack(system_id, component_id, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4712  mavlink_msg_gps_rtk_decode(&msg, &packet2);
4713  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4714 
4715  memset(&packet2, 0, sizeof(packet2));
4716  mavlink_msg_gps_rtk_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4717  mavlink_msg_gps_rtk_decode(&msg, &packet2);
4718  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4719 
4720  memset(&packet2, 0, sizeof(packet2));
4721  mavlink_msg_to_send_buffer(buffer, &msg);
4722  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4723  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4724  }
4725  mavlink_msg_gps_rtk_decode(last_msg, &packet2);
4726  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4727 
4728  memset(&packet2, 0, sizeof(packet2));
4729  mavlink_msg_gps_rtk_send(MAVLINK_COMM_1 , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4730  mavlink_msg_gps_rtk_decode(last_msg, &packet2);
4731  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4732 }
4733 
4734 static void mavlink_test_gps2_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4735 {
4736  mavlink_message_t msg;
4737  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4738  uint16_t i;
4739  mavlink_gps2_rtk_t packet_in = {
4740  963497464,963497672,963497880,963498088,963498296,963498504,963498712,18691,223,34,101,168,235
4741  };
4742  mavlink_gps2_rtk_t packet1, packet2;
4743  memset(&packet1, 0, sizeof(packet1));
4744  packet1.time_last_baseline_ms = packet_in.time_last_baseline_ms;
4745  packet1.tow = packet_in.tow;
4746  packet1.baseline_a_mm = packet_in.baseline_a_mm;
4747  packet1.baseline_b_mm = packet_in.baseline_b_mm;
4748  packet1.baseline_c_mm = packet_in.baseline_c_mm;
4749  packet1.accuracy = packet_in.accuracy;
4750  packet1.iar_num_hypotheses = packet_in.iar_num_hypotheses;
4751  packet1.wn = packet_in.wn;
4752  packet1.rtk_receiver_id = packet_in.rtk_receiver_id;
4753  packet1.rtk_health = packet_in.rtk_health;
4754  packet1.rtk_rate = packet_in.rtk_rate;
4755  packet1.nsats = packet_in.nsats;
4756  packet1.baseline_coords_type = packet_in.baseline_coords_type;
4757 
4758 
4759 
4760  memset(&packet2, 0, sizeof(packet2));
4761  mavlink_msg_gps2_rtk_encode(system_id, component_id, &msg, &packet1);
4762  mavlink_msg_gps2_rtk_decode(&msg, &packet2);
4763  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4764 
4765  memset(&packet2, 0, sizeof(packet2));
4766  mavlink_msg_gps2_rtk_pack(system_id, component_id, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4767  mavlink_msg_gps2_rtk_decode(&msg, &packet2);
4768  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4769 
4770  memset(&packet2, 0, sizeof(packet2));
4771  mavlink_msg_gps2_rtk_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4772  mavlink_msg_gps2_rtk_decode(&msg, &packet2);
4773  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4774 
4775  memset(&packet2, 0, sizeof(packet2));
4776  mavlink_msg_to_send_buffer(buffer, &msg);
4777  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4778  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4779  }
4780  mavlink_msg_gps2_rtk_decode(last_msg, &packet2);
4781  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4782 
4783  memset(&packet2, 0, sizeof(packet2));
4784  mavlink_msg_gps2_rtk_send(MAVLINK_COMM_1 , packet1.time_last_baseline_ms , packet1.rtk_receiver_id , packet1.wn , packet1.tow , packet1.rtk_health , packet1.rtk_rate , packet1.nsats , packet1.baseline_coords_type , packet1.baseline_a_mm , packet1.baseline_b_mm , packet1.baseline_c_mm , packet1.accuracy , packet1.iar_num_hypotheses );
4785  mavlink_msg_gps2_rtk_decode(last_msg, &packet2);
4786  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4787 }
4788 
4789 static void mavlink_test_scaled_imu3(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4790 {
4791  mavlink_message_t msg;
4792  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4793  uint16_t i;
4794  mavlink_scaled_imu3_t packet_in = {
4795  963497464,17443,17547,17651,17755,17859,17963,18067,18171,18275
4796  };
4797  mavlink_scaled_imu3_t packet1, packet2;
4798  memset(&packet1, 0, sizeof(packet1));
4799  packet1.time_boot_ms = packet_in.time_boot_ms;
4800  packet1.xacc = packet_in.xacc;
4801  packet1.yacc = packet_in.yacc;
4802  packet1.zacc = packet_in.zacc;
4803  packet1.xgyro = packet_in.xgyro;
4804  packet1.ygyro = packet_in.ygyro;
4805  packet1.zgyro = packet_in.zgyro;
4806  packet1.xmag = packet_in.xmag;
4807  packet1.ymag = packet_in.ymag;
4808  packet1.zmag = packet_in.zmag;
4809 
4810 
4811 
4812  memset(&packet2, 0, sizeof(packet2));
4813  mavlink_msg_scaled_imu3_encode(system_id, component_id, &msg, &packet1);
4814  mavlink_msg_scaled_imu3_decode(&msg, &packet2);
4815  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4816 
4817  memset(&packet2, 0, sizeof(packet2));
4818  mavlink_msg_scaled_imu3_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4819  mavlink_msg_scaled_imu3_decode(&msg, &packet2);
4820  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4821 
4822  memset(&packet2, 0, sizeof(packet2));
4823  mavlink_msg_scaled_imu3_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4824  mavlink_msg_scaled_imu3_decode(&msg, &packet2);
4825  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4826 
4827  memset(&packet2, 0, sizeof(packet2));
4828  mavlink_msg_to_send_buffer(buffer, &msg);
4829  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4830  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4831  }
4832  mavlink_msg_scaled_imu3_decode(last_msg, &packet2);
4833  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4834 
4835  memset(&packet2, 0, sizeof(packet2));
4836  mavlink_msg_scaled_imu3_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.xacc , packet1.yacc , packet1.zacc , packet1.xgyro , packet1.ygyro , packet1.zgyro , packet1.xmag , packet1.ymag , packet1.zmag );
4837  mavlink_msg_scaled_imu3_decode(last_msg, &packet2);
4838  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4839 }
4840 
4841 static void mavlink_test_data_transmission_handshake(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4842 {
4843  mavlink_message_t msg;
4844  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4845  uint16_t i;
4847  963497464,17443,17547,17651,163,230,41
4848  };
4849  mavlink_data_transmission_handshake_t packet1, packet2;
4850  memset(&packet1, 0, sizeof(packet1));
4851  packet1.size = packet_in.size;
4852  packet1.width = packet_in.width;
4853  packet1.height = packet_in.height;
4854  packet1.packets = packet_in.packets;
4855  packet1.type = packet_in.type;
4856  packet1.payload = packet_in.payload;
4857  packet1.jpg_quality = packet_in.jpg_quality;
4858 
4859 
4860 
4861  memset(&packet2, 0, sizeof(packet2));
4862  mavlink_msg_data_transmission_handshake_encode(system_id, component_id, &msg, &packet1);
4864  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4865 
4866  memset(&packet2, 0, sizeof(packet2));
4867  mavlink_msg_data_transmission_handshake_pack(system_id, component_id, &msg , packet1.type , packet1.size , packet1.width , packet1.height , packet1.packets , packet1.payload , packet1.jpg_quality );
4869  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4870 
4871  memset(&packet2, 0, sizeof(packet2));
4872  mavlink_msg_data_transmission_handshake_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.type , packet1.size , packet1.width , packet1.height , packet1.packets , packet1.payload , packet1.jpg_quality );
4874  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4875 
4876  memset(&packet2, 0, sizeof(packet2));
4877  mavlink_msg_to_send_buffer(buffer, &msg);
4878  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4879  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4880  }
4882  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4883 
4884  memset(&packet2, 0, sizeof(packet2));
4885  mavlink_msg_data_transmission_handshake_send(MAVLINK_COMM_1 , packet1.type , packet1.size , packet1.width , packet1.height , packet1.packets , packet1.payload , packet1.jpg_quality );
4887  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4888 }
4889 
4890 static void mavlink_test_encapsulated_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4891 {
4892  mavlink_message_t msg;
4893  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4894  uint16_t i;
4895  mavlink_encapsulated_data_t packet_in = {
4896  17235,{ 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, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 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, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 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, 132, 133, 134, 135 }
4897  };
4898  mavlink_encapsulated_data_t packet1, packet2;
4899  memset(&packet1, 0, sizeof(packet1));
4900  packet1.seqnr = packet_in.seqnr;
4901 
4902  mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*253);
4903 
4904 
4905  memset(&packet2, 0, sizeof(packet2));
4906  mavlink_msg_encapsulated_data_encode(system_id, component_id, &msg, &packet1);
4907  mavlink_msg_encapsulated_data_decode(&msg, &packet2);
4908  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4909 
4910  memset(&packet2, 0, sizeof(packet2));
4911  mavlink_msg_encapsulated_data_pack(system_id, component_id, &msg , packet1.seqnr , packet1.data );
4912  mavlink_msg_encapsulated_data_decode(&msg, &packet2);
4913  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4914 
4915  memset(&packet2, 0, sizeof(packet2));
4916  mavlink_msg_encapsulated_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seqnr , packet1.data );
4917  mavlink_msg_encapsulated_data_decode(&msg, &packet2);
4918  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4919 
4920  memset(&packet2, 0, sizeof(packet2));
4921  mavlink_msg_to_send_buffer(buffer, &msg);
4922  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4923  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4924  }
4925  mavlink_msg_encapsulated_data_decode(last_msg, &packet2);
4926  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4927 
4928  memset(&packet2, 0, sizeof(packet2));
4929  mavlink_msg_encapsulated_data_send(MAVLINK_COMM_1 , packet1.seqnr , packet1.data );
4930  mavlink_msg_encapsulated_data_decode(last_msg, &packet2);
4931  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4932 }
4933 
4934 static void mavlink_test_distance_sensor(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4935 {
4936  mavlink_message_t msg;
4937  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4938  uint16_t i;
4939  mavlink_distance_sensor_t packet_in = {
4940  963497464,17443,17547,17651,163,230,41,108
4941  };
4942  mavlink_distance_sensor_t packet1, packet2;
4943  memset(&packet1, 0, sizeof(packet1));
4944  packet1.time_boot_ms = packet_in.time_boot_ms;
4945  packet1.min_distance = packet_in.min_distance;
4946  packet1.max_distance = packet_in.max_distance;
4947  packet1.current_distance = packet_in.current_distance;
4948  packet1.type = packet_in.type;
4949  packet1.id = packet_in.id;
4950  packet1.orientation = packet_in.orientation;
4951  packet1.covariance = packet_in.covariance;
4952 
4953 
4954 
4955  memset(&packet2, 0, sizeof(packet2));
4956  mavlink_msg_distance_sensor_encode(system_id, component_id, &msg, &packet1);
4957  mavlink_msg_distance_sensor_decode(&msg, &packet2);
4958  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4959 
4960  memset(&packet2, 0, sizeof(packet2));
4961  mavlink_msg_distance_sensor_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.min_distance , packet1.max_distance , packet1.current_distance , packet1.type , packet1.id , packet1.orientation , packet1.covariance );
4962  mavlink_msg_distance_sensor_decode(&msg, &packet2);
4963  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4964 
4965  memset(&packet2, 0, sizeof(packet2));
4966  mavlink_msg_distance_sensor_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.min_distance , packet1.max_distance , packet1.current_distance , packet1.type , packet1.id , packet1.orientation , packet1.covariance );
4967  mavlink_msg_distance_sensor_decode(&msg, &packet2);
4968  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4969 
4970  memset(&packet2, 0, sizeof(packet2));
4971  mavlink_msg_to_send_buffer(buffer, &msg);
4972  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
4973  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
4974  }
4975  mavlink_msg_distance_sensor_decode(last_msg, &packet2);
4976  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4977 
4978  memset(&packet2, 0, sizeof(packet2));
4979  mavlink_msg_distance_sensor_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.min_distance , packet1.max_distance , packet1.current_distance , packet1.type , packet1.id , packet1.orientation , packet1.covariance );
4980  mavlink_msg_distance_sensor_decode(last_msg, &packet2);
4981  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
4982 }
4983 
4984 static void mavlink_test_terrain_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
4985 {
4986  mavlink_message_t msg;
4987  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
4988  uint16_t i;
4989  mavlink_terrain_request_t packet_in = {
4990  93372036854775807ULL,963497880,963498088,18067
4991  };
4992  mavlink_terrain_request_t packet1, packet2;
4993  memset(&packet1, 0, sizeof(packet1));
4994  packet1.mask = packet_in.mask;
4995  packet1.lat = packet_in.lat;
4996  packet1.lon = packet_in.lon;
4997  packet1.grid_spacing = packet_in.grid_spacing;
4998 
4999 
5000 
5001  memset(&packet2, 0, sizeof(packet2));
5002  mavlink_msg_terrain_request_encode(system_id, component_id, &msg, &packet1);
5003  mavlink_msg_terrain_request_decode(&msg, &packet2);
5004  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5005 
5006  memset(&packet2, 0, sizeof(packet2));
5007  mavlink_msg_terrain_request_pack(system_id, component_id, &msg , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.mask );
5008  mavlink_msg_terrain_request_decode(&msg, &packet2);
5009  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5010 
5011  memset(&packet2, 0, sizeof(packet2));
5012  mavlink_msg_terrain_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.mask );
5013  mavlink_msg_terrain_request_decode(&msg, &packet2);
5014  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5015 
5016  memset(&packet2, 0, sizeof(packet2));
5017  mavlink_msg_to_send_buffer(buffer, &msg);
5018  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5019  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5020  }
5021  mavlink_msg_terrain_request_decode(last_msg, &packet2);
5022  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5023 
5024  memset(&packet2, 0, sizeof(packet2));
5025  mavlink_msg_terrain_request_send(MAVLINK_COMM_1 , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.mask );
5026  mavlink_msg_terrain_request_decode(last_msg, &packet2);
5027  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5028 }
5029 
5030 static void mavlink_test_terrain_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5031 {
5032  mavlink_message_t msg;
5033  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5034  uint16_t i;
5035  mavlink_terrain_data_t packet_in = {
5036  963497464,963497672,17651,{ 17755, 17756, 17757, 17758, 17759, 17760, 17761, 17762, 17763, 17764, 17765, 17766, 17767, 17768, 17769, 17770 },3
5037  };
5038  mavlink_terrain_data_t packet1, packet2;
5039  memset(&packet1, 0, sizeof(packet1));
5040  packet1.lat = packet_in.lat;
5041  packet1.lon = packet_in.lon;
5042  packet1.grid_spacing = packet_in.grid_spacing;
5043  packet1.gridbit = packet_in.gridbit;
5044 
5045  mav_array_memcpy(packet1.data, packet_in.data, sizeof(int16_t)*16);
5046 
5047 
5048  memset(&packet2, 0, sizeof(packet2));
5049  mavlink_msg_terrain_data_encode(system_id, component_id, &msg, &packet1);
5050  mavlink_msg_terrain_data_decode(&msg, &packet2);
5051  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5052 
5053  memset(&packet2, 0, sizeof(packet2));
5054  mavlink_msg_terrain_data_pack(system_id, component_id, &msg , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.gridbit , packet1.data );
5055  mavlink_msg_terrain_data_decode(&msg, &packet2);
5056  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5057 
5058  memset(&packet2, 0, sizeof(packet2));
5059  mavlink_msg_terrain_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.gridbit , packet1.data );
5060  mavlink_msg_terrain_data_decode(&msg, &packet2);
5061  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5062 
5063  memset(&packet2, 0, sizeof(packet2));
5064  mavlink_msg_to_send_buffer(buffer, &msg);
5065  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5066  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5067  }
5068  mavlink_msg_terrain_data_decode(last_msg, &packet2);
5069  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5070 
5071  memset(&packet2, 0, sizeof(packet2));
5072  mavlink_msg_terrain_data_send(MAVLINK_COMM_1 , packet1.lat , packet1.lon , packet1.grid_spacing , packet1.gridbit , packet1.data );
5073  mavlink_msg_terrain_data_decode(last_msg, &packet2);
5074  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5075 }
5076 
5077 static void mavlink_test_terrain_check(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5078 {
5079  mavlink_message_t msg;
5080  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5081  uint16_t i;
5082  mavlink_terrain_check_t packet_in = {
5083  963497464,963497672
5084  };
5085  mavlink_terrain_check_t packet1, packet2;
5086  memset(&packet1, 0, sizeof(packet1));
5087  packet1.lat = packet_in.lat;
5088  packet1.lon = packet_in.lon;
5089 
5090 
5091 
5092  memset(&packet2, 0, sizeof(packet2));
5093  mavlink_msg_terrain_check_encode(system_id, component_id, &msg, &packet1);
5094  mavlink_msg_terrain_check_decode(&msg, &packet2);
5095  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5096 
5097  memset(&packet2, 0, sizeof(packet2));
5098  mavlink_msg_terrain_check_pack(system_id, component_id, &msg , packet1.lat , packet1.lon );
5099  mavlink_msg_terrain_check_decode(&msg, &packet2);
5100  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5101 
5102  memset(&packet2, 0, sizeof(packet2));
5103  mavlink_msg_terrain_check_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.lat , packet1.lon );
5104  mavlink_msg_terrain_check_decode(&msg, &packet2);
5105  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5106 
5107  memset(&packet2, 0, sizeof(packet2));
5108  mavlink_msg_to_send_buffer(buffer, &msg);
5109  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5110  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5111  }
5112  mavlink_msg_terrain_check_decode(last_msg, &packet2);
5113  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5114 
5115  memset(&packet2, 0, sizeof(packet2));
5116  mavlink_msg_terrain_check_send(MAVLINK_COMM_1 , packet1.lat , packet1.lon );
5117  mavlink_msg_terrain_check_decode(last_msg, &packet2);
5118  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5119 }
5120 
5121 static void mavlink_test_terrain_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5122 {
5123  mavlink_message_t msg;
5124  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5125  uint16_t i;
5126  mavlink_terrain_report_t packet_in = {
5127  963497464,963497672,73.0,101.0,18067,18171,18275
5128  };
5129  mavlink_terrain_report_t packet1, packet2;
5130  memset(&packet1, 0, sizeof(packet1));
5131  packet1.lat = packet_in.lat;
5132  packet1.lon = packet_in.lon;
5133  packet1.terrain_height = packet_in.terrain_height;
5134  packet1.current_height = packet_in.current_height;
5135  packet1.spacing = packet_in.spacing;
5136  packet1.pending = packet_in.pending;
5137  packet1.loaded = packet_in.loaded;
5138 
5139 
5140 
5141  memset(&packet2, 0, sizeof(packet2));
5142  mavlink_msg_terrain_report_encode(system_id, component_id, &msg, &packet1);
5143  mavlink_msg_terrain_report_decode(&msg, &packet2);
5144  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5145 
5146  memset(&packet2, 0, sizeof(packet2));
5147  mavlink_msg_terrain_report_pack(system_id, component_id, &msg , packet1.lat , packet1.lon , packet1.spacing , packet1.terrain_height , packet1.current_height , packet1.pending , packet1.loaded );
5148  mavlink_msg_terrain_report_decode(&msg, &packet2);
5149  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5150 
5151  memset(&packet2, 0, sizeof(packet2));
5152  mavlink_msg_terrain_report_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.lat , packet1.lon , packet1.spacing , packet1.terrain_height , packet1.current_height , packet1.pending , packet1.loaded );
5153  mavlink_msg_terrain_report_decode(&msg, &packet2);
5154  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5155 
5156  memset(&packet2, 0, sizeof(packet2));
5157  mavlink_msg_to_send_buffer(buffer, &msg);
5158  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5159  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5160  }
5161  mavlink_msg_terrain_report_decode(last_msg, &packet2);
5162  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5163 
5164  memset(&packet2, 0, sizeof(packet2));
5165  mavlink_msg_terrain_report_send(MAVLINK_COMM_1 , packet1.lat , packet1.lon , packet1.spacing , packet1.terrain_height , packet1.current_height , packet1.pending , packet1.loaded );
5166  mavlink_msg_terrain_report_decode(last_msg, &packet2);
5167  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5168 }
5169 
5170 static void mavlink_test_scaled_pressure2(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5171 {
5172  mavlink_message_t msg;
5173  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5174  uint16_t i;
5175  mavlink_scaled_pressure2_t packet_in = {
5176  963497464,45.0,73.0,17859
5177  };
5178  mavlink_scaled_pressure2_t packet1, packet2;
5179  memset(&packet1, 0, sizeof(packet1));
5180  packet1.time_boot_ms = packet_in.time_boot_ms;
5181  packet1.press_abs = packet_in.press_abs;
5182  packet1.press_diff = packet_in.press_diff;
5183  packet1.temperature = packet_in.temperature;
5184 
5185 
5186 
5187  memset(&packet2, 0, sizeof(packet2));
5188  mavlink_msg_scaled_pressure2_encode(system_id, component_id, &msg, &packet1);
5189  mavlink_msg_scaled_pressure2_decode(&msg, &packet2);
5190  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5191 
5192  memset(&packet2, 0, sizeof(packet2));
5193  mavlink_msg_scaled_pressure2_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5194  mavlink_msg_scaled_pressure2_decode(&msg, &packet2);
5195  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5196 
5197  memset(&packet2, 0, sizeof(packet2));
5198  mavlink_msg_scaled_pressure2_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5199  mavlink_msg_scaled_pressure2_decode(&msg, &packet2);
5200  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5201 
5202  memset(&packet2, 0, sizeof(packet2));
5203  mavlink_msg_to_send_buffer(buffer, &msg);
5204  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5205  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5206  }
5207  mavlink_msg_scaled_pressure2_decode(last_msg, &packet2);
5208  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5209 
5210  memset(&packet2, 0, sizeof(packet2));
5211  mavlink_msg_scaled_pressure2_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5212  mavlink_msg_scaled_pressure2_decode(last_msg, &packet2);
5213  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5214 }
5215 
5216 static void mavlink_test_att_pos_mocap(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5217 {
5218  mavlink_message_t msg;
5219  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5220  uint16_t i;
5221  mavlink_att_pos_mocap_t packet_in = {
5222  93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0 },185.0,213.0,241.0
5223  };
5224  mavlink_att_pos_mocap_t packet1, packet2;
5225  memset(&packet1, 0, sizeof(packet1));
5226  packet1.time_usec = packet_in.time_usec;
5227  packet1.x = packet_in.x;
5228  packet1.y = packet_in.y;
5229  packet1.z = packet_in.z;
5230 
5231  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
5232 
5233 
5234  memset(&packet2, 0, sizeof(packet2));
5235  mavlink_msg_att_pos_mocap_encode(system_id, component_id, &msg, &packet1);
5236  mavlink_msg_att_pos_mocap_decode(&msg, &packet2);
5237  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5238 
5239  memset(&packet2, 0, sizeof(packet2));
5240  mavlink_msg_att_pos_mocap_pack(system_id, component_id, &msg , packet1.time_usec , packet1.q , packet1.x , packet1.y , packet1.z );
5241  mavlink_msg_att_pos_mocap_decode(&msg, &packet2);
5242  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5243 
5244  memset(&packet2, 0, sizeof(packet2));
5245  mavlink_msg_att_pos_mocap_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.q , packet1.x , packet1.y , packet1.z );
5246  mavlink_msg_att_pos_mocap_decode(&msg, &packet2);
5247  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5248 
5249  memset(&packet2, 0, sizeof(packet2));
5250  mavlink_msg_to_send_buffer(buffer, &msg);
5251  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5252  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5253  }
5254  mavlink_msg_att_pos_mocap_decode(last_msg, &packet2);
5255  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5256 
5257  memset(&packet2, 0, sizeof(packet2));
5258  mavlink_msg_att_pos_mocap_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.q , packet1.x , packet1.y , packet1.z );
5259  mavlink_msg_att_pos_mocap_decode(last_msg, &packet2);
5260  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5261 }
5262 
5263 static void mavlink_test_set_actuator_control_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5264 {
5265  mavlink_message_t msg;
5266  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5267  uint16_t i;
5269  93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0 },125,192,3
5270  };
5271  mavlink_set_actuator_control_target_t packet1, packet2;
5272  memset(&packet1, 0, sizeof(packet1));
5273  packet1.time_usec = packet_in.time_usec;
5274  packet1.group_mlx = packet_in.group_mlx;
5275  packet1.target_system = packet_in.target_system;
5276  packet1.target_component = packet_in.target_component;
5277 
5278  mav_array_memcpy(packet1.controls, packet_in.controls, sizeof(float)*8);
5279 
5280 
5281  memset(&packet2, 0, sizeof(packet2));
5282  mavlink_msg_set_actuator_control_target_encode(system_id, component_id, &msg, &packet1);
5284  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5285 
5286  memset(&packet2, 0, sizeof(packet2));
5287  mavlink_msg_set_actuator_control_target_pack(system_id, component_id, &msg , packet1.time_usec , packet1.group_mlx , packet1.target_system , packet1.target_component , packet1.controls );
5289  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5290 
5291  memset(&packet2, 0, sizeof(packet2));
5292  mavlink_msg_set_actuator_control_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.group_mlx , packet1.target_system , packet1.target_component , packet1.controls );
5294  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5295 
5296  memset(&packet2, 0, sizeof(packet2));
5297  mavlink_msg_to_send_buffer(buffer, &msg);
5298  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5299  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5300  }
5302  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5303 
5304  memset(&packet2, 0, sizeof(packet2));
5305  mavlink_msg_set_actuator_control_target_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.group_mlx , packet1.target_system , packet1.target_component , packet1.controls );
5307  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5308 }
5309 
5310 static void mavlink_test_actuator_control_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5311 {
5312  mavlink_message_t msg;
5313  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5314  uint16_t i;
5315  mavlink_actuator_control_target_t packet_in = {
5316  93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0 },125
5317  };
5318  mavlink_actuator_control_target_t packet1, packet2;
5319  memset(&packet1, 0, sizeof(packet1));
5320  packet1.time_usec = packet_in.time_usec;
5321  packet1.group_mlx = packet_in.group_mlx;
5322 
5323  mav_array_memcpy(packet1.controls, packet_in.controls, sizeof(float)*8);
5324 
5325 
5326  memset(&packet2, 0, sizeof(packet2));
5327  mavlink_msg_actuator_control_target_encode(system_id, component_id, &msg, &packet1);
5329  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5330 
5331  memset(&packet2, 0, sizeof(packet2));
5332  mavlink_msg_actuator_control_target_pack(system_id, component_id, &msg , packet1.time_usec , packet1.group_mlx , packet1.controls );
5334  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5335 
5336  memset(&packet2, 0, sizeof(packet2));
5337  mavlink_msg_actuator_control_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.group_mlx , packet1.controls );
5339  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5340 
5341  memset(&packet2, 0, sizeof(packet2));
5342  mavlink_msg_to_send_buffer(buffer, &msg);
5343  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5344  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5345  }
5346  mavlink_msg_actuator_control_target_decode(last_msg, &packet2);
5347  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5348 
5349  memset(&packet2, 0, sizeof(packet2));
5350  mavlink_msg_actuator_control_target_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.group_mlx , packet1.controls );
5351  mavlink_msg_actuator_control_target_decode(last_msg, &packet2);
5352  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5353 }
5354 
5355 static void mavlink_test_altitude(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5356 {
5357  mavlink_message_t msg;
5358  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5359  uint16_t i;
5360  mavlink_altitude_t packet_in = {
5361  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0
5362  };
5363  mavlink_altitude_t packet1, packet2;
5364  memset(&packet1, 0, sizeof(packet1));
5365  packet1.time_usec = packet_in.time_usec;
5366  packet1.altitude_monotonic = packet_in.altitude_monotonic;
5367  packet1.altitude_amsl = packet_in.altitude_amsl;
5368  packet1.altitude_local = packet_in.altitude_local;
5369  packet1.altitude_relative = packet_in.altitude_relative;
5370  packet1.altitude_terrain = packet_in.altitude_terrain;
5371  packet1.bottom_clearance = packet_in.bottom_clearance;
5372 
5373 
5374 
5375  memset(&packet2, 0, sizeof(packet2));
5376  mavlink_msg_altitude_encode(system_id, component_id, &msg, &packet1);
5377  mavlink_msg_altitude_decode(&msg, &packet2);
5378  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5379 
5380  memset(&packet2, 0, sizeof(packet2));
5381  mavlink_msg_altitude_pack(system_id, component_id, &msg , packet1.time_usec , packet1.altitude_monotonic , packet1.altitude_amsl , packet1.altitude_local , packet1.altitude_relative , packet1.altitude_terrain , packet1.bottom_clearance );
5382  mavlink_msg_altitude_decode(&msg, &packet2);
5383  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5384 
5385  memset(&packet2, 0, sizeof(packet2));
5386  mavlink_msg_altitude_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.altitude_monotonic , packet1.altitude_amsl , packet1.altitude_local , packet1.altitude_relative , packet1.altitude_terrain , packet1.bottom_clearance );
5387  mavlink_msg_altitude_decode(&msg, &packet2);
5388  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5389 
5390  memset(&packet2, 0, sizeof(packet2));
5391  mavlink_msg_to_send_buffer(buffer, &msg);
5392  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5393  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5394  }
5395  mavlink_msg_altitude_decode(last_msg, &packet2);
5396  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5397 
5398  memset(&packet2, 0, sizeof(packet2));
5399  mavlink_msg_altitude_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.altitude_monotonic , packet1.altitude_amsl , packet1.altitude_local , packet1.altitude_relative , packet1.altitude_terrain , packet1.bottom_clearance );
5400  mavlink_msg_altitude_decode(last_msg, &packet2);
5401  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5402 }
5403 
5404 static void mavlink_test_resource_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5405 {
5406  mavlink_message_t msg;
5407  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5408  uint16_t i;
5409  mavlink_resource_request_t packet_in = {
5410  5,72,{ 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, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2 },243,{ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 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, 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 }
5411  };
5412  mavlink_resource_request_t packet1, packet2;
5413  memset(&packet1, 0, sizeof(packet1));
5414  packet1.request_id = packet_in.request_id;
5415  packet1.uri_type = packet_in.uri_type;
5416  packet1.transfer_type = packet_in.transfer_type;
5417 
5418  mav_array_memcpy(packet1.uri, packet_in.uri, sizeof(uint8_t)*120);
5419  mav_array_memcpy(packet1.storage, packet_in.storage, sizeof(uint8_t)*120);
5420 
5421 
5422  memset(&packet2, 0, sizeof(packet2));
5423  mavlink_msg_resource_request_encode(system_id, component_id, &msg, &packet1);
5424  mavlink_msg_resource_request_decode(&msg, &packet2);
5425  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5426 
5427  memset(&packet2, 0, sizeof(packet2));
5428  mavlink_msg_resource_request_pack(system_id, component_id, &msg , packet1.request_id , packet1.uri_type , packet1.uri , packet1.transfer_type , packet1.storage );
5429  mavlink_msg_resource_request_decode(&msg, &packet2);
5430  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5431 
5432  memset(&packet2, 0, sizeof(packet2));
5433  mavlink_msg_resource_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.request_id , packet1.uri_type , packet1.uri , packet1.transfer_type , packet1.storage );
5434  mavlink_msg_resource_request_decode(&msg, &packet2);
5435  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5436 
5437  memset(&packet2, 0, sizeof(packet2));
5438  mavlink_msg_to_send_buffer(buffer, &msg);
5439  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5440  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5441  }
5442  mavlink_msg_resource_request_decode(last_msg, &packet2);
5443  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5444 
5445  memset(&packet2, 0, sizeof(packet2));
5446  mavlink_msg_resource_request_send(MAVLINK_COMM_1 , packet1.request_id , packet1.uri_type , packet1.uri , packet1.transfer_type , packet1.storage );
5447  mavlink_msg_resource_request_decode(last_msg, &packet2);
5448  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5449 }
5450 
5451 static void mavlink_test_scaled_pressure3(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5452 {
5453  mavlink_message_t msg;
5454  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5455  uint16_t i;
5456  mavlink_scaled_pressure3_t packet_in = {
5457  963497464,45.0,73.0,17859
5458  };
5459  mavlink_scaled_pressure3_t packet1, packet2;
5460  memset(&packet1, 0, sizeof(packet1));
5461  packet1.time_boot_ms = packet_in.time_boot_ms;
5462  packet1.press_abs = packet_in.press_abs;
5463  packet1.press_diff = packet_in.press_diff;
5464  packet1.temperature = packet_in.temperature;
5465 
5466 
5467 
5468  memset(&packet2, 0, sizeof(packet2));
5469  mavlink_msg_scaled_pressure3_encode(system_id, component_id, &msg, &packet1);
5470  mavlink_msg_scaled_pressure3_decode(&msg, &packet2);
5471  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5472 
5473  memset(&packet2, 0, sizeof(packet2));
5474  mavlink_msg_scaled_pressure3_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5475  mavlink_msg_scaled_pressure3_decode(&msg, &packet2);
5476  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5477 
5478  memset(&packet2, 0, sizeof(packet2));
5479  mavlink_msg_scaled_pressure3_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5480  mavlink_msg_scaled_pressure3_decode(&msg, &packet2);
5481  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5482 
5483  memset(&packet2, 0, sizeof(packet2));
5484  mavlink_msg_to_send_buffer(buffer, &msg);
5485  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5486  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5487  }
5488  mavlink_msg_scaled_pressure3_decode(last_msg, &packet2);
5489  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5490 
5491  memset(&packet2, 0, sizeof(packet2));
5492  mavlink_msg_scaled_pressure3_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.press_abs , packet1.press_diff , packet1.temperature );
5493  mavlink_msg_scaled_pressure3_decode(last_msg, &packet2);
5494  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5495 }
5496 
5497 static void mavlink_test_follow_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5498 {
5499  mavlink_message_t msg;
5500  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5501  uint16_t i;
5502  mavlink_follow_target_t packet_in = {
5503  93372036854775807ULL,93372036854776311ULL,963498296,963498504,185.0,{ 213.0, 214.0, 215.0 },{ 297.0, 298.0, 299.0 },{ 381.0, 382.0, 383.0, 384.0 },{ 493.0, 494.0, 495.0 },{ 577.0, 578.0, 579.0 },25
5504  };
5505  mavlink_follow_target_t packet1, packet2;
5506  memset(&packet1, 0, sizeof(packet1));
5507  packet1.timestamp = packet_in.timestamp;
5508  packet1.custom_state = packet_in.custom_state;
5509  packet1.lat = packet_in.lat;
5510  packet1.lon = packet_in.lon;
5511  packet1.alt = packet_in.alt;
5512  packet1.est_capabilities = packet_in.est_capabilities;
5513 
5514  mav_array_memcpy(packet1.vel, packet_in.vel, sizeof(float)*3);
5515  mav_array_memcpy(packet1.acc, packet_in.acc, sizeof(float)*3);
5516  mav_array_memcpy(packet1.attitude_q, packet_in.attitude_q, sizeof(float)*4);
5517  mav_array_memcpy(packet1.rates, packet_in.rates, sizeof(float)*3);
5518  mav_array_memcpy(packet1.position_cov, packet_in.position_cov, sizeof(float)*3);
5519 
5520 
5521  memset(&packet2, 0, sizeof(packet2));
5522  mavlink_msg_follow_target_encode(system_id, component_id, &msg, &packet1);
5523  mavlink_msg_follow_target_decode(&msg, &packet2);
5524  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5525 
5526  memset(&packet2, 0, sizeof(packet2));
5527  mavlink_msg_follow_target_pack(system_id, component_id, &msg , packet1.timestamp , packet1.est_capabilities , packet1.lat , packet1.lon , packet1.alt , packet1.vel , packet1.acc , packet1.attitude_q , packet1.rates , packet1.position_cov , packet1.custom_state );
5528  mavlink_msg_follow_target_decode(&msg, &packet2);
5529  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5530 
5531  memset(&packet2, 0, sizeof(packet2));
5532  mavlink_msg_follow_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.est_capabilities , packet1.lat , packet1.lon , packet1.alt , packet1.vel , packet1.acc , packet1.attitude_q , packet1.rates , packet1.position_cov , packet1.custom_state );
5533  mavlink_msg_follow_target_decode(&msg, &packet2);
5534  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5535 
5536  memset(&packet2, 0, sizeof(packet2));
5537  mavlink_msg_to_send_buffer(buffer, &msg);
5538  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5539  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5540  }
5541  mavlink_msg_follow_target_decode(last_msg, &packet2);
5542  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5543 
5544  memset(&packet2, 0, sizeof(packet2));
5545  mavlink_msg_follow_target_send(MAVLINK_COMM_1 , packet1.timestamp , packet1.est_capabilities , packet1.lat , packet1.lon , packet1.alt , packet1.vel , packet1.acc , packet1.attitude_q , packet1.rates , packet1.position_cov , packet1.custom_state );
5546  mavlink_msg_follow_target_decode(last_msg, &packet2);
5547  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5548 }
5549 
5550 static void mavlink_test_control_system_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5551 {
5552  mavlink_message_t msg;
5553  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5554  uint16_t i;
5555  mavlink_control_system_state_t packet_in = {
5556  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,297.0,325.0,{ 353.0, 354.0, 355.0 },{ 437.0, 438.0, 439.0 },{ 521.0, 522.0, 523.0, 524.0 },633.0,661.0,689.0
5557  };
5558  mavlink_control_system_state_t packet1, packet2;
5559  memset(&packet1, 0, sizeof(packet1));
5560  packet1.time_usec = packet_in.time_usec;
5561  packet1.x_acc = packet_in.x_acc;
5562  packet1.y_acc = packet_in.y_acc;
5563  packet1.z_acc = packet_in.z_acc;
5564  packet1.x_vel = packet_in.x_vel;
5565  packet1.y_vel = packet_in.y_vel;
5566  packet1.z_vel = packet_in.z_vel;
5567  packet1.x_pos = packet_in.x_pos;
5568  packet1.y_pos = packet_in.y_pos;
5569  packet1.z_pos = packet_in.z_pos;
5570  packet1.airspeed = packet_in.airspeed;
5571  packet1.roll_rate = packet_in.roll_rate;
5572  packet1.pitch_rate = packet_in.pitch_rate;
5573  packet1.yaw_rate = packet_in.yaw_rate;
5574 
5575  mav_array_memcpy(packet1.vel_variance, packet_in.vel_variance, sizeof(float)*3);
5576  mav_array_memcpy(packet1.pos_variance, packet_in.pos_variance, sizeof(float)*3);
5577  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
5578 
5579 
5580  memset(&packet2, 0, sizeof(packet2));
5581  mavlink_msg_control_system_state_encode(system_id, component_id, &msg, &packet1);
5583  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5584 
5585  memset(&packet2, 0, sizeof(packet2));
5586  mavlink_msg_control_system_state_pack(system_id, component_id, &msg , packet1.time_usec , packet1.x_acc , packet1.y_acc , packet1.z_acc , packet1.x_vel , packet1.y_vel , packet1.z_vel , packet1.x_pos , packet1.y_pos , packet1.z_pos , packet1.airspeed , packet1.vel_variance , packet1.pos_variance , packet1.q , packet1.roll_rate , packet1.pitch_rate , packet1.yaw_rate );
5588  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5589 
5590  memset(&packet2, 0, sizeof(packet2));
5591  mavlink_msg_control_system_state_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.x_acc , packet1.y_acc , packet1.z_acc , packet1.x_vel , packet1.y_vel , packet1.z_vel , packet1.x_pos , packet1.y_pos , packet1.z_pos , packet1.airspeed , packet1.vel_variance , packet1.pos_variance , packet1.q , packet1.roll_rate , packet1.pitch_rate , packet1.yaw_rate );
5593  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5594 
5595  memset(&packet2, 0, sizeof(packet2));
5596  mavlink_msg_to_send_buffer(buffer, &msg);
5597  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5598  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5599  }
5600  mavlink_msg_control_system_state_decode(last_msg, &packet2);
5601  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5602 
5603  memset(&packet2, 0, sizeof(packet2));
5604  mavlink_msg_control_system_state_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.x_acc , packet1.y_acc , packet1.z_acc , packet1.x_vel , packet1.y_vel , packet1.z_vel , packet1.x_pos , packet1.y_pos , packet1.z_pos , packet1.airspeed , packet1.vel_variance , packet1.pos_variance , packet1.q , packet1.roll_rate , packet1.pitch_rate , packet1.yaw_rate );
5605  mavlink_msg_control_system_state_decode(last_msg, &packet2);
5606  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5607 }
5608 
5609 static void mavlink_test_battery_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5610 {
5611  mavlink_message_t msg;
5612  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5613  uint16_t i;
5614  mavlink_battery_status_t packet_in = {
5615  963497464,963497672,17651,{ 17755, 17756, 17757, 17758, 17759, 17760, 17761, 17762, 17763, 17764 },18795,101,168,235,46
5616  };
5617  mavlink_battery_status_t packet1, packet2;
5618  memset(&packet1, 0, sizeof(packet1));
5619  packet1.current_consumed = packet_in.current_consumed;
5620  packet1.energy_consumed = packet_in.energy_consumed;
5621  packet1.temperature = packet_in.temperature;
5622  packet1.current_battery = packet_in.current_battery;
5623  packet1.id = packet_in.id;
5624  packet1.battery_function = packet_in.battery_function;
5625  packet1.type = packet_in.type;
5626  packet1.battery_remaining = packet_in.battery_remaining;
5627 
5628  mav_array_memcpy(packet1.voltages, packet_in.voltages, sizeof(uint16_t)*10);
5629 
5630 
5631  memset(&packet2, 0, sizeof(packet2));
5632  mavlink_msg_battery_status_encode(system_id, component_id, &msg, &packet1);
5633  mavlink_msg_battery_status_decode(&msg, &packet2);
5634  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5635 
5636  memset(&packet2, 0, sizeof(packet2));
5637  mavlink_msg_battery_status_pack(system_id, component_id, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.temperature , packet1.voltages , packet1.current_battery , packet1.current_consumed , packet1.energy_consumed , packet1.battery_remaining );
5638  mavlink_msg_battery_status_decode(&msg, &packet2);
5639  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5640 
5641  memset(&packet2, 0, sizeof(packet2));
5642  mavlink_msg_battery_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.temperature , packet1.voltages , packet1.current_battery , packet1.current_consumed , packet1.energy_consumed , packet1.battery_remaining );
5643  mavlink_msg_battery_status_decode(&msg, &packet2);
5644  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5645 
5646  memset(&packet2, 0, sizeof(packet2));
5647  mavlink_msg_to_send_buffer(buffer, &msg);
5648  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5649  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5650  }
5651  mavlink_msg_battery_status_decode(last_msg, &packet2);
5652  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5653 
5654  memset(&packet2, 0, sizeof(packet2));
5655  mavlink_msg_battery_status_send(MAVLINK_COMM_1 , packet1.id , packet1.battery_function , packet1.type , packet1.temperature , packet1.voltages , packet1.current_battery , packet1.current_consumed , packet1.energy_consumed , packet1.battery_remaining );
5656  mavlink_msg_battery_status_decode(last_msg, &packet2);
5657  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5658 }
5659 
5660 static void mavlink_test_autopilot_version(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5661 {
5662  mavlink_message_t msg;
5663  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5664  uint16_t i;
5665  mavlink_autopilot_version_t packet_in = {
5666  93372036854775807ULL,93372036854776311ULL,963498296,963498504,963498712,963498920,18899,19003,{ 113, 114, 115, 116, 117, 118, 119, 120 },{ 137, 138, 139, 140, 141, 142, 143, 144 },{ 161, 162, 163, 164, 165, 166, 167, 168 }
5667  };
5668  mavlink_autopilot_version_t packet1, packet2;
5669  memset(&packet1, 0, sizeof(packet1));
5670  packet1.capabilities = packet_in.capabilities;
5671  packet1.uid = packet_in.uid;
5672  packet1.flight_sw_version = packet_in.flight_sw_version;
5673  packet1.middleware_sw_version = packet_in.middleware_sw_version;
5674  packet1.os_sw_version = packet_in.os_sw_version;
5675  packet1.board_version = packet_in.board_version;
5676  packet1.vendor_id = packet_in.vendor_id;
5677  packet1.product_id = packet_in.product_id;
5678 
5679  mav_array_memcpy(packet1.flight_custom_version, packet_in.flight_custom_version, sizeof(uint8_t)*8);
5680  mav_array_memcpy(packet1.middleware_custom_version, packet_in.middleware_custom_version, sizeof(uint8_t)*8);
5681  mav_array_memcpy(packet1.os_custom_version, packet_in.os_custom_version, sizeof(uint8_t)*8);
5682 
5683 
5684  memset(&packet2, 0, sizeof(packet2));
5685  mavlink_msg_autopilot_version_encode(system_id, component_id, &msg, &packet1);
5686  mavlink_msg_autopilot_version_decode(&msg, &packet2);
5687  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5688 
5689  memset(&packet2, 0, sizeof(packet2));
5690  mavlink_msg_autopilot_version_pack(system_id, component_id, &msg , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
5691  mavlink_msg_autopilot_version_decode(&msg, &packet2);
5692  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5693 
5694  memset(&packet2, 0, sizeof(packet2));
5695  mavlink_msg_autopilot_version_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
5696  mavlink_msg_autopilot_version_decode(&msg, &packet2);
5697  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5698 
5699  memset(&packet2, 0, sizeof(packet2));
5700  mavlink_msg_to_send_buffer(buffer, &msg);
5701  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5702  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5703  }
5704  mavlink_msg_autopilot_version_decode(last_msg, &packet2);
5705  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5706 
5707  memset(&packet2, 0, sizeof(packet2));
5708  mavlink_msg_autopilot_version_send(MAVLINK_COMM_1 , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
5709  mavlink_msg_autopilot_version_decode(last_msg, &packet2);
5710  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5711 }
5712 
5713 static void mavlink_test_landing_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5714 {
5715  mavlink_message_t msg;
5716  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5717  uint16_t i;
5718  mavlink_landing_target_t packet_in = {
5719  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,89,156
5720  };
5721  mavlink_landing_target_t packet1, packet2;
5722  memset(&packet1, 0, sizeof(packet1));
5723  packet1.time_usec = packet_in.time_usec;
5724  packet1.angle_x = packet_in.angle_x;
5725  packet1.angle_y = packet_in.angle_y;
5726  packet1.distance = packet_in.distance;
5727  packet1.size_x = packet_in.size_x;
5728  packet1.size_y = packet_in.size_y;
5729  packet1.target_num = packet_in.target_num;
5730  packet1.frame = packet_in.frame;
5731 
5732 
5733 
5734  memset(&packet2, 0, sizeof(packet2));
5735  mavlink_msg_landing_target_encode(system_id, component_id, &msg, &packet1);
5736  mavlink_msg_landing_target_decode(&msg, &packet2);
5737  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5738 
5739  memset(&packet2, 0, sizeof(packet2));
5740  mavlink_msg_landing_target_pack(system_id, component_id, &msg , packet1.time_usec , packet1.target_num , packet1.frame , packet1.angle_x , packet1.angle_y , packet1.distance , packet1.size_x , packet1.size_y );
5741  mavlink_msg_landing_target_decode(&msg, &packet2);
5742  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5743 
5744  memset(&packet2, 0, sizeof(packet2));
5745  mavlink_msg_landing_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.target_num , packet1.frame , packet1.angle_x , packet1.angle_y , packet1.distance , packet1.size_x , packet1.size_y );
5746  mavlink_msg_landing_target_decode(&msg, &packet2);
5747  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5748 
5749  memset(&packet2, 0, sizeof(packet2));
5750  mavlink_msg_to_send_buffer(buffer, &msg);
5751  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5752  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5753  }
5754  mavlink_msg_landing_target_decode(last_msg, &packet2);
5755  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5756 
5757  memset(&packet2, 0, sizeof(packet2));
5758  mavlink_msg_landing_target_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.target_num , packet1.frame , packet1.angle_x , packet1.angle_y , packet1.distance , packet1.size_x , packet1.size_y );
5759  mavlink_msg_landing_target_decode(last_msg, &packet2);
5760  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5761 }
5762 
5763 static void mavlink_test_estimator_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5764 {
5765  mavlink_message_t msg;
5766  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5767  uint16_t i;
5768  mavlink_estimator_status_t packet_in = {
5769  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,19315
5770  };
5771  mavlink_estimator_status_t packet1, packet2;
5772  memset(&packet1, 0, sizeof(packet1));
5773  packet1.time_usec = packet_in.time_usec;
5774  packet1.vel_ratio = packet_in.vel_ratio;
5775  packet1.pos_horiz_ratio = packet_in.pos_horiz_ratio;
5776  packet1.pos_vert_ratio = packet_in.pos_vert_ratio;
5777  packet1.mag_ratio = packet_in.mag_ratio;
5778  packet1.hagl_ratio = packet_in.hagl_ratio;
5779  packet1.tas_ratio = packet_in.tas_ratio;
5780  packet1.pos_horiz_accuracy = packet_in.pos_horiz_accuracy;
5781  packet1.pos_vert_accuracy = packet_in.pos_vert_accuracy;
5782  packet1.flags = packet_in.flags;
5783 
5784 
5785 
5786  memset(&packet2, 0, sizeof(packet2));
5787  mavlink_msg_estimator_status_encode(system_id, component_id, &msg, &packet1);
5788  mavlink_msg_estimator_status_decode(&msg, &packet2);
5789  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5790 
5791  memset(&packet2, 0, sizeof(packet2));
5792  mavlink_msg_estimator_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.flags , packet1.vel_ratio , packet1.pos_horiz_ratio , packet1.pos_vert_ratio , packet1.mag_ratio , packet1.hagl_ratio , packet1.tas_ratio , packet1.pos_horiz_accuracy , packet1.pos_vert_accuracy );
5793  mavlink_msg_estimator_status_decode(&msg, &packet2);
5794  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5795 
5796  memset(&packet2, 0, sizeof(packet2));
5797  mavlink_msg_estimator_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.flags , packet1.vel_ratio , packet1.pos_horiz_ratio , packet1.pos_vert_ratio , packet1.mag_ratio , packet1.hagl_ratio , packet1.tas_ratio , packet1.pos_horiz_accuracy , packet1.pos_vert_accuracy );
5798  mavlink_msg_estimator_status_decode(&msg, &packet2);
5799  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5800 
5801  memset(&packet2, 0, sizeof(packet2));
5802  mavlink_msg_to_send_buffer(buffer, &msg);
5803  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5804  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5805  }
5806  mavlink_msg_estimator_status_decode(last_msg, &packet2);
5807  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5808 
5809  memset(&packet2, 0, sizeof(packet2));
5810  mavlink_msg_estimator_status_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.flags , packet1.vel_ratio , packet1.pos_horiz_ratio , packet1.pos_vert_ratio , packet1.mag_ratio , packet1.hagl_ratio , packet1.tas_ratio , packet1.pos_horiz_accuracy , packet1.pos_vert_accuracy );
5811  mavlink_msg_estimator_status_decode(last_msg, &packet2);
5812  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5813 }
5814 
5815 static void mavlink_test_wind_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5816 {
5817  mavlink_message_t msg;
5818  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5819  uint16_t i;
5820  mavlink_wind_cov_t packet_in = {
5821  93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0
5822  };
5823  mavlink_wind_cov_t packet1, packet2;
5824  memset(&packet1, 0, sizeof(packet1));
5825  packet1.time_usec = packet_in.time_usec;
5826  packet1.wind_x = packet_in.wind_x;
5827  packet1.wind_y = packet_in.wind_y;
5828  packet1.wind_z = packet_in.wind_z;
5829  packet1.var_horiz = packet_in.var_horiz;
5830  packet1.var_vert = packet_in.var_vert;
5831  packet1.wind_alt = packet_in.wind_alt;
5832  packet1.horiz_accuracy = packet_in.horiz_accuracy;
5833  packet1.vert_accuracy = packet_in.vert_accuracy;
5834 
5835 
5836 
5837  memset(&packet2, 0, sizeof(packet2));
5838  mavlink_msg_wind_cov_encode(system_id, component_id, &msg, &packet1);
5839  mavlink_msg_wind_cov_decode(&msg, &packet2);
5840  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5841 
5842  memset(&packet2, 0, sizeof(packet2));
5843  mavlink_msg_wind_cov_pack(system_id, component_id, &msg , packet1.time_usec , packet1.wind_x , packet1.wind_y , packet1.wind_z , packet1.var_horiz , packet1.var_vert , packet1.wind_alt , packet1.horiz_accuracy , packet1.vert_accuracy );
5844  mavlink_msg_wind_cov_decode(&msg, &packet2);
5845  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5846 
5847  memset(&packet2, 0, sizeof(packet2));
5848  mavlink_msg_wind_cov_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.wind_x , packet1.wind_y , packet1.wind_z , packet1.var_horiz , packet1.var_vert , packet1.wind_alt , packet1.horiz_accuracy , packet1.vert_accuracy );
5849  mavlink_msg_wind_cov_decode(&msg, &packet2);
5850  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5851 
5852  memset(&packet2, 0, sizeof(packet2));
5853  mavlink_msg_to_send_buffer(buffer, &msg);
5854  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5855  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5856  }
5857  mavlink_msg_wind_cov_decode(last_msg, &packet2);
5858  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5859 
5860  memset(&packet2, 0, sizeof(packet2));
5861  mavlink_msg_wind_cov_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.wind_x , packet1.wind_y , packet1.wind_z , packet1.var_horiz , packet1.var_vert , packet1.wind_alt , packet1.horiz_accuracy , packet1.vert_accuracy );
5862  mavlink_msg_wind_cov_decode(last_msg, &packet2);
5863  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5864 }
5865 
5866 static void mavlink_test_vibration(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5867 {
5868  mavlink_message_t msg;
5869  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5870  uint16_t i;
5871  mavlink_vibration_t packet_in = {
5872  93372036854775807ULL,73.0,101.0,129.0,963498504,963498712,963498920
5873  };
5874  mavlink_vibration_t packet1, packet2;
5875  memset(&packet1, 0, sizeof(packet1));
5876  packet1.time_usec = packet_in.time_usec;
5877  packet1.vibration_x = packet_in.vibration_x;
5878  packet1.vibration_y = packet_in.vibration_y;
5879  packet1.vibration_z = packet_in.vibration_z;
5880  packet1.clipping_0 = packet_in.clipping_0;
5881  packet1.clipping_1 = packet_in.clipping_1;
5882  packet1.clipping_2 = packet_in.clipping_2;
5883 
5884 
5885 
5886  memset(&packet2, 0, sizeof(packet2));
5887  mavlink_msg_vibration_encode(system_id, component_id, &msg, &packet1);
5888  mavlink_msg_vibration_decode(&msg, &packet2);
5889  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5890 
5891  memset(&packet2, 0, sizeof(packet2));
5892  mavlink_msg_vibration_pack(system_id, component_id, &msg , packet1.time_usec , packet1.vibration_x , packet1.vibration_y , packet1.vibration_z , packet1.clipping_0 , packet1.clipping_1 , packet1.clipping_2 );
5893  mavlink_msg_vibration_decode(&msg, &packet2);
5894  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5895 
5896  memset(&packet2, 0, sizeof(packet2));
5897  mavlink_msg_vibration_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.vibration_x , packet1.vibration_y , packet1.vibration_z , packet1.clipping_0 , packet1.clipping_1 , packet1.clipping_2 );
5898  mavlink_msg_vibration_decode(&msg, &packet2);
5899  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5900 
5901  memset(&packet2, 0, sizeof(packet2));
5902  mavlink_msg_to_send_buffer(buffer, &msg);
5903  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5904  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5905  }
5906  mavlink_msg_vibration_decode(last_msg, &packet2);
5907  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5908 
5909  memset(&packet2, 0, sizeof(packet2));
5910  mavlink_msg_vibration_send(MAVLINK_COMM_1 , packet1.time_usec , packet1.vibration_x , packet1.vibration_y , packet1.vibration_z , packet1.clipping_0 , packet1.clipping_1 , packet1.clipping_2 );
5911  mavlink_msg_vibration_decode(last_msg, &packet2);
5912  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5913 }
5914 
5915 static void mavlink_test_home_position(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5916 {
5917  mavlink_message_t msg;
5918  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5919  uint16_t i;
5920  mavlink_home_position_t packet_in = {
5921  963497464,963497672,963497880,101.0,129.0,157.0,{ 185.0, 186.0, 187.0, 188.0 },297.0,325.0,353.0
5922  };
5923  mavlink_home_position_t packet1, packet2;
5924  memset(&packet1, 0, sizeof(packet1));
5925  packet1.latitude = packet_in.latitude;
5926  packet1.longitude = packet_in.longitude;
5927  packet1.altitude = packet_in.altitude;
5928  packet1.x = packet_in.x;
5929  packet1.y = packet_in.y;
5930  packet1.z = packet_in.z;
5931  packet1.approach_x = packet_in.approach_x;
5932  packet1.approach_y = packet_in.approach_y;
5933  packet1.approach_z = packet_in.approach_z;
5934 
5935  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
5936 
5937 
5938  memset(&packet2, 0, sizeof(packet2));
5939  mavlink_msg_home_position_encode(system_id, component_id, &msg, &packet1);
5940  mavlink_msg_home_position_decode(&msg, &packet2);
5941  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5942 
5943  memset(&packet2, 0, sizeof(packet2));
5944  mavlink_msg_home_position_pack(system_id, component_id, &msg , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
5945  mavlink_msg_home_position_decode(&msg, &packet2);
5946  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5947 
5948  memset(&packet2, 0, sizeof(packet2));
5949  mavlink_msg_home_position_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
5950  mavlink_msg_home_position_decode(&msg, &packet2);
5951  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5952 
5953  memset(&packet2, 0, sizeof(packet2));
5954  mavlink_msg_to_send_buffer(buffer, &msg);
5955  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
5956  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
5957  }
5958  mavlink_msg_home_position_decode(last_msg, &packet2);
5959  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5960 
5961  memset(&packet2, 0, sizeof(packet2));
5962  mavlink_msg_home_position_send(MAVLINK_COMM_1 , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
5963  mavlink_msg_home_position_decode(last_msg, &packet2);
5964  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5965 }
5966 
5967 static void mavlink_test_set_home_position(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
5968 {
5969  mavlink_message_t msg;
5970  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
5971  uint16_t i;
5972  mavlink_set_home_position_t packet_in = {
5973  963497464,963497672,963497880,101.0,129.0,157.0,{ 185.0, 186.0, 187.0, 188.0 },297.0,325.0,353.0,161
5974  };
5975  mavlink_set_home_position_t packet1, packet2;
5976  memset(&packet1, 0, sizeof(packet1));
5977  packet1.latitude = packet_in.latitude;
5978  packet1.longitude = packet_in.longitude;
5979  packet1.altitude = packet_in.altitude;
5980  packet1.x = packet_in.x;
5981  packet1.y = packet_in.y;
5982  packet1.z = packet_in.z;
5983  packet1.approach_x = packet_in.approach_x;
5984  packet1.approach_y = packet_in.approach_y;
5985  packet1.approach_z = packet_in.approach_z;
5986  packet1.target_system = packet_in.target_system;
5987 
5988  mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4);
5989 
5990 
5991  memset(&packet2, 0, sizeof(packet2));
5992  mavlink_msg_set_home_position_encode(system_id, component_id, &msg, &packet1);
5993  mavlink_msg_set_home_position_decode(&msg, &packet2);
5994  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
5995 
5996  memset(&packet2, 0, sizeof(packet2));
5997  mavlink_msg_set_home_position_pack(system_id, component_id, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
5998  mavlink_msg_set_home_position_decode(&msg, &packet2);
5999  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6000 
6001  memset(&packet2, 0, sizeof(packet2));
6002  mavlink_msg_set_home_position_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
6003  mavlink_msg_set_home_position_decode(&msg, &packet2);
6004  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6005 
6006  memset(&packet2, 0, sizeof(packet2));
6007  mavlink_msg_to_send_buffer(buffer, &msg);
6008  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6009  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6010  }
6011  mavlink_msg_set_home_position_decode(last_msg, &packet2);
6012  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6013 
6014  memset(&packet2, 0, sizeof(packet2));
6015  mavlink_msg_set_home_position_send(MAVLINK_COMM_1 , packet1.target_system , packet1.latitude , packet1.longitude , packet1.altitude , packet1.x , packet1.y , packet1.z , packet1.q , packet1.approach_x , packet1.approach_y , packet1.approach_z );
6016  mavlink_msg_set_home_position_decode(last_msg, &packet2);
6017  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6018 }
6019 
6020 static void mavlink_test_message_interval(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6021 {
6022  mavlink_message_t msg;
6023  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6024  uint16_t i;
6025  mavlink_message_interval_t packet_in = {
6026  963497464,17443
6027  };
6028  mavlink_message_interval_t packet1, packet2;
6029  memset(&packet1, 0, sizeof(packet1));
6030  packet1.interval_us = packet_in.interval_us;
6031  packet1.message_id = packet_in.message_id;
6032 
6033 
6034 
6035  memset(&packet2, 0, sizeof(packet2));
6036  mavlink_msg_message_interval_encode(system_id, component_id, &msg, &packet1);
6037  mavlink_msg_message_interval_decode(&msg, &packet2);
6038  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6039 
6040  memset(&packet2, 0, sizeof(packet2));
6041  mavlink_msg_message_interval_pack(system_id, component_id, &msg , packet1.message_id , packet1.interval_us );
6042  mavlink_msg_message_interval_decode(&msg, &packet2);
6043  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6044 
6045  memset(&packet2, 0, sizeof(packet2));
6046  mavlink_msg_message_interval_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.message_id , packet1.interval_us );
6047  mavlink_msg_message_interval_decode(&msg, &packet2);
6048  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6049 
6050  memset(&packet2, 0, sizeof(packet2));
6051  mavlink_msg_to_send_buffer(buffer, &msg);
6052  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6053  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6054  }
6055  mavlink_msg_message_interval_decode(last_msg, &packet2);
6056  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6057 
6058  memset(&packet2, 0, sizeof(packet2));
6059  mavlink_msg_message_interval_send(MAVLINK_COMM_1 , packet1.message_id , packet1.interval_us );
6060  mavlink_msg_message_interval_decode(last_msg, &packet2);
6061  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6062 }
6063 
6064 static void mavlink_test_extended_sys_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6065 {
6066  mavlink_message_t msg;
6067  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6068  uint16_t i;
6069  mavlink_extended_sys_state_t packet_in = {
6070  5,72
6071  };
6072  mavlink_extended_sys_state_t packet1, packet2;
6073  memset(&packet1, 0, sizeof(packet1));
6074  packet1.vtol_state = packet_in.vtol_state;
6075  packet1.landed_state = packet_in.landed_state;
6076 
6077 
6078 
6079  memset(&packet2, 0, sizeof(packet2));
6080  mavlink_msg_extended_sys_state_encode(system_id, component_id, &msg, &packet1);
6081  mavlink_msg_extended_sys_state_decode(&msg, &packet2);
6082  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6083 
6084  memset(&packet2, 0, sizeof(packet2));
6085  mavlink_msg_extended_sys_state_pack(system_id, component_id, &msg , packet1.vtol_state , packet1.landed_state );
6086  mavlink_msg_extended_sys_state_decode(&msg, &packet2);
6087  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6088 
6089  memset(&packet2, 0, sizeof(packet2));
6090  mavlink_msg_extended_sys_state_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.vtol_state , packet1.landed_state );
6091  mavlink_msg_extended_sys_state_decode(&msg, &packet2);
6092  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6093 
6094  memset(&packet2, 0, sizeof(packet2));
6095  mavlink_msg_to_send_buffer(buffer, &msg);
6096  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6097  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6098  }
6099  mavlink_msg_extended_sys_state_decode(last_msg, &packet2);
6100  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6101 
6102  memset(&packet2, 0, sizeof(packet2));
6103  mavlink_msg_extended_sys_state_send(MAVLINK_COMM_1 , packet1.vtol_state , packet1.landed_state );
6104  mavlink_msg_extended_sys_state_decode(last_msg, &packet2);
6105  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6106 }
6107 
6108 static void mavlink_test_adsb_vehicle(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6109 {
6110  mavlink_message_t msg;
6111  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6112  uint16_t i;
6113  mavlink_adsb_vehicle_t packet_in = {
6114  963497464,963497672,963497880,963498088,18067,18171,18275,18379,18483,211,"BCDEFGHI",113,180
6115  };
6116  mavlink_adsb_vehicle_t packet1, packet2;
6117  memset(&packet1, 0, sizeof(packet1));
6118  packet1.ICAO_address = packet_in.ICAO_address;
6119  packet1.lat = packet_in.lat;
6120  packet1.lon = packet_in.lon;
6121  packet1.altitude = packet_in.altitude;
6122  packet1.heading = packet_in.heading;
6123  packet1.hor_velocity = packet_in.hor_velocity;
6124  packet1.ver_velocity = packet_in.ver_velocity;
6125  packet1.flags = packet_in.flags;
6126  packet1.squawk = packet_in.squawk;
6127  packet1.altitude_type = packet_in.altitude_type;
6128  packet1.emitter_type = packet_in.emitter_type;
6129  packet1.tslc = packet_in.tslc;
6130 
6131  mav_array_memcpy(packet1.callsign, packet_in.callsign, sizeof(char)*9);
6132 
6133 
6134  memset(&packet2, 0, sizeof(packet2));
6135  mavlink_msg_adsb_vehicle_encode(system_id, component_id, &msg, &packet1);
6136  mavlink_msg_adsb_vehicle_decode(&msg, &packet2);
6137  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6138 
6139  memset(&packet2, 0, sizeof(packet2));
6140  mavlink_msg_adsb_vehicle_pack(system_id, component_id, &msg , packet1.ICAO_address , packet1.lat , packet1.lon , packet1.altitude_type , packet1.altitude , packet1.heading , packet1.hor_velocity , packet1.ver_velocity , packet1.callsign , packet1.emitter_type , packet1.tslc , packet1.flags , packet1.squawk );
6141  mavlink_msg_adsb_vehicle_decode(&msg, &packet2);
6142  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6143 
6144  memset(&packet2, 0, sizeof(packet2));
6145  mavlink_msg_adsb_vehicle_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.ICAO_address , packet1.lat , packet1.lon , packet1.altitude_type , packet1.altitude , packet1.heading , packet1.hor_velocity , packet1.ver_velocity , packet1.callsign , packet1.emitter_type , packet1.tslc , packet1.flags , packet1.squawk );
6146  mavlink_msg_adsb_vehicle_decode(&msg, &packet2);
6147  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6148 
6149  memset(&packet2, 0, sizeof(packet2));
6150  mavlink_msg_to_send_buffer(buffer, &msg);
6151  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6152  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6153  }
6154  mavlink_msg_adsb_vehicle_decode(last_msg, &packet2);
6155  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6156 
6157  memset(&packet2, 0, sizeof(packet2));
6158  mavlink_msg_adsb_vehicle_send(MAVLINK_COMM_1 , packet1.ICAO_address , packet1.lat , packet1.lon , packet1.altitude_type , packet1.altitude , packet1.heading , packet1.hor_velocity , packet1.ver_velocity , packet1.callsign , packet1.emitter_type , packet1.tslc , packet1.flags , packet1.squawk );
6159  mavlink_msg_adsb_vehicle_decode(last_msg, &packet2);
6160  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6161 }
6162 
6163 static void mavlink_test_v2_extension(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6164 {
6165  mavlink_message_t msg;
6166  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6167  uint16_t i;
6168  mavlink_v2_extension_t packet_in = {
6169  17235,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, 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, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 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, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 }
6170  };
6171  mavlink_v2_extension_t packet1, packet2;
6172  memset(&packet1, 0, sizeof(packet1));
6173  packet1.message_type = packet_in.message_type;
6174  packet1.target_network = packet_in.target_network;
6175  packet1.target_system = packet_in.target_system;
6176  packet1.target_component = packet_in.target_component;
6177 
6178  mav_array_memcpy(packet1.payload, packet_in.payload, sizeof(uint8_t)*249);
6179 
6180 
6181  memset(&packet2, 0, sizeof(packet2));
6182  mavlink_msg_v2_extension_encode(system_id, component_id, &msg, &packet1);
6183  mavlink_msg_v2_extension_decode(&msg, &packet2);
6184  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6185 
6186  memset(&packet2, 0, sizeof(packet2));
6187  mavlink_msg_v2_extension_pack(system_id, component_id, &msg , packet1.target_network , packet1.target_system , packet1.target_component , packet1.message_type , packet1.payload );
6188  mavlink_msg_v2_extension_decode(&msg, &packet2);
6189  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6190 
6191  memset(&packet2, 0, sizeof(packet2));
6192  mavlink_msg_v2_extension_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_network , packet1.target_system , packet1.target_component , packet1.message_type , packet1.payload );
6193  mavlink_msg_v2_extension_decode(&msg, &packet2);
6194  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6195 
6196  memset(&packet2, 0, sizeof(packet2));
6197  mavlink_msg_to_send_buffer(buffer, &msg);
6198  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6199  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6200  }
6201  mavlink_msg_v2_extension_decode(last_msg, &packet2);
6202  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6203 
6204  memset(&packet2, 0, sizeof(packet2));
6205  mavlink_msg_v2_extension_send(MAVLINK_COMM_1 , packet1.target_network , packet1.target_system , packet1.target_component , packet1.message_type , packet1.payload );
6206  mavlink_msg_v2_extension_decode(last_msg, &packet2);
6207  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6208 }
6209 
6210 static void mavlink_test_memory_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6211 {
6212  mavlink_message_t msg;
6213  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6214  uint16_t i;
6215  mavlink_memory_vect_t packet_in = {
6216  17235,139,206,{ 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, 45, 46, 47, 48 }
6217  };
6218  mavlink_memory_vect_t packet1, packet2;
6219  memset(&packet1, 0, sizeof(packet1));
6220  packet1.address = packet_in.address;
6221  packet1.ver = packet_in.ver;
6222  packet1.type = packet_in.type;
6223 
6224  mav_array_memcpy(packet1.value, packet_in.value, sizeof(int8_t)*32);
6225 
6226 
6227  memset(&packet2, 0, sizeof(packet2));
6228  mavlink_msg_memory_vect_encode(system_id, component_id, &msg, &packet1);
6229  mavlink_msg_memory_vect_decode(&msg, &packet2);
6230  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6231 
6232  memset(&packet2, 0, sizeof(packet2));
6233  mavlink_msg_memory_vect_pack(system_id, component_id, &msg , packet1.address , packet1.ver , packet1.type , packet1.value );
6234  mavlink_msg_memory_vect_decode(&msg, &packet2);
6235  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6236 
6237  memset(&packet2, 0, sizeof(packet2));
6238  mavlink_msg_memory_vect_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.address , packet1.ver , packet1.type , packet1.value );
6239  mavlink_msg_memory_vect_decode(&msg, &packet2);
6240  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6241 
6242  memset(&packet2, 0, sizeof(packet2));
6243  mavlink_msg_to_send_buffer(buffer, &msg);
6244  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6245  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6246  }
6247  mavlink_msg_memory_vect_decode(last_msg, &packet2);
6248  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6249 
6250  memset(&packet2, 0, sizeof(packet2));
6251  mavlink_msg_memory_vect_send(MAVLINK_COMM_1 , packet1.address , packet1.ver , packet1.type , packet1.value );
6252  mavlink_msg_memory_vect_decode(last_msg, &packet2);
6253  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6254 }
6255 
6256 static void mavlink_test_debug_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6257 {
6258  mavlink_message_t msg;
6259  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6260  uint16_t i;
6261  mavlink_debug_vect_t packet_in = {
6262  93372036854775807ULL,73.0,101.0,129.0,"UVWXYZABC"
6263  };
6264  mavlink_debug_vect_t packet1, packet2;
6265  memset(&packet1, 0, sizeof(packet1));
6266  packet1.time_usec = packet_in.time_usec;
6267  packet1.x = packet_in.x;
6268  packet1.y = packet_in.y;
6269  packet1.z = packet_in.z;
6270 
6271  mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
6272 
6273 
6274  memset(&packet2, 0, sizeof(packet2));
6275  mavlink_msg_debug_vect_encode(system_id, component_id, &msg, &packet1);
6276  mavlink_msg_debug_vect_decode(&msg, &packet2);
6277  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6278 
6279  memset(&packet2, 0, sizeof(packet2));
6280  mavlink_msg_debug_vect_pack(system_id, component_id, &msg , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
6281  mavlink_msg_debug_vect_decode(&msg, &packet2);
6282  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6283 
6284  memset(&packet2, 0, sizeof(packet2));
6285  mavlink_msg_debug_vect_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
6286  mavlink_msg_debug_vect_decode(&msg, &packet2);
6287  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6288 
6289  memset(&packet2, 0, sizeof(packet2));
6290  mavlink_msg_to_send_buffer(buffer, &msg);
6291  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6292  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6293  }
6294  mavlink_msg_debug_vect_decode(last_msg, &packet2);
6295  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6296 
6297  memset(&packet2, 0, sizeof(packet2));
6298  mavlink_msg_debug_vect_send(MAVLINK_COMM_1 , packet1.name , packet1.time_usec , packet1.x , packet1.y , packet1.z );
6299  mavlink_msg_debug_vect_decode(last_msg, &packet2);
6300  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6301 }
6302 
6303 static void mavlink_test_named_value_float(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6304 {
6305  mavlink_message_t msg;
6306  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6307  uint16_t i;
6308  mavlink_named_value_float_t packet_in = {
6309  963497464,45.0,"IJKLMNOPQ"
6310  };
6311  mavlink_named_value_float_t packet1, packet2;
6312  memset(&packet1, 0, sizeof(packet1));
6313  packet1.time_boot_ms = packet_in.time_boot_ms;
6314  packet1.value = packet_in.value;
6315 
6316  mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
6317 
6318 
6319  memset(&packet2, 0, sizeof(packet2));
6320  mavlink_msg_named_value_float_encode(system_id, component_id, &msg, &packet1);
6321  mavlink_msg_named_value_float_decode(&msg, &packet2);
6322  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6323 
6324  memset(&packet2, 0, sizeof(packet2));
6325  mavlink_msg_named_value_float_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
6326  mavlink_msg_named_value_float_decode(&msg, &packet2);
6327  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6328 
6329  memset(&packet2, 0, sizeof(packet2));
6330  mavlink_msg_named_value_float_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
6331  mavlink_msg_named_value_float_decode(&msg, &packet2);
6332  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6333 
6334  memset(&packet2, 0, sizeof(packet2));
6335  mavlink_msg_to_send_buffer(buffer, &msg);
6336  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6337  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6338  }
6339  mavlink_msg_named_value_float_decode(last_msg, &packet2);
6340  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6341 
6342  memset(&packet2, 0, sizeof(packet2));
6343  mavlink_msg_named_value_float_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.name , packet1.value );
6344  mavlink_msg_named_value_float_decode(last_msg, &packet2);
6345  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6346 }
6347 
6348 static void mavlink_test_named_value_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6349 {
6350  mavlink_message_t msg;
6351  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6352  uint16_t i;
6353  mavlink_named_value_int_t packet_in = {
6354  963497464,963497672,"IJKLMNOPQ"
6355  };
6356  mavlink_named_value_int_t packet1, packet2;
6357  memset(&packet1, 0, sizeof(packet1));
6358  packet1.time_boot_ms = packet_in.time_boot_ms;
6359  packet1.value = packet_in.value;
6360 
6361  mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10);
6362 
6363 
6364  memset(&packet2, 0, sizeof(packet2));
6365  mavlink_msg_named_value_int_encode(system_id, component_id, &msg, &packet1);
6366  mavlink_msg_named_value_int_decode(&msg, &packet2);
6367  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6368 
6369  memset(&packet2, 0, sizeof(packet2));
6370  mavlink_msg_named_value_int_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
6371  mavlink_msg_named_value_int_decode(&msg, &packet2);
6372  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6373 
6374  memset(&packet2, 0, sizeof(packet2));
6375  mavlink_msg_named_value_int_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.name , packet1.value );
6376  mavlink_msg_named_value_int_decode(&msg, &packet2);
6377  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6378 
6379  memset(&packet2, 0, sizeof(packet2));
6380  mavlink_msg_to_send_buffer(buffer, &msg);
6381  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6382  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6383  }
6384  mavlink_msg_named_value_int_decode(last_msg, &packet2);
6385  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6386 
6387  memset(&packet2, 0, sizeof(packet2));
6388  mavlink_msg_named_value_int_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.name , packet1.value );
6389  mavlink_msg_named_value_int_decode(last_msg, &packet2);
6390  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6391 }
6392 
6393 static void mavlink_test_statustext(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6394 {
6395  mavlink_message_t msg;
6396  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6397  uint16_t i;
6398  mavlink_statustext_t packet_in = {
6399  5,"BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX"
6400  };
6401  mavlink_statustext_t packet1, packet2;
6402  memset(&packet1, 0, sizeof(packet1));
6403  packet1.severity = packet_in.severity;
6404 
6405  mav_array_memcpy(packet1.text, packet_in.text, sizeof(char)*50);
6406 
6407 
6408  memset(&packet2, 0, sizeof(packet2));
6409  mavlink_msg_statustext_encode(system_id, component_id, &msg, &packet1);
6410  mavlink_msg_statustext_decode(&msg, &packet2);
6411  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6412 
6413  memset(&packet2, 0, sizeof(packet2));
6414  mavlink_msg_statustext_pack(system_id, component_id, &msg , packet1.severity , packet1.text );
6415  mavlink_msg_statustext_decode(&msg, &packet2);
6416  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6417 
6418  memset(&packet2, 0, sizeof(packet2));
6419  mavlink_msg_statustext_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.severity , packet1.text );
6420  mavlink_msg_statustext_decode(&msg, &packet2);
6421  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6422 
6423  memset(&packet2, 0, sizeof(packet2));
6424  mavlink_msg_to_send_buffer(buffer, &msg);
6425  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6426  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6427  }
6428  mavlink_msg_statustext_decode(last_msg, &packet2);
6429  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6430 
6431  memset(&packet2, 0, sizeof(packet2));
6432  mavlink_msg_statustext_send(MAVLINK_COMM_1 , packet1.severity , packet1.text );
6433  mavlink_msg_statustext_decode(last_msg, &packet2);
6434  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6435 }
6436 
6437 static void mavlink_test_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6438 {
6439  mavlink_message_t msg;
6440  uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
6441  uint16_t i;
6442  mavlink_debug_t packet_in = {
6443  963497464,45.0,29
6444  };
6445  mavlink_debug_t packet1, packet2;
6446  memset(&packet1, 0, sizeof(packet1));
6447  packet1.time_boot_ms = packet_in.time_boot_ms;
6448  packet1.value = packet_in.value;
6449  packet1.ind = packet_in.ind;
6450 
6451 
6452 
6453  memset(&packet2, 0, sizeof(packet2));
6454  mavlink_msg_debug_encode(system_id, component_id, &msg, &packet1);
6455  mavlink_msg_debug_decode(&msg, &packet2);
6456  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6457 
6458  memset(&packet2, 0, sizeof(packet2));
6459  mavlink_msg_debug_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.ind , packet1.value );
6460  mavlink_msg_debug_decode(&msg, &packet2);
6461  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6462 
6463  memset(&packet2, 0, sizeof(packet2));
6464  mavlink_msg_debug_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.ind , packet1.value );
6465  mavlink_msg_debug_decode(&msg, &packet2);
6466  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6467 
6468  memset(&packet2, 0, sizeof(packet2));
6469  mavlink_msg_to_send_buffer(buffer, &msg);
6470  for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
6471  comm_send_ch(MAVLINK_COMM_0, buffer[i]);
6472  }
6473  mavlink_msg_debug_decode(last_msg, &packet2);
6474  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6475 
6476  memset(&packet2, 0, sizeof(packet2));
6477  mavlink_msg_debug_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.ind , packet1.value );
6478  mavlink_msg_debug_decode(last_msg, &packet2);
6479  MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
6480 }
6481 
6482 static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
6483 {
6484  mavlink_test_heartbeat(system_id, component_id, last_msg);
6485  mavlink_test_sys_status(system_id, component_id, last_msg);
6486  mavlink_test_system_time(system_id, component_id, last_msg);
6487  mavlink_test_ping(system_id, component_id, last_msg);
6488  mavlink_test_change_operator_control(system_id, component_id, last_msg);
6489  mavlink_test_change_operator_control_ack(system_id, component_id, last_msg);
6490  mavlink_test_auth_key(system_id, component_id, last_msg);
6491  mavlink_test_set_mode(system_id, component_id, last_msg);
6492  mavlink_test_param_request_read(system_id, component_id, last_msg);
6493  mavlink_test_param_request_list(system_id, component_id, last_msg);
6494  mavlink_test_param_value(system_id, component_id, last_msg);
6495  mavlink_test_param_set(system_id, component_id, last_msg);
6496  mavlink_test_gps_raw_int(system_id, component_id, last_msg);
6497  mavlink_test_gps_status(system_id, component_id, last_msg);
6498  mavlink_test_scaled_imu(system_id, component_id, last_msg);
6499  mavlink_test_raw_imu(system_id, component_id, last_msg);
6500  mavlink_test_raw_pressure(system_id, component_id, last_msg);
6501  mavlink_test_scaled_pressure(system_id, component_id, last_msg);
6502  mavlink_test_attitude(system_id, component_id, last_msg);
6503  mavlink_test_attitude_quaternion(system_id, component_id, last_msg);
6504  mavlink_test_local_position_ned(system_id, component_id, last_msg);
6505  mavlink_test_global_position_int(system_id, component_id, last_msg);
6506  mavlink_test_rc_channels_scaled(system_id, component_id, last_msg);
6507  mavlink_test_rc_channels_raw(system_id, component_id, last_msg);
6508  mavlink_test_servo_output_raw(system_id, component_id, last_msg);
6509  mavlink_test_mission_request_partial_list(system_id, component_id, last_msg);
6510  mavlink_test_mission_write_partial_list(system_id, component_id, last_msg);
6511  mavlink_test_mission_item(system_id, component_id, last_msg);
6512  mavlink_test_mission_request(system_id, component_id, last_msg);
6513  mavlink_test_mission_set_current(system_id, component_id, last_msg);
6514  mavlink_test_mission_current(system_id, component_id, last_msg);
6515  mavlink_test_mission_request_list(system_id, component_id, last_msg);
6516  mavlink_test_mission_count(system_id, component_id, last_msg);
6517  mavlink_test_mission_clear_all(system_id, component_id, last_msg);
6518  mavlink_test_mission_item_reached(system_id, component_id, last_msg);
6519  mavlink_test_mission_ack(system_id, component_id, last_msg);
6520  mavlink_test_set_gps_global_origin(system_id, component_id, last_msg);
6521  mavlink_test_gps_global_origin(system_id, component_id, last_msg);
6522  mavlink_test_param_map_rc(system_id, component_id, last_msg);
6523  mavlink_test_mission_request_int(system_id, component_id, last_msg);
6524  mavlink_test_safety_set_allowed_area(system_id, component_id, last_msg);
6525  mavlink_test_safety_allowed_area(system_id, component_id, last_msg);
6526  mavlink_test_attitude_quaternion_cov(system_id, component_id, last_msg);
6527  mavlink_test_nav_controller_output(system_id, component_id, last_msg);
6528  mavlink_test_global_position_int_cov(system_id, component_id, last_msg);
6529  mavlink_test_local_position_ned_cov(system_id, component_id, last_msg);
6530  mavlink_test_rc_channels(system_id, component_id, last_msg);
6531  mavlink_test_request_data_stream(system_id, component_id, last_msg);
6532  mavlink_test_data_stream(system_id, component_id, last_msg);
6533  mavlink_test_manual_control(system_id, component_id, last_msg);
6534  mavlink_test_rc_channels_override(system_id, component_id, last_msg);
6535  mavlink_test_mission_item_int(system_id, component_id, last_msg);
6536  mavlink_test_vfr_hud(system_id, component_id, last_msg);
6537  mavlink_test_command_int(system_id, component_id, last_msg);
6538  mavlink_test_command_long(system_id, component_id, last_msg);
6539  mavlink_test_command_ack(system_id, component_id, last_msg);
6540  mavlink_test_manual_setpoint(system_id, component_id, last_msg);
6541  mavlink_test_set_attitude_target(system_id, component_id, last_msg);
6542  mavlink_test_attitude_target(system_id, component_id, last_msg);
6543  mavlink_test_set_position_target_local_ned(system_id, component_id, last_msg);
6544  mavlink_test_position_target_local_ned(system_id, component_id, last_msg);
6545  mavlink_test_set_position_target_global_int(system_id, component_id, last_msg);
6546  mavlink_test_position_target_global_int(system_id, component_id, last_msg);
6547  mavlink_test_local_position_ned_system_global_offset(system_id, component_id, last_msg);
6548  mavlink_test_hil_state(system_id, component_id, last_msg);
6549  mavlink_test_hil_controls(system_id, component_id, last_msg);
6550  mavlink_test_hil_rc_inputs_raw(system_id, component_id, last_msg);
6551  mavlink_test_optical_flow(system_id, component_id, last_msg);
6552  mavlink_test_global_vision_position_estimate(system_id, component_id, last_msg);
6553  mavlink_test_vision_position_estimate(system_id, component_id, last_msg);
6554  mavlink_test_vision_speed_estimate(system_id, component_id, last_msg);
6555  mavlink_test_vicon_position_estimate(system_id, component_id, last_msg);
6556  mavlink_test_highres_imu(system_id, component_id, last_msg);
6557  mavlink_test_optical_flow_rad(system_id, component_id, last_msg);
6558  mavlink_test_hil_sensor(system_id, component_id, last_msg);
6559  mavlink_test_sim_state(system_id, component_id, last_msg);
6560  mavlink_test_radio_status(system_id, component_id, last_msg);
6561  mavlink_test_file_transfer_protocol(system_id, component_id, last_msg);
6562  mavlink_test_timesync(system_id, component_id, last_msg);
6563  mavlink_test_camera_trigger(system_id, component_id, last_msg);
6564  mavlink_test_hil_gps(system_id, component_id, last_msg);
6565  mavlink_test_hil_optical_flow(system_id, component_id, last_msg);
6566  mavlink_test_hil_state_quaternion(system_id, component_id, last_msg);
6567  mavlink_test_scaled_imu2(system_id, component_id, last_msg);
6568  mavlink_test_log_request_list(system_id, component_id, last_msg);
6569  mavlink_test_log_entry(system_id, component_id, last_msg);
6570  mavlink_test_log_request_data(system_id, component_id, last_msg);
6571  mavlink_test_log_data(system_id, component_id, last_msg);
6572  mavlink_test_log_erase(system_id, component_id, last_msg);
6573  mavlink_test_log_request_end(system_id, component_id, last_msg);
6574  mavlink_test_gps_inject_data(system_id, component_id, last_msg);
6575  mavlink_test_gps2_raw(system_id, component_id, last_msg);
6576  mavlink_test_power_status(system_id, component_id, last_msg);
6577  mavlink_test_serial_control(system_id, component_id, last_msg);
6578  mavlink_test_gps_rtk(system_id, component_id, last_msg);
6579  mavlink_test_gps2_rtk(system_id, component_id, last_msg);
6580  mavlink_test_scaled_imu3(system_id, component_id, last_msg);
6581  mavlink_test_data_transmission_handshake(system_id, component_id, last_msg);
6582  mavlink_test_encapsulated_data(system_id, component_id, last_msg);
6583  mavlink_test_distance_sensor(system_id, component_id, last_msg);
6584  mavlink_test_terrain_request(system_id, component_id, last_msg);
6585  mavlink_test_terrain_data(system_id, component_id, last_msg);
6586  mavlink_test_terrain_check(system_id, component_id, last_msg);
6587  mavlink_test_terrain_report(system_id, component_id, last_msg);
6588  mavlink_test_scaled_pressure2(system_id, component_id, last_msg);
6589  mavlink_test_att_pos_mocap(system_id, component_id, last_msg);
6590  mavlink_test_set_actuator_control_target(system_id, component_id, last_msg);
6591  mavlink_test_actuator_control_target(system_id, component_id, last_msg);
6592  mavlink_test_altitude(system_id, component_id, last_msg);
6593  mavlink_test_resource_request(system_id, component_id, last_msg);
6594  mavlink_test_scaled_pressure3(system_id, component_id, last_msg);
6595  mavlink_test_follow_target(system_id, component_id, last_msg);
6596  mavlink_test_control_system_state(system_id, component_id, last_msg);
6597  mavlink_test_battery_status(system_id, component_id, last_msg);
6598  mavlink_test_autopilot_version(system_id, component_id, last_msg);
6599  mavlink_test_landing_target(system_id, component_id, last_msg);
6600  mavlink_test_estimator_status(system_id, component_id, last_msg);
6601  mavlink_test_wind_cov(system_id, component_id, last_msg);
6602  mavlink_test_vibration(system_id, component_id, last_msg);
6603  mavlink_test_home_position(system_id, component_id, last_msg);
6604  mavlink_test_set_home_position(system_id, component_id, last_msg);
6605  mavlink_test_message_interval(system_id, component_id, last_msg);
6606  mavlink_test_extended_sys_state(system_id, component_id, last_msg);
6607  mavlink_test_adsb_vehicle(system_id, component_id, last_msg);
6608  mavlink_test_v2_extension(system_id, component_id, last_msg);
6609  mavlink_test_memory_vect(system_id, component_id, last_msg);
6610  mavlink_test_debug_vect(system_id, component_id, last_msg);
6611  mavlink_test_named_value_float(system_id, component_id, last_msg);
6612  mavlink_test_named_value_int(system_id, component_id, last_msg);
6613  mavlink_test_statustext(system_id, component_id, last_msg);
6614  mavlink_test_debug(system_id, component_id, last_msg);
6615 }
6616 
6617 #ifdef __cplusplus
6618 }
6619 #endif // __cplusplus
6620 #endif // COMMON_TESTSUITE_H
static void mavlink_test_global_position_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_log_erase(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_vision_speed_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_ping(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_battery_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_rc_inputs_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
uint16_t last_log_num
static void mavlink_test_gps_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_debug_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static uint16_t mavlink_msg_get_send_buffer_length(const mavlink_message_t *msg)
Get the required buffer size for this message.
Definition: protocol.h:92
static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_distance_sensor(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_clear_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_encapsulated_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_vicon_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_nav_controller_output(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps2_rtk(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_attitude(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_highres_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_global_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_local_position_ned_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_request_data_stream(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_request_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_home_position(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_position_target_local_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_log_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_global_position_int_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_rc_channels_scaled(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_imu2(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps_raw_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_statustext(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_sim_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_actuator_control_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg)
static void mavlink_test_optical_flow_rad(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_optical_flow(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_safety_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_memory_vect(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_actuator_control_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_local_position_ned_system_global_offset(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_position_target_local_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_param_value(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_adsb_vehicle(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_attitude_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_estimator_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_raw_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_rc_channels(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_controls(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_vfr_hud(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_radio_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_v2_extension(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_att_pos_mocap(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_change_operator_control_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_param_map_rc(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_attitude_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps2_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_command_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
#define MAVLINK_ASSERT(x)
Definition: protocol.h:26
static void mavlink_test_servo_output_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_manual_setpoint(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_command_long(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_mode(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_pressure3(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_param_request_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_item_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_auth_key(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_change_operator_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_count(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_home_position(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_terrain_report(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_write_partial_list(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_imu3(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_msg_log_entry_decode(const mavlink_message_t *msg, mavlink_log_entry_t *log_entry)
Decode a log_entry message into a struct.
static void mavlink_test_manual_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_rc_channels_override(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_pressure2(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_named_value_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_autopilot_version(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
uint16_t num_logs
static void mavlink_test_mission_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_param_set(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_terrain_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_scaled_pressure(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_system_time(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_attitude_quaternion_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static uint16_t mavlink_msg_log_entry_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_log_entry_t *log_entry)
Encode a log_entry struct.
static uint16_t mavlink_msg_log_entry_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, uint16_t id, uint16_t num_logs, uint16_t last_log_num, uint32_t time_utc, uint32_t size)
Pack a log_entry message.
static void mavlink_test_hil_state_quaternion(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_local_position_ned(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_file_transfer_protocol(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mav_array_memcpy(void *dest, const void *src, size_t n)
Definition: protocol.h:176
static void mavlink_test_camera_trigger(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_gps_global_origin(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_request_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_raw_imu(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_named_value_float(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_wind_cov(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_landing_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_set_position_target_global_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_resource_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_vibration(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_gps_inject_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_log_request_end(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_attitude_quaternion(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_sensor(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_hil_gps(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_optical_flow(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_item_reached(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_log_entry(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_log_request_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_debug(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_message_interval(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_rc_channels_raw(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_command_ack(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
uint32_t time_utc
static uint16_t mavlink_msg_log_entry_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t *msg, uint16_t id, uint16_t num_logs, uint16_t last_log_num, uint32_t time_utc, uint32_t size)
Pack a log_entry message on a channel.
static void mavlink_test_terrain_check(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_terrain_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_set_current(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_follow_target(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_data_transmission_handshake(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_altitude(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_position_target_global_int(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_param_request_read(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_vision_position_estimate(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_control_system_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
uint16_t id
uint32_t size
static void mavlink_test_log_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_safety_set_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_mission_item(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_extended_sys_state(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
static void mavlink_test_power_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)


rosflight
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 20:00:13