Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_camera_thermal_range.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE CAMERA_THERMAL_RANGE PACKING
3
4#define MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE 277
5
6
8 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
9 float max; /*< [degC] Temperature max.*/
10 float max_point_x; /*< Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.*/
11 float max_point_y; /*< Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.*/
12 float min; /*< [degC] Temperature min.*/
13 float min_point_x; /*< Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.*/
14 float min_point_y; /*< Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.*/
15 uint8_t stream_id; /*< Video Stream ID (1 for first, 2 for second, etc.)*/
16 uint8_t camera_device_id; /*< Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).*/
17} mavlink_camera_thermal_range_t;
18
19#define MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN 30
20#define MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN 30
21#define MAVLINK_MSG_ID_277_LEN 30
22#define MAVLINK_MSG_ID_277_MIN_LEN 30
23
24#define MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC 62
25#define MAVLINK_MSG_ID_277_CRC 62
26
27
28
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_CAMERA_THERMAL_RANGE {
31 277,
32 "CAMERA_THERMAL_RANGE",
33 9,
34 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_thermal_range_t, time_boot_ms) },
35 { "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_camera_thermal_range_t, stream_id) },
36 { "camera_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_camera_thermal_range_t, camera_device_id) },
37 { "max", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_camera_thermal_range_t, max) },
38 { "max_point_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_thermal_range_t, max_point_x) },
39 { "max_point_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_thermal_range_t, max_point_y) },
40 { "min", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_thermal_range_t, min) },
41 { "min_point_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_thermal_range_t, min_point_x) },
42 { "min_point_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_camera_thermal_range_t, min_point_y) },
43 } \
44}
45#else
46#define MAVLINK_MESSAGE_INFO_CAMERA_THERMAL_RANGE {
47 "CAMERA_THERMAL_RANGE",
48 9,
49 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_thermal_range_t, time_boot_ms) },
50 { "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_camera_thermal_range_t, stream_id) },
51 { "camera_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_camera_thermal_range_t, camera_device_id) },
52 { "max", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_camera_thermal_range_t, max) },
53 { "max_point_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_thermal_range_t, max_point_x) },
54 { "max_point_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_thermal_range_t, max_point_y) },
55 { "min", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_thermal_range_t, min) },
56 { "min_point_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_thermal_range_t, min_point_x) },
57 { "min_point_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_camera_thermal_range_t, min_point_y) },
58 } \
59}
60#endif
61
62/**
63 * @brief Pack a camera_thermal_range message
64 * @param system_id ID of this system
65 * @param component_id ID of this component (e.g. 200 for IMU)
66 * @param msg The MAVLink message to compress the data into
67 *
68 * @param time_boot_ms [ms] Timestamp (time since system boot).
69 * @param stream_id Video Stream ID (1 for first, 2 for second, etc.)
70 * @param camera_device_id Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).
71 * @param max [degC] Temperature max.
72 * @param max_point_x Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
73 * @param max_point_y Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
74 * @param min [degC] Temperature min.
75 * @param min_point_x Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
76 * @param min_point_y Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
77 * @return length of the message in bytes (excluding serial stream start sign)
78 */
79static inline uint16_t mavlink_msg_camera_thermal_range_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint32_t time_boot_ms, uint8_t stream_id, uint8_t camera_device_id, float max, float max_point_x, float max_point_y, float min, float min_point_x, float min_point_y)
81{
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 _mav_put_uint32_t(buf, 0, time_boot_ms);
85 _mav_put_float(buf, 4, max);
86 _mav_put_float(buf, 8, max_point_x);
87 _mav_put_float(buf, 12, max_point_y);
88 _mav_put_float(buf, 16, min);
89 _mav_put_float(buf, 20, min_point_x);
90 _mav_put_float(buf, 24, min_point_y);
91 _mav_put_uint8_t(buf, 28, stream_id);
92 _mav_put_uint8_t(buf, 29, camera_device_id);
93
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
95#else
96 mavlink_camera_thermal_range_t packet;
97 packet.time_boot_ms = time_boot_ms;
98 packet.max = max;
99 packet.max_point_x = max_point_x;
100 packet.max_point_y = max_point_y;
101 packet.min = min;
102 packet.min_point_x = min_point_x;
103 packet.min_point_y = min_point_y;
104 packet.stream_id = stream_id;
105 packet.camera_device_id = camera_device_id;
106
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
108#endif
109
112}
113
114/**
115 * @brief Pack a camera_thermal_range message
116 * @param system_id ID of this system
117 * @param component_id ID of this component (e.g. 200 for IMU)
118 * @param status MAVLink status structure
119 * @param msg The MAVLink message to compress the data into
120 *
121 * @param time_boot_ms [ms] Timestamp (time since system boot).
122 * @param stream_id Video Stream ID (1 for first, 2 for second, etc.)
123 * @param camera_device_id Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).
124 * @param max [degC] Temperature max.
125 * @param max_point_x Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
126 * @param max_point_y Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
127 * @param min [degC] Temperature min.
128 * @param min_point_x Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
129 * @param min_point_y Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
130 * @return length of the message in bytes (excluding serial stream start sign)
131 */
132static inline uint16_t mavlink_msg_camera_thermal_range_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
133 uint32_t time_boot_ms, uint8_t stream_id, uint8_t camera_device_id, float max, float max_point_x, float max_point_y, float min, float min_point_x, float min_point_y)
134{
135#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
137 _mav_put_uint32_t(buf, 0, time_boot_ms);
138 _mav_put_float(buf, 4, max);
139 _mav_put_float(buf, 8, max_point_x);
140 _mav_put_float(buf, 12, max_point_y);
141 _mav_put_float(buf, 16, min);
142 _mav_put_float(buf, 20, min_point_x);
143 _mav_put_float(buf, 24, min_point_y);
144 _mav_put_uint8_t(buf, 28, stream_id);
145 _mav_put_uint8_t(buf, 29, camera_device_id);
146
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
148#else
149 mavlink_camera_thermal_range_t packet;
150 packet.time_boot_ms = time_boot_ms;
151 packet.max = max;
152 packet.max_point_x = max_point_x;
153 packet.max_point_y = max_point_y;
154 packet.min = min;
155 packet.min_point_x = min_point_x;
156 packet.min_point_y = min_point_y;
157 packet.stream_id = stream_id;
158 packet.camera_device_id = camera_device_id;
159
160 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
161#endif
162
164#if MAVLINK_CRC_EXTRA
165 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
166#else
167 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
168#endif
169}
170
171/**
172 * @brief Pack a camera_thermal_range message on a channel
173 * @param system_id ID of this system
174 * @param component_id ID of this component (e.g. 200 for IMU)
175 * @param chan The MAVLink channel this message will be sent over
176 * @param msg The MAVLink message to compress the data into
177 * @param time_boot_ms [ms] Timestamp (time since system boot).
178 * @param stream_id Video Stream ID (1 for first, 2 for second, etc.)
179 * @param camera_device_id Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).
180 * @param max [degC] Temperature max.
181 * @param max_point_x Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
182 * @param max_point_y Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
183 * @param min [degC] Temperature min.
184 * @param min_point_x Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
185 * @param min_point_y Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
186 * @return length of the message in bytes (excluding serial stream start sign)
187 */
188static inline uint16_t mavlink_msg_camera_thermal_range_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
189 mavlink_message_t* msg,
190 uint32_t time_boot_ms,uint8_t stream_id,uint8_t camera_device_id,float max,float max_point_x,float max_point_y,float min,float min_point_x,float min_point_y)
191{
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 _mav_put_uint32_t(buf, 0, time_boot_ms);
195 _mav_put_float(buf, 4, max);
196 _mav_put_float(buf, 8, max_point_x);
197 _mav_put_float(buf, 12, max_point_y);
198 _mav_put_float(buf, 16, min);
199 _mav_put_float(buf, 20, min_point_x);
200 _mav_put_float(buf, 24, min_point_y);
201 _mav_put_uint8_t(buf, 28, stream_id);
202 _mav_put_uint8_t(buf, 29, camera_device_id);
203
204 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
205#else
206 mavlink_camera_thermal_range_t packet;
207 packet.time_boot_ms = time_boot_ms;
208 packet.max = max;
209 packet.max_point_x = max_point_x;
210 packet.max_point_y = max_point_y;
211 packet.min = min;
212 packet.min_point_x = min_point_x;
213 packet.min_point_y = min_point_y;
214 packet.stream_id = stream_id;
215 packet.camera_device_id = camera_device_id;
216
217 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
218#endif
219
221 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
222}
223
224/**
225 * @brief Encode a camera_thermal_range struct
226 *
227 * @param system_id ID of this system
228 * @param component_id ID of this component (e.g. 200 for IMU)
229 * @param msg The MAVLink message to compress the data into
230 * @param camera_thermal_range C-struct to read the message contents from
231 */
232static inline uint16_t mavlink_msg_camera_thermal_range_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_thermal_range_t* camera_thermal_range)
233{
234 return mavlink_msg_camera_thermal_range_pack(system_id, component_id, msg, camera_thermal_range->time_boot_ms, camera_thermal_range->stream_id, camera_thermal_range->camera_device_id, camera_thermal_range->max, camera_thermal_range->max_point_x, camera_thermal_range->max_point_y, camera_thermal_range->min, camera_thermal_range->min_point_x, camera_thermal_range->min_point_y);
235}
236
237/**
238 * @brief Encode a camera_thermal_range struct on a channel
239 *
240 * @param system_id ID of this system
241 * @param component_id ID of this component (e.g. 200 for IMU)
242 * @param chan The MAVLink channel this message will be sent over
243 * @param msg The MAVLink message to compress the data into
244 * @param camera_thermal_range C-struct to read the message contents from
245 */
246static inline uint16_t mavlink_msg_camera_thermal_range_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_thermal_range_t* camera_thermal_range)
247{
248 return mavlink_msg_camera_thermal_range_pack_chan(system_id, component_id, chan, msg, camera_thermal_range->time_boot_ms, camera_thermal_range->stream_id, camera_thermal_range->camera_device_id, camera_thermal_range->max, camera_thermal_range->max_point_x, camera_thermal_range->max_point_y, camera_thermal_range->min, camera_thermal_range->min_point_x, camera_thermal_range->min_point_y);
249}
250
251/**
252 * @brief Encode a camera_thermal_range struct with provided status structure
253 *
254 * @param system_id ID of this system
255 * @param component_id ID of this component (e.g. 200 for IMU)
256 * @param status MAVLink status structure
257 * @param msg The MAVLink message to compress the data into
258 * @param camera_thermal_range C-struct to read the message contents from
259 */
260static inline uint16_t mavlink_msg_camera_thermal_range_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_camera_thermal_range_t* camera_thermal_range)
261{
262 return mavlink_msg_camera_thermal_range_pack_status(system_id, component_id, _status, msg, camera_thermal_range->time_boot_ms, camera_thermal_range->stream_id, camera_thermal_range->camera_device_id, camera_thermal_range->max, camera_thermal_range->max_point_x, camera_thermal_range->max_point_y, camera_thermal_range->min, camera_thermal_range->min_point_x, camera_thermal_range->min_point_y);
263}
264
265/**
266 * @brief Send a camera_thermal_range message
267 * @param chan MAVLink channel to send the message
268 *
269 * @param time_boot_ms [ms] Timestamp (time since system boot).
270 * @param stream_id Video Stream ID (1 for first, 2 for second, etc.)
271 * @param camera_device_id Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).
272 * @param max [degC] Temperature max.
273 * @param max_point_x Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
274 * @param max_point_y Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
275 * @param min [degC] Temperature min.
276 * @param min_point_x Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
277 * @param min_point_y Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
278 */
279#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
280
281static inline void mavlink_msg_camera_thermal_range_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t stream_id, uint8_t camera_device_id, float max, float max_point_x, float max_point_y, float min, float min_point_x, float min_point_y)
282{
283#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
284 char buf[MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN];
285 _mav_put_uint32_t(buf, 0, time_boot_ms);
286 _mav_put_float(buf, 4, max);
287 _mav_put_float(buf, 8, max_point_x);
288 _mav_put_float(buf, 12, max_point_y);
289 _mav_put_float(buf, 16, min);
290 _mav_put_float(buf, 20, min_point_x);
291 _mav_put_float(buf, 24, min_point_y);
292 _mav_put_uint8_t(buf, 28, stream_id);
293 _mav_put_uint8_t(buf, 29, camera_device_id);
294
295 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, buf, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
296#else
297 mavlink_camera_thermal_range_t packet;
298 packet.time_boot_ms = time_boot_ms;
299 packet.max = max;
300 packet.max_point_x = max_point_x;
301 packet.max_point_y = max_point_y;
302 packet.min = min;
303 packet.min_point_x = min_point_x;
304 packet.min_point_y = min_point_y;
305 packet.stream_id = stream_id;
306 packet.camera_device_id = camera_device_id;
307
308 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
309#endif
310}
311
312/**
313 * @brief Send a camera_thermal_range message
314 * @param chan MAVLink channel to send the message
315 * @param struct The MAVLink struct to serialize
316 */
317static inline void mavlink_msg_camera_thermal_range_send_struct(mavlink_channel_t chan, const mavlink_camera_thermal_range_t* camera_thermal_range)
318{
319#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
320 mavlink_msg_camera_thermal_range_send(chan, camera_thermal_range->time_boot_ms, camera_thermal_range->stream_id, camera_thermal_range->camera_device_id, camera_thermal_range->max, camera_thermal_range->max_point_x, camera_thermal_range->max_point_y, camera_thermal_range->min, camera_thermal_range->min_point_x, camera_thermal_range->min_point_y);
321#else
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, (const char *)camera_thermal_range, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
323#endif
324}
325
326#if MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
327/*
328 This variant of _send() can be used to save stack space by reusing
329 memory from the receive buffer. The caller provides a
330 mavlink_message_t which is the size of a full mavlink message. This
331 is usually the receive buffer for the channel, and allows a reply to an
332 incoming message with minimum stack space usage.
333 */
334static inline void mavlink_msg_camera_thermal_range_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t stream_id, uint8_t camera_device_id, float max, float max_point_x, float max_point_y, float min, float min_point_x, float min_point_y)
335{
336#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
337 char *buf = (char *)msgbuf;
338 _mav_put_uint32_t(buf, 0, time_boot_ms);
339 _mav_put_float(buf, 4, max);
340 _mav_put_float(buf, 8, max_point_x);
341 _mav_put_float(buf, 12, max_point_y);
342 _mav_put_float(buf, 16, min);
343 _mav_put_float(buf, 20, min_point_x);
344 _mav_put_float(buf, 24, min_point_y);
345 _mav_put_uint8_t(buf, 28, stream_id);
346 _mav_put_uint8_t(buf, 29, camera_device_id);
347
348 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, buf, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
349#else
350 mavlink_camera_thermal_range_t *packet = (mavlink_camera_thermal_range_t *)msgbuf;
351 packet->time_boot_ms = time_boot_ms;
352 packet->max = max;
353 packet->max_point_x = max_point_x;
354 packet->max_point_y = max_point_y;
355 packet->min = min;
356 packet->min_point_x = min_point_x;
357 packet->min_point_y = min_point_y;
358 packet->stream_id = stream_id;
359 packet->camera_device_id = camera_device_id;
360
361 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, (const char *)packet, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_MIN_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_CRC);
362#endif
363}
364#endif
365
366#endif
367
368// MESSAGE CAMERA_THERMAL_RANGE UNPACKING
369
370
371/**
372 * @brief Get field time_boot_ms from camera_thermal_range message
373 *
374 * @return [ms] Timestamp (time since system boot).
375 */
376static inline uint32_t mavlink_msg_camera_thermal_range_get_time_boot_ms(const mavlink_message_t* msg)
377{
378 return _MAV_RETURN_uint32_t(msg, 0);
379}
380
381/**
382 * @brief Get field stream_id from camera_thermal_range message
383 *
384 * @return Video Stream ID (1 for first, 2 for second, etc.)
385 */
386static inline uint8_t mavlink_msg_camera_thermal_range_get_stream_id(const mavlink_message_t* msg)
387{
388 return _MAV_RETURN_uint8_t(msg, 28);
389}
390
391/**
392 * @brief Get field camera_device_id from camera_thermal_range message
393 *
394 * @return Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id).
395 */
396static inline uint8_t mavlink_msg_camera_thermal_range_get_camera_device_id(const mavlink_message_t* msg)
397{
398 return _MAV_RETURN_uint8_t(msg, 29);
399}
400
401/**
402 * @brief Get field max from camera_thermal_range message
403 *
404 * @return [degC] Temperature max.
405 */
406static inline float mavlink_msg_camera_thermal_range_get_max(const mavlink_message_t* msg)
407{
408 return _MAV_RETURN_float(msg, 4);
409}
410
411/**
412 * @brief Get field max_point_x from camera_thermal_range message
413 *
414 * @return Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
415 */
416static inline float mavlink_msg_camera_thermal_range_get_max_point_x(const mavlink_message_t* msg)
417{
418 return _MAV_RETURN_float(msg, 8);
419}
420
421/**
422 * @brief Get field max_point_y from camera_thermal_range message
423 *
424 * @return Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
425 */
426static inline float mavlink_msg_camera_thermal_range_get_max_point_y(const mavlink_message_t* msg)
427{
428 return _MAV_RETURN_float(msg, 12);
429}
430
431/**
432 * @brief Get field min from camera_thermal_range message
433 *
434 * @return [degC] Temperature min.
435 */
436static inline float mavlink_msg_camera_thermal_range_get_min(const mavlink_message_t* msg)
437{
438 return _MAV_RETURN_float(msg, 16);
439}
440
441/**
442 * @brief Get field min_point_x from camera_thermal_range message
443 *
444 * @return Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown.
445 */
446static inline float mavlink_msg_camera_thermal_range_get_min_point_x(const mavlink_message_t* msg)
447{
448 return _MAV_RETURN_float(msg, 20);
449}
450
451/**
452 * @brief Get field min_point_y from camera_thermal_range message
453 *
454 * @return Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown.
455 */
456static inline float mavlink_msg_camera_thermal_range_get_min_point_y(const mavlink_message_t* msg)
457{
458 return _MAV_RETURN_float(msg, 24);
459}
460
461/**
462 * @brief Decode a camera_thermal_range message into a struct
463 *
464 * @param msg The message to decode
465 * @param camera_thermal_range C-struct to decode the message contents into
466 */
467static inline void mavlink_msg_camera_thermal_range_decode(const mavlink_message_t* msg, mavlink_camera_thermal_range_t* camera_thermal_range)
468{
469#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
470 camera_thermal_range->time_boot_ms = mavlink_msg_camera_thermal_range_get_time_boot_ms(msg);
471 camera_thermal_range->max = mavlink_msg_camera_thermal_range_get_max(msg);
472 camera_thermal_range->max_point_x = mavlink_msg_camera_thermal_range_get_max_point_x(msg);
473 camera_thermal_range->max_point_y = mavlink_msg_camera_thermal_range_get_max_point_y(msg);
474 camera_thermal_range->min = mavlink_msg_camera_thermal_range_get_min(msg);
475 camera_thermal_range->min_point_x = mavlink_msg_camera_thermal_range_get_min_point_x(msg);
476 camera_thermal_range->min_point_y = mavlink_msg_camera_thermal_range_get_min_point_y(msg);
477 camera_thermal_range->stream_id = mavlink_msg_camera_thermal_range_get_stream_id(msg);
478 camera_thermal_range->camera_device_id = mavlink_msg_camera_thermal_range_get_camera_device_id(msg);
479#else
480 uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN;
481 memset(camera_thermal_range, 0, MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE_LEN);
482 memcpy(camera_thermal_range, _MAV_PAYLOAD(msg), len);
483#endif
484}