4#define MAVLINK_MSG_ID_RAW_PRESSURE 28
13} mavlink_raw_pressure_t;
15#define MAVLINK_MSG_ID_RAW_PRESSURE_LEN 16
16#define MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN 16
17#define MAVLINK_MSG_ID_28_LEN 16
18#define MAVLINK_MSG_ID_28_MIN_LEN 16
20#define MAVLINK_MSG_ID_RAW_PRESSURE_CRC 67
21#define MAVLINK_MSG_ID_28_CRC 67
25#if MAVLINK_COMMAND_24BIT
26#define MAVLINK_MESSAGE_INFO_RAW_PRESSURE {
30 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_raw_pressure_t, time_usec) },
31 { "press_abs", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_raw_pressure_t, press_abs) },
32 { "press_diff1", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_raw_pressure_t, press_diff1) },
33 { "press_diff2", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_raw_pressure_t, press_diff2) },
34 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_raw_pressure_t, temperature) },
36}
38#define MAVLINK_MESSAGE_INFO_RAW_PRESSURE {
41 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_raw_pressure_t, time_usec) },
42 { "press_abs", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_raw_pressure_t, press_abs) },
43 { "press_diff1", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_raw_pressure_t, press_diff1) },
44 { "press_diff2", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_raw_pressure_t, press_diff2) },
45 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_raw_pressure_t, temperature) },
47}
51
52
53
54
55
56
57
58
59
60
61
62
63static inline uint16_t mavlink_msg_raw_pressure_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
64 uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
66#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
68 _mav_put_uint64_t(buf, 0, time_usec);
69 _mav_put_int16_t(buf, 8, press_abs);
70 _mav_put_int16_t(buf, 10, press_diff1);
71 _mav_put_int16_t(buf, 12, press_diff2);
72 _mav_put_int16_t(buf, 14, temperature);
76 mavlink_raw_pressure_t packet;
77 packet.time_usec = time_usec;
78 packet.press_abs = press_abs;
79 packet.press_diff1 = press_diff1;
80 packet.press_diff2 = press_diff2;
81 packet.temperature = temperature;
83 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
91
92
93
94
95
96
97
98
99
100
101
102
103
104static inline uint16_t mavlink_msg_raw_pressure_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
105 uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
107#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
109 _mav_put_uint64_t(buf, 0, time_usec);
110 _mav_put_int16_t(buf, 8, press_abs);
111 _mav_put_int16_t(buf, 10, press_diff1);
112 _mav_put_int16_t(buf, 12, press_diff2);
113 _mav_put_int16_t(buf, 14, temperature);
117 mavlink_raw_pressure_t packet;
118 packet.time_usec = time_usec;
119 packet.press_abs = press_abs;
120 packet.press_diff1 = press_diff1;
121 packet.press_diff2 = press_diff2;
122 packet.temperature = temperature;
124 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
129 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
136
137
138
139
140
141
142
143
144
145
146
147
148static inline uint16_t mavlink_msg_raw_pressure_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
149 mavlink_message_t* msg,
150 uint64_t time_usec,int16_t press_abs,int16_t press_diff1,int16_t press_diff2,int16_t temperature)
152#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
154 _mav_put_uint64_t(buf, 0, time_usec);
155 _mav_put_int16_t(buf, 8, press_abs);
156 _mav_put_int16_t(buf, 10, press_diff1);
157 _mav_put_int16_t(buf, 12, press_diff2);
158 _mav_put_int16_t(buf, 14, temperature);
162 mavlink_raw_pressure_t packet;
163 packet.time_usec = time_usec;
164 packet.press_abs = press_abs;
165 packet.press_diff1 = press_diff1;
166 packet.press_diff2 = press_diff2;
167 packet.temperature = temperature;
169 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
177
178
179
180
181
182
183
184static inline uint16_t mavlink_msg_raw_pressure_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_raw_pressure_t* raw_pressure)
186 return mavlink_msg_raw_pressure_pack(system_id, component_id, msg, raw_pressure->time_usec, raw_pressure->press_abs, raw_pressure->press_diff1, raw_pressure->press_diff2, raw_pressure->temperature);
190
191
192
193
194
195
196
197
198static inline uint16_t mavlink_msg_raw_pressure_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_raw_pressure_t* raw_pressure)
200 return mavlink_msg_raw_pressure_pack_chan(system_id, component_id, chan, msg, raw_pressure->time_usec, raw_pressure->press_abs, raw_pressure->press_diff1, raw_pressure->press_diff2, raw_pressure->temperature);
204
205
206
207
208
209
210
211
212static inline uint16_t mavlink_msg_raw_pressure_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_raw_pressure_t* raw_pressure)
214 return mavlink_msg_raw_pressure_pack_status(system_id, component_id, _status, msg, raw_pressure->time_usec, raw_pressure->press_abs, raw_pressure->press_diff1, raw_pressure->press_diff2, raw_pressure->temperature);
218
219
220
221
222
223
224
225
226
227#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
229static inline void mavlink_msg_raw_pressure_send(mavlink_channel_t chan, uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
231#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
232 char buf[MAVLINK_MSG_ID_RAW_PRESSURE_LEN];
233 _mav_put_uint64_t(buf, 0, time_usec);
234 _mav_put_int16_t(buf, 8, press_abs);
235 _mav_put_int16_t(buf, 10, press_diff1);
236 _mav_put_int16_t(buf, 12, press_diff2);
237 _mav_put_int16_t(buf, 14, temperature);
239 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
241 mavlink_raw_pressure_t packet;
242 packet.time_usec = time_usec;
243 packet.press_abs = press_abs;
244 packet.press_diff1 = press_diff1;
245 packet.press_diff2 = press_diff2;
246 packet.temperature = temperature;
248 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (
const char *)&packet, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
253
254
255
256
257static inline void mavlink_msg_raw_pressure_send_struct(mavlink_channel_t chan,
const mavlink_raw_pressure_t* raw_pressure)
259#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
260 mavlink_msg_raw_pressure_send(chan, raw_pressure->time_usec, raw_pressure->press_abs, raw_pressure->press_diff1, raw_pressure->press_diff2, raw_pressure->temperature);
262 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (
const char *)raw_pressure, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
266#if MAVLINK_MSG_ID_RAW_PRESSURE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
268
269
270
271
272
273
274static inline void mavlink_msg_raw_pressure_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, int16_t press_abs, int16_t press_diff1, int16_t press_diff2, int16_t temperature)
276#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
277 char *buf = (
char *)msgbuf;
278 _mav_put_uint64_t(buf, 0, time_usec);
279 _mav_put_int16_t(buf, 8, press_abs);
280 _mav_put_int16_t(buf, 10, press_diff1);
281 _mav_put_int16_t(buf, 12, press_diff2);
282 _mav_put_int16_t(buf, 14, temperature);
284 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, buf, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
286 mavlink_raw_pressure_t *packet = (mavlink_raw_pressure_t *)msgbuf;
287 packet->time_usec = time_usec;
288 packet->press_abs = press_abs;
289 packet->press_diff1 = press_diff1;
290 packet->press_diff2 = press_diff2;
291 packet->temperature = temperature;
293 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_PRESSURE, (
const char *)packet, MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_LEN, MAVLINK_MSG_ID_RAW_PRESSURE_CRC);
304
305
306
307
308static inline uint64_t mavlink_msg_raw_pressure_get_time_usec(
const mavlink_message_t* msg)
310 return _MAV_RETURN_uint64_t(msg, 0);
314
315
316
317
318static inline int16_t mavlink_msg_raw_pressure_get_press_abs(
const mavlink_message_t* msg)
320 return _MAV_RETURN_int16_t(msg, 8);
324
325
326
327
328static inline int16_t mavlink_msg_raw_pressure_get_press_diff1(
const mavlink_message_t* msg)
330 return _MAV_RETURN_int16_t(msg, 10);
334
335
336
337
338static inline int16_t mavlink_msg_raw_pressure_get_press_diff2(
const mavlink_message_t* msg)
340 return _MAV_RETURN_int16_t(msg, 12);
344
345
346
347
348static inline int16_t mavlink_msg_raw_pressure_get_temperature(
const mavlink_message_t* msg)
350 return _MAV_RETURN_int16_t(msg, 14);
354
355
356
357
358
359static inline void mavlink_msg_raw_pressure_decode(
const mavlink_message_t* msg, mavlink_raw_pressure_t* raw_pressure)
361#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
362 raw_pressure->time_usec = mavlink_msg_raw_pressure_get_time_usec(msg);
363 raw_pressure->press_abs = mavlink_msg_raw_pressure_get_press_abs(msg);
364 raw_pressure->press_diff1 = mavlink_msg_raw_pressure_get_press_diff1(msg);
365 raw_pressure->press_diff2 = mavlink_msg_raw_pressure_get_press_diff2(msg);
366 raw_pressure->temperature = mavlink_msg_raw_pressure_get_temperature(msg);
368 uint8_t len = msg->len < MAVLINK_MSG_ID_RAW_PRESSURE_LEN? msg->len : MAVLINK_MSG_ID_RAW_PRESSURE_LEN;
369 memset(raw_pressure, 0, MAVLINK_MSG_ID_RAW_PRESSURE_LEN);
370 memcpy(raw_pressure, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_RAW_PRESSURE_MIN_LEN
Definition: mavlink_msg_raw_pressure.h:16
#define MAVLINK_MSG_ID_RAW_PRESSURE
Definition: mavlink_msg_raw_pressure.h:4
#define MAVLINK_MSG_ID_RAW_PRESSURE_CRC
Definition: mavlink_msg_raw_pressure.h:20
#define MAVLINK_MSG_ID_RAW_PRESSURE_LEN
Definition: mavlink_msg_raw_pressure.h:15
Definition: mavlink_msg_raw_pressure.h:7
uint64_t time_usec
Definition: mavlink_msg_raw_pressure.h:8
int16_t temperature
Definition: mavlink_msg_raw_pressure.h:12
int16_t press_diff1
Definition: mavlink_msg_raw_pressure.h:10
int16_t press_diff2
Definition: mavlink_msg_raw_pressure.h:11
int16_t press_abs
Definition: mavlink_msg_raw_pressure.h:9