4#define MAVLINK_MSG_ID_RAW_RPM 339
12#define MAVLINK_MSG_ID_RAW_RPM_LEN 5
13#define MAVLINK_MSG_ID_RAW_RPM_MIN_LEN 5
14#define MAVLINK_MSG_ID_339_LEN 5
15#define MAVLINK_MSG_ID_339_MIN_LEN 5
17#define MAVLINK_MSG_ID_RAW_RPM_CRC 199
18#define MAVLINK_MSG_ID_339_CRC 199
22#if MAVLINK_COMMAND_24BIT
23#define MAVLINK_MESSAGE_INFO_RAW_RPM {
27 { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0
, 4
, offsetof(mavlink_raw_rpm_t, index) },
28 { "frequency", NULL, MAVLINK_TYPE_FLOAT, 0
, 0
, offsetof(mavlink_raw_rpm_t, frequency) },
30}
32#define MAVLINK_MESSAGE_INFO_RAW_RPM {
35 { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0
, 4
, offsetof(mavlink_raw_rpm_t, index) },
36 { "frequency", NULL, MAVLINK_TYPE_FLOAT, 0
, 0
, offsetof(mavlink_raw_rpm_t, frequency) },
38}
42
43
44
45
46
47
48
49
50
51static inline uint16_t mavlink_msg_raw_rpm_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
52 uint8_t index,
float frequency)
54#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
56 _mav_put_float(buf, 0, frequency);
57 _mav_put_uint8_t(buf, 4, index);
61 mavlink_raw_rpm_t packet;
62 packet.frequency = frequency;
65 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_RPM_LEN);
73
74
75
76
77
78
79
80
81
82
83static inline uint16_t mavlink_msg_raw_rpm_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
84 uint8_t index,
float frequency)
86#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
88 _mav_put_float(buf, 0, frequency);
89 _mav_put_uint8_t(buf, 4, index);
93 mavlink_raw_rpm_t packet;
94 packet.frequency = frequency;
97 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_RPM_LEN);
102 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
109
110
111
112
113
114
115
116
117
118static inline uint16_t mavlink_msg_raw_rpm_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
119 mavlink_message_t* msg,
120 uint8_t index,
float frequency)
122#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
124 _mav_put_float(buf, 0, frequency);
125 _mav_put_uint8_t(buf, 4, index);
129 mavlink_raw_rpm_t packet;
130 packet.frequency = frequency;
131 packet.index = index;
133 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_RPM_LEN);
141
142
143
144
145
146
147
148static inline uint16_t mavlink_msg_raw_rpm_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_raw_rpm_t* raw_rpm)
150 return mavlink_msg_raw_rpm_pack(system_id, component_id, msg, raw_rpm->index, raw_rpm->frequency);
154
155
156
157
158
159
160
161
162static inline uint16_t mavlink_msg_raw_rpm_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_raw_rpm_t* raw_rpm)
164 return mavlink_msg_raw_rpm_pack_chan(system_id, component_id, chan, msg, raw_rpm->index, raw_rpm->frequency);
168
169
170
171
172
173
174
175
176static inline uint16_t mavlink_msg_raw_rpm_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_raw_rpm_t* raw_rpm)
178 return mavlink_msg_raw_rpm_pack_status(system_id, component_id, _status, msg, raw_rpm->index, raw_rpm->frequency);
182
183
184
185
186
187
188#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
190static inline void mavlink_msg_raw_rpm_send(mavlink_channel_t chan, uint8_t index,
float frequency)
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193 char buf[MAVLINK_MSG_ID_RAW_RPM_LEN];
194 _mav_put_float(buf, 0, frequency);
195 _mav_put_uint8_t(buf, 4, index);
197 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, buf, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
199 mavlink_raw_rpm_t packet;
200 packet.frequency = frequency;
201 packet.index = index;
203 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (
const char *)&packet, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
208
209
210
211
212static inline void mavlink_msg_raw_rpm_send_struct(mavlink_channel_t chan,
const mavlink_raw_rpm_t* raw_rpm)
214#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
215 mavlink_msg_raw_rpm_send(chan, raw_rpm->index, raw_rpm->frequency);
217 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (
const char *)raw_rpm, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
221#if MAVLINK_MSG_ID_RAW_RPM_LEN <= MAVLINK_MAX_PAYLOAD_LEN
223
224
225
226
227
228
229static inline void mavlink_msg_raw_rpm_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index,
float frequency)
231#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
232 char *buf = (
char *)msgbuf;
233 _mav_put_float(buf, 0, frequency);
234 _mav_put_uint8_t(buf, 4, index);
236 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, buf, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
238 mavlink_raw_rpm_t *packet = (mavlink_raw_rpm_t *)msgbuf;
239 packet->frequency = frequency;
240 packet->index = index;
242 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_RPM, (
const char *)packet, MAVLINK_MSG_ID_RAW_RPM_MIN_LEN, MAVLINK_MSG_ID_RAW_RPM_LEN, MAVLINK_MSG_ID_RAW_RPM_CRC);
253
254
255
256
257static inline uint8_t mavlink_msg_raw_rpm_get_index(
const mavlink_message_t* msg)
259 return _MAV_RETURN_uint8_t(msg, 4);
263
264
265
266
267static inline float mavlink_msg_raw_rpm_get_frequency(
const mavlink_message_t* msg)
269 return _MAV_RETURN_float(msg, 0);
273
274
275
276
277
278static inline void mavlink_msg_raw_rpm_decode(
const mavlink_message_t* msg, mavlink_raw_rpm_t* raw_rpm)
280#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
281 raw_rpm->frequency = mavlink_msg_raw_rpm_get_frequency(msg);
282 raw_rpm->index = mavlink_msg_raw_rpm_get_index(msg);
284 uint8_t len = msg->len < MAVLINK_MSG_ID_RAW_RPM_LEN? msg->len : MAVLINK_MSG_ID_RAW_RPM_LEN;
285 memset(raw_rpm, 0, MAVLINK_MSG_ID_RAW_RPM_LEN);
286 memcpy(raw_rpm, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_RAW_RPM
Definition: mavlink_msg_raw_rpm.h:4
#define MAVLINK_MSG_ID_RAW_RPM_CRC
Definition: mavlink_msg_raw_rpm.h:17
#define MAVLINK_MSG_ID_RAW_RPM_MIN_LEN
Definition: mavlink_msg_raw_rpm.h:13
#define MAVLINK_MSG_ID_RAW_RPM_LEN
Definition: mavlink_msg_raw_rpm.h:12
Definition: mavlink_msg_raw_rpm.h:7
uint8_t index
Definition: mavlink_msg_raw_rpm.h:9
float frequency
Definition: mavlink_msg_raw_rpm.h:8