5 #ifndef MINIMAL_TESTSUITE_H
6 #define MINIMAL_TESTSUITE_H
12 #ifndef MAVLINK_TEST_ALL
13 #define MAVLINK_TEST_ALL
15 static void mavlink_test_minimal(uint8_t, uint8_t, mavlink_message_t *last_msg);
17 static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
20 mavlink_test_minimal(system_id, component_id, last_msg);
27 static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
29 mavlink_message_t msg;
33 963497464,17,84,151,218,2
36 memset(&packet1, 0,
sizeof(packet1));
46 memset(&packet2, 0,
sizeof(packet2));
47 mavlink_msg_heartbeat_encode(system_id, component_id, &msg, &packet1);
48 mavlink_msg_heartbeat_decode(&msg, &packet2);
51 memset(&packet2, 0,
sizeof(packet2));
53 mavlink_msg_heartbeat_decode(&msg, &packet2);
56 memset(&packet2, 0,
sizeof(packet2));
58 mavlink_msg_heartbeat_decode(&msg, &packet2);
61 memset(&packet2, 0,
sizeof(packet2));
63 for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
66 mavlink_msg_heartbeat_decode(last_msg, &packet2);
69 memset(&packet2, 0,
sizeof(packet2));
71 mavlink_msg_heartbeat_decode(last_msg, &packet2);
75 static void mavlink_test_minimal(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
77 mavlink_test_heartbeat(system_id, component_id, last_msg);
83 #endif // MINIMAL_TESTSUITE_H
Definition: mavlink_types.h:180
Definition: mavlink_types.h:179
uint8_t type
Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM) ...
Definition: mavlink_msg_heartbeat.h:8
Definition: mavlink_msg_heartbeat.h:5
uint8_t base_mode
System mode bitfield, see MAV_MODE_FLAG ENUM in mavlink/include/mavlink_types.h.
Definition: mavlink_msg_heartbeat.h:10
#define MAVLINK_ASSERT(x)
Definition: protocol.h:26
uint8_t system_status
System status flag, see MAV_STATE ENUM.
Definition: mavlink_msg_heartbeat.h:11
uint32_t custom_mode
A bitfield for use for autopilot-specific flags.
Definition: mavlink_msg_heartbeat.h:7
#define MAVLINK_MAX_PACKET_LEN
Maximum packet length.
Definition: mavlink_types.h:33
MAVLINK_HELPER uint16_t mavlink_msg_to_send_buffer(uint8_t *buffer, const mavlink_message_t *msg)
Pack a message to send it over a serial byte stream.
Definition: mavlink_helpers.h:174
uint8_t mavlink_version
MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mav...
Definition: mavlink_msg_heartbeat.h:12
uint8_t autopilot
Autopilot type / class. defined in MAV_AUTOPILOT ENUM.
Definition: mavlink_msg_heartbeat.h:9