4#define MAVLINK_MSG_ID_TERRAIN_CHECK 135
7typedef struct __mavlink_terrain_check_t {
10}) mavlink_terrain_check_t;
12#define MAVLINK_MSG_ID_TERRAIN_CHECK_LEN 8
13#define MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN 8
14#define MAVLINK_MSG_ID_135_LEN 8
15#define MAVLINK_MSG_ID_135_MIN_LEN 8
17#define MAVLINK_MSG_ID_TERRAIN_CHECK_CRC 203
18#define MAVLINK_MSG_ID_135_CRC 203
22#if MAVLINK_COMMAND_24BIT
23#define MAVLINK_MESSAGE_INFO_TERRAIN_CHECK { \
27 { { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_terrain_check_t, lat) }, \
28 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_terrain_check_t, lon) }, \
32#define MAVLINK_MESSAGE_INFO_TERRAIN_CHECK { \
35 { { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_terrain_check_t, lat) }, \
36 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_terrain_check_t, lon) }, \
51static inline uint16_t mavlink_msg_terrain_check_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
52 int32_t lat, int32_t lon)
54#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
55 char buf[MAVLINK_MSG_ID_TERRAIN_CHECK_LEN];
56 _mav_put_int32_t(buf, 0, lat);
57 _mav_put_int32_t(buf, 4, lon);
59 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN);
61 mavlink_terrain_check_t packet;
65 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN);
68 msg->msgid = MAVLINK_MSG_ID_TERRAIN_CHECK;
69 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
82static inline uint16_t mavlink_msg_terrain_check_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
83 mavlink_message_t* msg,
84 int32_t lat,int32_t lon)
86#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 char buf[MAVLINK_MSG_ID_TERRAIN_CHECK_LEN];
88 _mav_put_int32_t(buf, 0, lat);
89 _mav_put_int32_t(buf, 4, lon);
91 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN);
93 mavlink_terrain_check_t packet;
97 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN);
100 msg->msgid = MAVLINK_MSG_ID_TERRAIN_CHECK;
101 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
112static inline uint16_t mavlink_msg_terrain_check_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_terrain_check_t* terrain_check)
114 return mavlink_msg_terrain_check_pack(system_id, component_id, msg, terrain_check->lat, terrain_check->lon);
126static inline uint16_t mavlink_msg_terrain_check_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_terrain_check_t* terrain_check)
128 return mavlink_msg_terrain_check_pack_chan(system_id, component_id, chan, msg, terrain_check->lat, terrain_check->lon);
138#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
140static inline void mavlink_msg_terrain_check_send(mavlink_channel_t chan, int32_t lat, int32_t lon)
142#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
143 char buf[MAVLINK_MSG_ID_TERRAIN_CHECK_LEN];
144 _mav_put_int32_t(buf, 0, lat);
145 _mav_put_int32_t(buf, 4, lon);
147 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TERRAIN_CHECK, buf, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
149 mavlink_terrain_check_t packet;
153 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TERRAIN_CHECK, (
const char *)&packet, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
162static inline void mavlink_msg_terrain_check_send_struct(mavlink_channel_t chan,
const mavlink_terrain_check_t* terrain_check)
164#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 mavlink_msg_terrain_check_send(chan, terrain_check->lat, terrain_check->lon);
167 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TERRAIN_CHECK, (
const char *)terrain_check, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
171#if MAVLINK_MSG_ID_TERRAIN_CHECK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
179static inline void mavlink_msg_terrain_check_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t lat, int32_t lon)
181#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
182 char *buf = (
char *)msgbuf;
183 _mav_put_int32_t(buf, 0, lat);
184 _mav_put_int32_t(buf, 4, lon);
186 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TERRAIN_CHECK, buf, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
188 mavlink_terrain_check_t *packet = (mavlink_terrain_check_t *)msgbuf;
192 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TERRAIN_CHECK, (
const char *)packet, MAVLINK_MSG_ID_TERRAIN_CHECK_MIN_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN, MAVLINK_MSG_ID_TERRAIN_CHECK_CRC);
207static inline int32_t mavlink_msg_terrain_check_get_lat(
const mavlink_message_t* msg)
209 return _MAV_RETURN_int32_t(msg, 0);
217static inline int32_t mavlink_msg_terrain_check_get_lon(
const mavlink_message_t* msg)
219 return _MAV_RETURN_int32_t(msg, 4);
228static inline void mavlink_msg_terrain_check_decode(
const mavlink_message_t* msg, mavlink_terrain_check_t* terrain_check)
230#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
231 terrain_check->lat = mavlink_msg_terrain_check_get_lat(msg);
232 terrain_check->lon = mavlink_msg_terrain_check_get_lon(msg);
234 uint8_t len = msg->len < MAVLINK_MSG_ID_TERRAIN_CHECK_LEN? msg->len : MAVLINK_MSG_ID_TERRAIN_CHECK_LEN;
235 memset(terrain_check, 0, MAVLINK_MSG_ID_TERRAIN_CHECK_LEN);
236 memcpy(terrain_check, _MAV_PAYLOAD(msg), len);