NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mavlink_msg_gimbal_home_offset_calibration_result.h
Go to the documentation of this file.
1 // MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT PACKING
2 
3 #define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT 205
4 
6 {
9 
10 #define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN 1
11 #define MAVLINK_MSG_ID_205_LEN 1
12 
13 #define MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_CRC 63
14 #define MAVLINK_MSG_ID_205_CRC 63
15 
16 
17 
18 #define MAVLINK_MESSAGE_INFO_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT { \
19  "GIMBAL_HOME_OFFSET_CALIBRATION_RESULT", \
20  1, \
21  { { "calibration_result", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gimbal_home_offset_calibration_result_t, calibration_result) }, \
22  } \
23 }
24 
25 
35 static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
36  uint8_t calibration_result)
37 {
38 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
40  _mav_put_uint8_t(buf, 0, calibration_result);
41 
43 #else
45  packet.calibration_result = calibration_result;
46 
48 #endif
49 
51 #if MAVLINK_CRC_EXTRA
53 #else
55 #endif
56 }
57 
67 static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
68  mavlink_message_t* msg,
69  uint8_t calibration_result)
70 {
71 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
73  _mav_put_uint8_t(buf, 0, calibration_result);
74 
76 #else
78  packet.calibration_result = calibration_result;
79 
81 #endif
82 
84 #if MAVLINK_CRC_EXTRA
86 #else
88 #endif
89 }
90 
99 static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
100 {
101  return mavlink_msg_gimbal_home_offset_calibration_result_pack(system_id, component_id, msg, gimbal_home_offset_calibration_result->calibration_result);
102 }
103 
113 static inline uint16_t mavlink_msg_gimbal_home_offset_calibration_result_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
114 {
115  return mavlink_msg_gimbal_home_offset_calibration_result_pack_chan(system_id, component_id, chan, msg, gimbal_home_offset_calibration_result->calibration_result);
116 }
117 
124 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
125 
126 static inline void mavlink_msg_gimbal_home_offset_calibration_result_send(mavlink_channel_t chan, uint8_t calibration_result)
127 {
128 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
130  _mav_put_uint8_t(buf, 0, calibration_result);
131 
132 #if MAVLINK_CRC_EXTRA
134 #else
136 #endif
137 #else
139  packet.calibration_result = calibration_result;
140 
141 #if MAVLINK_CRC_EXTRA
143 #else
144  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT, (const char *)&packet, MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
145 #endif
146 #endif
147 }
148 
149 #if MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
150 /*
151  This varient of _send() can be used to save stack space by re-using
152  memory from the receive buffer. The caller provides a
153  mavlink_message_t which is the size of a full mavlink message. This
154  is usually the receive buffer for the channel, and allows a reply to an
155  incoming message with minimum stack space usage.
156  */
157 static inline void mavlink_msg_gimbal_home_offset_calibration_result_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t calibration_result)
158 {
159 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
160  char *buf = (char *)msgbuf;
161  _mav_put_uint8_t(buf, 0, calibration_result);
162 
163 #if MAVLINK_CRC_EXTRA
165 #else
167 #endif
168 #else
170  packet->calibration_result = calibration_result;
171 
172 #if MAVLINK_CRC_EXTRA
174 #else
176 #endif
177 #endif
178 }
179 #endif
180 
181 #endif
182 
183 // MESSAGE GIMBAL_HOME_OFFSET_CALIBRATION_RESULT UNPACKING
184 
185 
191 static inline uint8_t mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(const mavlink_message_t* msg)
192 {
193  return _MAV_RETURN_uint8_t(msg, 0);
194 }
195 
202 static inline void mavlink_msg_gimbal_home_offset_calibration_result_decode(const mavlink_message_t* msg, mavlink_gimbal_home_offset_calibration_result_t* gimbal_home_offset_calibration_result)
203 {
204 #if MAVLINK_NEED_BYTE_SWAP
205  gimbal_home_offset_calibration_result->calibration_result = mavlink_msg_gimbal_home_offset_calibration_result_get_calibration_result(msg);
206 #else
207  memcpy(gimbal_home_offset_calibration_result, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GIMBAL_HOME_OFFSET_CALIBRATION_RESULT_LEN);
208 #endif
209 }
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134