4#define MAVLINK_MSG_ID_OBSTACLE_DISTANCE 330 
    7typedef struct __mavlink_obstacle_distance_t {
 
    9 uint8_t estimator_type; 
 
   10 uint8_t distances[12]; 
 
   12}) mavlink_obstacle_distance_t;
 
   14#define MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN 22 
   15#define MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN 22 
   16#define MAVLINK_MSG_ID_330_LEN 22 
   17#define MAVLINK_MSG_ID_330_MIN_LEN 22 
   19#define MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC 201 
   20#define MAVLINK_MSG_ID_330_CRC 201 
   22#define MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN 12 
   24#if MAVLINK_COMMAND_24BIT 
   25#define MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE { \ 
   27    "OBSTACLE_DISTANCE", \ 
   29    {  { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_obstacle_distance_t, time_usec) }, \ 
   30         { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_obstacle_distance_t, estimator_type) }, \ 
   31         { "distances", NULL, MAVLINK_TYPE_UINT8_T, 12, 9, offsetof(mavlink_obstacle_distance_t, distances) }, \ 
   32         { "increment", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_obstacle_distance_t, increment) }, \ 
   36#define MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE { \ 
   37    "OBSTACLE_DISTANCE", \ 
   39    {  { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_obstacle_distance_t, time_usec) }, \ 
   40         { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_obstacle_distance_t, estimator_type) }, \ 
   41         { "distances", NULL, MAVLINK_TYPE_UINT8_T, 12, 9, offsetof(mavlink_obstacle_distance_t, distances) }, \ 
   42         { "increment", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_obstacle_distance_t, increment) }, \ 
   59static inline uint16_t mavlink_msg_obstacle_distance_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
 
   60                               uint64_t time_usec, uint8_t estimator_type, 
const uint8_t *distances, uint8_t increment)
 
   62#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
   63 char buf[MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN];
 
   64    _mav_put_uint64_t(buf, 0, time_usec);
 
   65    _mav_put_uint8_t(buf, 8, estimator_type);
 
   66    _mav_put_uint8_t(buf, 21, increment);
 
   67    _mav_put_uint8_t_array(buf, 9, distances, 12);
 
   68        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN);
 
   70    mavlink_obstacle_distance_t packet;
 
   71    packet.time_usec = time_usec;
 
   72    packet.estimator_type = estimator_type;
 
   73    packet.increment = increment;
 
   74    mav_array_memcpy(packet.distances, distances, 
sizeof(uint8_t)*12);
 
   75        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN);
 
   78    msg->msgid = MAVLINK_MSG_ID_OBSTACLE_DISTANCE;
 
   79 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
   94static inline uint16_t mavlink_msg_obstacle_distance_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
 
   95                               mavlink_message_t* msg,
 
   96                                   uint64_t time_usec,uint8_t estimator_type,
const uint8_t *distances,uint8_t increment)
 
   98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
   99 char buf[MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN];
 
  100    _mav_put_uint64_t(buf, 0, time_usec);
 
  101    _mav_put_uint8_t(buf, 8, estimator_type);
 
  102    _mav_put_uint8_t(buf, 21, increment);
 
  103    _mav_put_uint8_t_array(buf, 9, distances, 12);
 
  104        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN);
 
  106    mavlink_obstacle_distance_t packet;
 
  107    packet.time_usec = time_usec;
 
  108    packet.estimator_type = estimator_type;
 
  109    packet.increment = increment;
 
  110    mav_array_memcpy(packet.distances, distances, 
sizeof(uint8_t)*12);
 
  111        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN);
 
  114    msg->msgid = MAVLINK_MSG_ID_OBSTACLE_DISTANCE;
 
  115 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  126static inline uint16_t mavlink_msg_obstacle_distance_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, 
const mavlink_obstacle_distance_t* obstacle_distance)
 
  128 return mavlink_msg_obstacle_distance_pack(system_id, component_id, msg, obstacle_distance->time_usec, obstacle_distance->estimator_type, obstacle_distance->distances, obstacle_distance->increment);
 
  140static inline uint16_t mavlink_msg_obstacle_distance_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, 
const mavlink_obstacle_distance_t* obstacle_distance)
 
  142 return mavlink_msg_obstacle_distance_pack_chan(system_id, component_id, chan, msg, obstacle_distance->time_usec, obstacle_distance->estimator_type, obstacle_distance->distances, obstacle_distance->increment);
 
  154#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS 
  156static inline void mavlink_msg_obstacle_distance_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t estimator_type, 
const uint8_t *distances, uint8_t increment)
 
  158#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
  159 char buf[MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN];
 
  160    _mav_put_uint64_t(buf, 0, time_usec);
 
  161    _mav_put_uint8_t(buf, 8, estimator_type);
 
  162    _mav_put_uint8_t(buf, 21, increment);
 
  163    _mav_put_uint8_t_array(buf, 9, distances, 12);
 
  164    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE, buf, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  166    mavlink_obstacle_distance_t packet;
 
  167    packet.time_usec = time_usec;
 
  168    packet.estimator_type = estimator_type;
 
  169    packet.increment = increment;
 
  170    mav_array_memcpy(packet.distances, distances, 
sizeof(uint8_t)*12);
 
  171    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE, (
const char *)&packet, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  180static inline void mavlink_msg_obstacle_distance_send_struct(mavlink_channel_t chan, 
const mavlink_obstacle_distance_t* obstacle_distance)
 
  182#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
  183    mavlink_msg_obstacle_distance_send(chan, obstacle_distance->time_usec, obstacle_distance->estimator_type, obstacle_distance->distances, obstacle_distance->increment);
 
  185    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE, (
const char *)obstacle_distance, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  189#if MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN <= MAVLINK_MAX_PAYLOAD_LEN 
  197static inline void mavlink_msg_obstacle_distance_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t time_usec, uint8_t estimator_type, 
const uint8_t *distances, uint8_t increment)
 
  199#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
  200 char *buf = (
char *)msgbuf;
 
  201    _mav_put_uint64_t(buf, 0, time_usec);
 
  202    _mav_put_uint8_t(buf, 8, estimator_type);
 
  203    _mav_put_uint8_t(buf, 21, increment);
 
  204    _mav_put_uint8_t_array(buf, 9, distances, 12);
 
  205    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE, buf, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  207    mavlink_obstacle_distance_t *packet = (mavlink_obstacle_distance_t *)msgbuf;
 
  208    packet->time_usec = time_usec;
 
  209    packet->estimator_type = estimator_type;
 
  210    packet->increment = increment;
 
  211    mav_array_memcpy(packet->distances, distances, 
sizeof(uint8_t)*12);
 
  212    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBSTACLE_DISTANCE, (
const char *)packet, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_CRC);
 
  227static inline uint64_t mavlink_msg_obstacle_distance_get_time_usec(
const mavlink_message_t* msg)
 
  229 return _MAV_RETURN_uint64_t(msg,  0);
 
  237static inline uint8_t mavlink_msg_obstacle_distance_get_estimator_type(
const mavlink_message_t* msg)
 
  239 return _MAV_RETURN_uint8_t(msg,  8);
 
  247static inline uint16_t mavlink_msg_obstacle_distance_get_distances(
const mavlink_message_t* msg, uint8_t *distances)
 
  249 return _MAV_RETURN_uint8_t_array(msg, distances, 12,  9);
 
  257static inline uint8_t mavlink_msg_obstacle_distance_get_increment(
const mavlink_message_t* msg)
 
  259 return _MAV_RETURN_uint8_t(msg,  21);
 
  268static inline void mavlink_msg_obstacle_distance_decode(
const mavlink_message_t* msg, mavlink_obstacle_distance_t* obstacle_distance)
 
  270#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS 
  271    obstacle_distance->time_usec = mavlink_msg_obstacle_distance_get_time_usec(msg);
 
  272    obstacle_distance->estimator_type = mavlink_msg_obstacle_distance_get_estimator_type(msg);
 
  273    mavlink_msg_obstacle_distance_get_distances(msg, obstacle_distance->distances);
 
  274    obstacle_distance->increment = mavlink_msg_obstacle_distance_get_increment(msg);
 
  276        uint8_t len = msg->len < MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN? msg->len : MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN;
 
  277        memset(obstacle_distance, 0, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_LEN);
 
  278    memcpy(obstacle_distance, _MAV_PAYLOAD(msg), len);