Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_sys_status.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE SYS_STATUS PACKING
3
4#define MAVLINK_MSG_ID_SYS_STATUS 1
5
6MAVPACKED(
7typedef struct __mavlink_sys_status_t {
8 uint32_t onboard_control_sensors_present; /*< Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.*/
9 uint32_t onboard_control_sensors_enabled; /*< Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.*/
10 uint32_t onboard_control_sensors_health; /*< Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.*/
11 uint16_t load; /*< [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000*/
12 uint16_t voltage_battery; /*< [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot*/
13 int16_t current_battery; /*< [cA] Battery current, -1: Current not sent by autopilot*/
14 uint16_t drop_rate_comm; /*< [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)*/
15 uint16_t errors_comm; /*< Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)*/
16 uint16_t errors_count1; /*< Autopilot-specific errors*/
17 uint16_t errors_count2; /*< Autopilot-specific errors*/
18 uint16_t errors_count3; /*< Autopilot-specific errors*/
19 uint16_t errors_count4; /*< Autopilot-specific errors*/
20 int8_t battery_remaining; /*< [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot*/
21 uint32_t onboard_control_sensors_present_extended; /*< Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.*/
22 uint32_t onboard_control_sensors_enabled_extended; /*< Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.*/
23 uint32_t onboard_control_sensors_health_extended; /*< Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.*/
24}) mavlink_sys_status_t;
25
26#define MAVLINK_MSG_ID_SYS_STATUS_LEN 43
27#define MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN 31
28#define MAVLINK_MSG_ID_1_LEN 43
29#define MAVLINK_MSG_ID_1_MIN_LEN 31
30
31#define MAVLINK_MSG_ID_SYS_STATUS_CRC 124
32#define MAVLINK_MSG_ID_1_CRC 124
33
34
35
36#if MAVLINK_COMMAND_24BIT
37#define MAVLINK_MESSAGE_INFO_SYS_STATUS {
38 1,
39 "SYS_STATUS",
40 16,
41 { { "onboard_control_sensors_present", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sys_status_t, onboard_control_sensors_present) },
42 { "onboard_control_sensors_enabled", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled) },
43 { "onboard_control_sensors_health", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_sys_status_t, onboard_control_sensors_health) },
44 { "load", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_sys_status_t, load) },
45 { "voltage_battery", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_sys_status_t, voltage_battery) },
46 { "current_battery", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_sys_status_t, current_battery) },
47 { "battery_remaining", NULL, MAVLINK_TYPE_INT8_T, 0, 30, offsetof(mavlink_sys_status_t, battery_remaining) },
48 { "drop_rate_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_sys_status_t, drop_rate_comm) },
49 { "errors_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_sys_status_t, errors_comm) },
50 { "errors_count1", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_sys_status_t, errors_count1) },
51 { "errors_count2", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sys_status_t, errors_count2) },
52 { "errors_count3", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sys_status_t, errors_count3) },
53 { "errors_count4", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sys_status_t, errors_count4) },
54 { "onboard_control_sensors_present_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 31, offsetof(mavlink_sys_status_t, onboard_control_sensors_present_extended) },
55 { "onboard_control_sensors_enabled_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 35, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled_extended) },
56 { "onboard_control_sensors_health_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 39, offsetof(mavlink_sys_status_t, onboard_control_sensors_health_extended) },
57 } \
58}
59#else
60#define MAVLINK_MESSAGE_INFO_SYS_STATUS {
61 "SYS_STATUS",
62 16,
63 { { "onboard_control_sensors_present", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sys_status_t, onboard_control_sensors_present) },
64 { "onboard_control_sensors_enabled", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled) },
65 { "onboard_control_sensors_health", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_sys_status_t, onboard_control_sensors_health) },
66 { "load", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_sys_status_t, load) },
67 { "voltage_battery", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_sys_status_t, voltage_battery) },
68 { "current_battery", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_sys_status_t, current_battery) },
69 { "battery_remaining", NULL, MAVLINK_TYPE_INT8_T, 0, 30, offsetof(mavlink_sys_status_t, battery_remaining) },
70 { "drop_rate_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_sys_status_t, drop_rate_comm) },
71 { "errors_comm", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_sys_status_t, errors_comm) },
72 { "errors_count1", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_sys_status_t, errors_count1) },
73 { "errors_count2", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sys_status_t, errors_count2) },
74 { "errors_count3", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sys_status_t, errors_count3) },
75 { "errors_count4", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sys_status_t, errors_count4) },
76 { "onboard_control_sensors_present_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 31, offsetof(mavlink_sys_status_t, onboard_control_sensors_present_extended) },
77 { "onboard_control_sensors_enabled_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 35, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled_extended) },
78 { "onboard_control_sensors_health_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 39, offsetof(mavlink_sys_status_t, onboard_control_sensors_health_extended) },
79 } \
80}
81#endif
82
83/**
84 * @brief Pack a sys_status message
85 * @param system_id ID of this system
86 * @param component_id ID of this component (e.g. 200 for IMU)
87 * @param msg The MAVLink message to compress the data into
88 *
89 * @param onboard_control_sensors_present Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
90 * @param onboard_control_sensors_enabled Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
91 * @param onboard_control_sensors_health Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
92 * @param load [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
93 * @param voltage_battery [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot
94 * @param current_battery [cA] Battery current, -1: Current not sent by autopilot
95 * @param battery_remaining [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot
96 * @param drop_rate_comm [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
97 * @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
98 * @param errors_count1 Autopilot-specific errors
99 * @param errors_count2 Autopilot-specific errors
100 * @param errors_count3 Autopilot-specific errors
101 * @param errors_count4 Autopilot-specific errors
102 * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
103 * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
104 * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
105 * @return length of the message in bytes (excluding serial stream start sign)
106 */
107static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
108 uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended)
109{
110#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
112 _mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
113 _mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
114 _mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
115 _mav_put_uint16_t(buf, 12, load);
116 _mav_put_uint16_t(buf, 14, voltage_battery);
117 _mav_put_int16_t(buf, 16, current_battery);
118 _mav_put_uint16_t(buf, 18, drop_rate_comm);
119 _mav_put_uint16_t(buf, 20, errors_comm);
120 _mav_put_uint16_t(buf, 22, errors_count1);
121 _mav_put_uint16_t(buf, 24, errors_count2);
122 _mav_put_uint16_t(buf, 26, errors_count3);
123 _mav_put_uint16_t(buf, 28, errors_count4);
124 _mav_put_int8_t(buf, 30, battery_remaining);
125 _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended);
126 _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended);
127 _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended);
128
129 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN);
130#else
131 mavlink_sys_status_t packet;
132 packet.onboard_control_sensors_present = onboard_control_sensors_present;
133 packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
134 packet.onboard_control_sensors_health = onboard_control_sensors_health;
135 packet.load = load;
136 packet.voltage_battery = voltage_battery;
137 packet.current_battery = current_battery;
138 packet.drop_rate_comm = drop_rate_comm;
139 packet.errors_comm = errors_comm;
140 packet.errors_count1 = errors_count1;
141 packet.errors_count2 = errors_count2;
142 packet.errors_count3 = errors_count3;
143 packet.errors_count4 = errors_count4;
144 packet.battery_remaining = battery_remaining;
145 packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended;
146 packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended;
147 packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended;
148
149 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN);
150#endif
151
152 msg->msgid = MAVLINK_MSG_ID_SYS_STATUS;
153 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
154}
155
156/**
157 * @brief Pack a sys_status message
158 * @param system_id ID of this system
159 * @param component_id ID of this component (e.g. 200 for IMU)
160 * @param status MAVLink status structure
161 * @param msg The MAVLink message to compress the data into
162 *
163 * @param onboard_control_sensors_present Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
164 * @param onboard_control_sensors_enabled Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
165 * @param onboard_control_sensors_health Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
166 * @param load [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
167 * @param voltage_battery [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot
168 * @param current_battery [cA] Battery current, -1: Current not sent by autopilot
169 * @param battery_remaining [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot
170 * @param drop_rate_comm [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
171 * @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
172 * @param errors_count1 Autopilot-specific errors
173 * @param errors_count2 Autopilot-specific errors
174 * @param errors_count3 Autopilot-specific errors
175 * @param errors_count4 Autopilot-specific errors
176 * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
177 * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
178 * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
179 * @return length of the message in bytes (excluding serial stream start sign)
180 */
181static inline uint16_t mavlink_msg_sys_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
182 uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended)
183{
184#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
186 _mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
187 _mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
188 _mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
189 _mav_put_uint16_t(buf, 12, load);
190 _mav_put_uint16_t(buf, 14, voltage_battery);
191 _mav_put_int16_t(buf, 16, current_battery);
192 _mav_put_uint16_t(buf, 18, drop_rate_comm);
193 _mav_put_uint16_t(buf, 20, errors_comm);
194 _mav_put_uint16_t(buf, 22, errors_count1);
195 _mav_put_uint16_t(buf, 24, errors_count2);
196 _mav_put_uint16_t(buf, 26, errors_count3);
197 _mav_put_uint16_t(buf, 28, errors_count4);
198 _mav_put_int8_t(buf, 30, battery_remaining);
199 _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended);
200 _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended);
201 _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended);
202
203 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN);
204#else
205 mavlink_sys_status_t packet;
206 packet.onboard_control_sensors_present = onboard_control_sensors_present;
207 packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
208 packet.onboard_control_sensors_health = onboard_control_sensors_health;
209 packet.load = load;
210 packet.voltage_battery = voltage_battery;
211 packet.current_battery = current_battery;
212 packet.drop_rate_comm = drop_rate_comm;
213 packet.errors_comm = errors_comm;
214 packet.errors_count1 = errors_count1;
215 packet.errors_count2 = errors_count2;
216 packet.errors_count3 = errors_count3;
217 packet.errors_count4 = errors_count4;
218 packet.battery_remaining = battery_remaining;
219 packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended;
220 packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended;
221 packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended;
222
223 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN);
224#endif
225
226 msg->msgid = MAVLINK_MSG_ID_SYS_STATUS;
227#if MAVLINK_CRC_EXTRA
228 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
229#else
230 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN);
231#endif
232}
233
234/**
235 * @brief Pack a sys_status message on a channel
236 * @param system_id ID of this system
237 * @param component_id ID of this component (e.g. 200 for IMU)
238 * @param chan The MAVLink channel this message will be sent over
239 * @param msg The MAVLink message to compress the data into
240 * @param onboard_control_sensors_present Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
241 * @param onboard_control_sensors_enabled Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
242 * @param onboard_control_sensors_health Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
243 * @param load [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
244 * @param voltage_battery [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot
245 * @param current_battery [cA] Battery current, -1: Current not sent by autopilot
246 * @param battery_remaining [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot
247 * @param drop_rate_comm [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
248 * @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
249 * @param errors_count1 Autopilot-specific errors
250 * @param errors_count2 Autopilot-specific errors
251 * @param errors_count3 Autopilot-specific errors
252 * @param errors_count4 Autopilot-specific errors
253 * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
254 * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
255 * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
256 * @return length of the message in bytes (excluding serial stream start sign)
257 */
258static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
259 mavlink_message_t* msg,
260 uint32_t onboard_control_sensors_present,uint32_t onboard_control_sensors_enabled,uint32_t onboard_control_sensors_health,uint16_t load,uint16_t voltage_battery,int16_t current_battery,int8_t battery_remaining,uint16_t drop_rate_comm,uint16_t errors_comm,uint16_t errors_count1,uint16_t errors_count2,uint16_t errors_count3,uint16_t errors_count4,uint32_t onboard_control_sensors_present_extended,uint32_t onboard_control_sensors_enabled_extended,uint32_t onboard_control_sensors_health_extended)
261{
262#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
264 _mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
265 _mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
266 _mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
267 _mav_put_uint16_t(buf, 12, load);
268 _mav_put_uint16_t(buf, 14, voltage_battery);
269 _mav_put_int16_t(buf, 16, current_battery);
270 _mav_put_uint16_t(buf, 18, drop_rate_comm);
271 _mav_put_uint16_t(buf, 20, errors_comm);
272 _mav_put_uint16_t(buf, 22, errors_count1);
273 _mav_put_uint16_t(buf, 24, errors_count2);
274 _mav_put_uint16_t(buf, 26, errors_count3);
275 _mav_put_uint16_t(buf, 28, errors_count4);
276 _mav_put_int8_t(buf, 30, battery_remaining);
277 _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended);
278 _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended);
279 _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended);
280
281 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN);
282#else
283 mavlink_sys_status_t packet;
284 packet.onboard_control_sensors_present = onboard_control_sensors_present;
285 packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
286 packet.onboard_control_sensors_health = onboard_control_sensors_health;
287 packet.load = load;
288 packet.voltage_battery = voltage_battery;
289 packet.current_battery = current_battery;
290 packet.drop_rate_comm = drop_rate_comm;
291 packet.errors_comm = errors_comm;
292 packet.errors_count1 = errors_count1;
293 packet.errors_count2 = errors_count2;
294 packet.errors_count3 = errors_count3;
295 packet.errors_count4 = errors_count4;
296 packet.battery_remaining = battery_remaining;
297 packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended;
298 packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended;
299 packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended;
300
301 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN);
302#endif
303
304 msg->msgid = MAVLINK_MSG_ID_SYS_STATUS;
305 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
306}
307
308/**
309 * @brief Encode a sys_status struct
310 *
311 * @param system_id ID of this system
312 * @param component_id ID of this component (e.g. 200 for IMU)
313 * @param msg The MAVLink message to compress the data into
314 * @param sys_status C-struct to read the message contents from
315 */
316static inline uint16_t mavlink_msg_sys_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status)
317{
318 return mavlink_msg_sys_status_pack(system_id, component_id, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended);
319}
320
321/**
322 * @brief Encode a sys_status struct on a channel
323 *
324 * @param system_id ID of this system
325 * @param component_id ID of this component (e.g. 200 for IMU)
326 * @param chan The MAVLink channel this message will be sent over
327 * @param msg The MAVLink message to compress the data into
328 * @param sys_status C-struct to read the message contents from
329 */
330static inline uint16_t mavlink_msg_sys_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status)
331{
332 return mavlink_msg_sys_status_pack_chan(system_id, component_id, chan, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended);
333}
334
335/**
336 * @brief Encode a sys_status struct with provided status structure
337 *
338 * @param system_id ID of this system
339 * @param component_id ID of this component (e.g. 200 for IMU)
340 * @param status MAVLink status structure
341 * @param msg The MAVLink message to compress the data into
342 * @param sys_status C-struct to read the message contents from
343 */
344static inline uint16_t mavlink_msg_sys_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status)
345{
346 return mavlink_msg_sys_status_pack_status(system_id, component_id, _status, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended);
347}
348
349/**
350 * @brief Send a sys_status message
351 * @param chan MAVLink channel to send the message
352 *
353 * @param onboard_control_sensors_present Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
354 * @param onboard_control_sensors_enabled Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
355 * @param onboard_control_sensors_health Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
356 * @param load [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
357 * @param voltage_battery [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot
358 * @param current_battery [cA] Battery current, -1: Current not sent by autopilot
359 * @param battery_remaining [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot
360 * @param drop_rate_comm [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
361 * @param errors_comm Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
362 * @param errors_count1 Autopilot-specific errors
363 * @param errors_count2 Autopilot-specific errors
364 * @param errors_count3 Autopilot-specific errors
365 * @param errors_count4 Autopilot-specific errors
366 * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
367 * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
368 * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
369 */
370#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
371
372static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended)
373{
374#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
375 char buf[MAVLINK_MSG_ID_SYS_STATUS_LEN];
376 _mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
377 _mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
378 _mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
379 _mav_put_uint16_t(buf, 12, load);
380 _mav_put_uint16_t(buf, 14, voltage_battery);
381 _mav_put_int16_t(buf, 16, current_battery);
382 _mav_put_uint16_t(buf, 18, drop_rate_comm);
383 _mav_put_uint16_t(buf, 20, errors_comm);
384 _mav_put_uint16_t(buf, 22, errors_count1);
385 _mav_put_uint16_t(buf, 24, errors_count2);
386 _mav_put_uint16_t(buf, 26, errors_count3);
387 _mav_put_uint16_t(buf, 28, errors_count4);
388 _mav_put_int8_t(buf, 30, battery_remaining);
389 _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended);
390 _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended);
391 _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended);
392
393 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, buf, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
394#else
395 mavlink_sys_status_t packet;
396 packet.onboard_control_sensors_present = onboard_control_sensors_present;
397 packet.onboard_control_sensors_enabled = onboard_control_sensors_enabled;
398 packet.onboard_control_sensors_health = onboard_control_sensors_health;
399 packet.load = load;
400 packet.voltage_battery = voltage_battery;
401 packet.current_battery = current_battery;
402 packet.drop_rate_comm = drop_rate_comm;
403 packet.errors_comm = errors_comm;
404 packet.errors_count1 = errors_count1;
405 packet.errors_count2 = errors_count2;
406 packet.errors_count3 = errors_count3;
407 packet.errors_count4 = errors_count4;
408 packet.battery_remaining = battery_remaining;
409 packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended;
410 packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended;
411 packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended;
412
413 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
414#endif
415}
416
417/**
418 * @brief Send a sys_status message
419 * @param chan MAVLink channel to send the message
420 * @param struct The MAVLink struct to serialize
421 */
422static inline void mavlink_msg_sys_status_send_struct(mavlink_channel_t chan, const mavlink_sys_status_t* sys_status)
423{
424#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
425 mavlink_msg_sys_status_send(chan, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended);
426#else
427 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)sys_status, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
428#endif
429}
430
431#if MAVLINK_MSG_ID_SYS_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
432/*
433 This variant of _send() can be used to save stack space by reusing
434 memory from the receive buffer. The caller provides a
435 mavlink_message_t which is the size of a full mavlink message. This
436 is usually the receive buffer for the channel, and allows a reply to an
437 incoming message with minimum stack space usage.
438 */
439static inline void mavlink_msg_sys_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended)
440{
441#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
442 char *buf = (char *)msgbuf;
443 _mav_put_uint32_t(buf, 0, onboard_control_sensors_present);
444 _mav_put_uint32_t(buf, 4, onboard_control_sensors_enabled);
445 _mav_put_uint32_t(buf, 8, onboard_control_sensors_health);
446 _mav_put_uint16_t(buf, 12, load);
447 _mav_put_uint16_t(buf, 14, voltage_battery);
448 _mav_put_int16_t(buf, 16, current_battery);
449 _mav_put_uint16_t(buf, 18, drop_rate_comm);
450 _mav_put_uint16_t(buf, 20, errors_comm);
451 _mav_put_uint16_t(buf, 22, errors_count1);
452 _mav_put_uint16_t(buf, 24, errors_count2);
453 _mav_put_uint16_t(buf, 26, errors_count3);
454 _mav_put_uint16_t(buf, 28, errors_count4);
455 _mav_put_int8_t(buf, 30, battery_remaining);
456 _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended);
457 _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended);
458 _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended);
459
460 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, buf, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
461#else
462 mavlink_sys_status_t *packet = (mavlink_sys_status_t *)msgbuf;
463 packet->onboard_control_sensors_present = onboard_control_sensors_present;
464 packet->onboard_control_sensors_enabled = onboard_control_sensors_enabled;
465 packet->onboard_control_sensors_health = onboard_control_sensors_health;
466 packet->load = load;
467 packet->voltage_battery = voltage_battery;
468 packet->current_battery = current_battery;
469 packet->drop_rate_comm = drop_rate_comm;
470 packet->errors_comm = errors_comm;
471 packet->errors_count1 = errors_count1;
472 packet->errors_count2 = errors_count2;
473 packet->errors_count3 = errors_count3;
474 packet->errors_count4 = errors_count4;
475 packet->battery_remaining = battery_remaining;
476 packet->onboard_control_sensors_present_extended = onboard_control_sensors_present_extended;
477 packet->onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended;
478 packet->onboard_control_sensors_health_extended = onboard_control_sensors_health_extended;
479
480 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)packet, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC);
481#endif
482}
483#endif
484
485#endif
486
487// MESSAGE SYS_STATUS UNPACKING
488
489
490/**
491 * @brief Get field onboard_control_sensors_present from sys_status message
492 *
493 * @return Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
494 */
495static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_present(const mavlink_message_t* msg)
496{
497 return _MAV_RETURN_uint32_t(msg, 0);
498}
499
500/**
501 * @brief Get field onboard_control_sensors_enabled from sys_status message
502 *
503 * @return Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
504 */
505static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_enabled(const mavlink_message_t* msg)
506{
507 return _MAV_RETURN_uint32_t(msg, 4);
508}
509
510/**
511 * @brief Get field onboard_control_sensors_health from sys_status message
512 *
513 * @return Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
514 */
515static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_health(const mavlink_message_t* msg)
516{
517 return _MAV_RETURN_uint32_t(msg, 8);
518}
519
520/**
521 * @brief Get field load from sys_status message
522 *
523 * @return [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000
524 */
525static inline uint16_t mavlink_msg_sys_status_get_load(const mavlink_message_t* msg)
526{
527 return _MAV_RETURN_uint16_t(msg, 12);
528}
529
530/**
531 * @brief Get field voltage_battery from sys_status message
532 *
533 * @return [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot
534 */
535static inline uint16_t mavlink_msg_sys_status_get_voltage_battery(const mavlink_message_t* msg)
536{
537 return _MAV_RETURN_uint16_t(msg, 14);
538}
539
540/**
541 * @brief Get field current_battery from sys_status message
542 *
543 * @return [cA] Battery current, -1: Current not sent by autopilot
544 */
545static inline int16_t mavlink_msg_sys_status_get_current_battery(const mavlink_message_t* msg)
546{
547 return _MAV_RETURN_int16_t(msg, 16);
548}
549
550/**
551 * @brief Get field battery_remaining from sys_status message
552 *
553 * @return [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot
554 */
555static inline int8_t mavlink_msg_sys_status_get_battery_remaining(const mavlink_message_t* msg)
556{
557 return _MAV_RETURN_int8_t(msg, 30);
558}
559
560/**
561 * @brief Get field drop_rate_comm from sys_status message
562 *
563 * @return [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
564 */
565static inline uint16_t mavlink_msg_sys_status_get_drop_rate_comm(const mavlink_message_t* msg)
566{
567 return _MAV_RETURN_uint16_t(msg, 18);
568}
569
570/**
571 * @brief Get field errors_comm from sys_status message
572 *
573 * @return Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)
574 */
575static inline uint16_t mavlink_msg_sys_status_get_errors_comm(const mavlink_message_t* msg)
576{
577 return _MAV_RETURN_uint16_t(msg, 20);
578}
579
580/**
581 * @brief Get field errors_count1 from sys_status message
582 *
583 * @return Autopilot-specific errors
584 */
585static inline uint16_t mavlink_msg_sys_status_get_errors_count1(const mavlink_message_t* msg)
586{
587 return _MAV_RETURN_uint16_t(msg, 22);
588}
589
590/**
591 * @brief Get field errors_count2 from sys_status message
592 *
593 * @return Autopilot-specific errors
594 */
595static inline uint16_t mavlink_msg_sys_status_get_errors_count2(const mavlink_message_t* msg)
596{
597 return _MAV_RETURN_uint16_t(msg, 24);
598}
599
600/**
601 * @brief Get field errors_count3 from sys_status message
602 *
603 * @return Autopilot-specific errors
604 */
605static inline uint16_t mavlink_msg_sys_status_get_errors_count3(const mavlink_message_t* msg)
606{
607 return _MAV_RETURN_uint16_t(msg, 26);
608}
609
610/**
611 * @brief Get field errors_count4 from sys_status message
612 *
613 * @return Autopilot-specific errors
614 */
615static inline uint16_t mavlink_msg_sys_status_get_errors_count4(const mavlink_message_t* msg)
616{
617 return _MAV_RETURN_uint16_t(msg, 28);
618}
619
620/**
621 * @brief Get field onboard_control_sensors_present_extended from sys_status message
622 *
623 * @return Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.
624 */
625static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_present_extended(const mavlink_message_t* msg)
626{
627 return _MAV_RETURN_uint32_t(msg, 31);
628}
629
630/**
631 * @brief Get field onboard_control_sensors_enabled_extended from sys_status message
632 *
633 * @return Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.
634 */
635static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_enabled_extended(const mavlink_message_t* msg)
636{
637 return _MAV_RETURN_uint32_t(msg, 35);
638}
639
640/**
641 * @brief Get field onboard_control_sensors_health_extended from sys_status message
642 *
643 * @return Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.
644 */
645static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_health_extended(const mavlink_message_t* msg)
646{
647 return _MAV_RETURN_uint32_t(msg, 39);
648}
649
650/**
651 * @brief Decode a sys_status message into a struct
652 *
653 * @param msg The message to decode
654 * @param sys_status C-struct to decode the message contents into
655 */
656static inline void mavlink_msg_sys_status_decode(const mavlink_message_t* msg, mavlink_sys_status_t* sys_status)
657{
658#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
659 sys_status->onboard_control_sensors_present = mavlink_msg_sys_status_get_onboard_control_sensors_present(msg);
660 sys_status->onboard_control_sensors_enabled = mavlink_msg_sys_status_get_onboard_control_sensors_enabled(msg);
661 sys_status->onboard_control_sensors_health = mavlink_msg_sys_status_get_onboard_control_sensors_health(msg);
662 sys_status->load = mavlink_msg_sys_status_get_load(msg);
663 sys_status->voltage_battery = mavlink_msg_sys_status_get_voltage_battery(msg);
664 sys_status->current_battery = mavlink_msg_sys_status_get_current_battery(msg);
665 sys_status->drop_rate_comm = mavlink_msg_sys_status_get_drop_rate_comm(msg);
666 sys_status->errors_comm = mavlink_msg_sys_status_get_errors_comm(msg);
667 sys_status->errors_count1 = mavlink_msg_sys_status_get_errors_count1(msg);
668 sys_status->errors_count2 = mavlink_msg_sys_status_get_errors_count2(msg);
669 sys_status->errors_count3 = mavlink_msg_sys_status_get_errors_count3(msg);
670 sys_status->errors_count4 = mavlink_msg_sys_status_get_errors_count4(msg);
671 sys_status->battery_remaining = mavlink_msg_sys_status_get_battery_remaining(msg);
672 sys_status->onboard_control_sensors_present_extended = mavlink_msg_sys_status_get_onboard_control_sensors_present_extended(msg);
673 sys_status->onboard_control_sensors_enabled_extended = mavlink_msg_sys_status_get_onboard_control_sensors_enabled_extended(msg);
674 sys_status->onboard_control_sensors_health_extended = mavlink_msg_sys_status_get_onboard_control_sensors_health_extended(msg);
675#else
676 uint8_t len = msg->len < MAVLINK_MSG_ID_SYS_STATUS_LEN? msg->len : MAVLINK_MSG_ID_SYS_STATUS_LEN;
677 memset(sys_status, 0, MAVLINK_MSG_ID_SYS_STATUS_LEN);
678 memcpy(sys_status, _MAV_PAYLOAD(msg), len);
679#endif
680}