Firmware/src/communication/mavlink/mav_home/mavlink_msg_mav_command_ack.h
static inline uint16_t mavlink_msg_mav_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t cmd_id, int32_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN];
    _mav_put_int32_t(buf, 0, result);
    _mav_put_uint8_t(buf, 4, cmd_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN);
#else
    mavlink_mav_command_ack_t packet;
    packet.result = result;
    packet.cmd_id = cmd_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_MAV_COMMAND_ACK;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAV_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN, MAVLINK_MSG_ID_MAV_COMMAND_ACK_CRC);
}
/**
 * @brief Pack a mav_command_ack message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param cmd_id ID of the received command
 * @param result Result of the command processing
 * @return length of the message in bytes (excluding serial stream start sign)
 */
@brief Pack a mav_command_ack message
@param system_id ID of this system
@param component_id ID of this component
@param msg The MAVLink message to compress the data into

@param cmd_id ID of the received command
@param result Result of the command processing
@return length of the message in bytes (excluding serial stream start sign)
@brief Pack a mav_command_ack message @param system_id ID of this system @param component_id ID of this component @param msg The MAVLink message to compress the data into @param cmd_id ID of the received command @param result Result of the command processing @return length of the message in bytes ( excluding serial stream start sign )
static inline uint16_t mavlink_msg_mav_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t cmd_id, int32_t result)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN];
    _mav_put_int32_t(buf, 0, result);
    _mav_put_uint8_t(buf, 4, cmd_id);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN);
#else
    mavlink_mav_command_ack_t packet;
    packet.result = result;
    packet.cmd_id = cmd_id;
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN);
#endif
    msg->msgid = MAVLINK_MSG_ID_MAV_COMMAND_ACK;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAV_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN, MAVLINK_MSG_ID_MAV_COMMAND_ACK_CRC);
}
static inline uint16_t mavlink_msg_mav_command_ack_pack ( uint8_t system_id , uint8_t component_id , mavlink_message_t * msg , uint8_t cmd_id , int32_t result ) { #if MAVLINK_NEED_BYTE_SWAP || ! MAVLINK_ALIGNED_FIELDS char buf [ MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN ] ; _mav_put_int32_t ( buf , 0 , result ) ; _mav_put_uint8_t ( buf , 4 , cmd_id ) ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , buf , MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN ) ; #else mavlink_mav_command_ack_t packet ; packet . result = result ; packet . cmd_id = cmd_id ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , & packet , MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN ) ; #endif msg -> msgid = MAVLINK_MSG_ID_MAV_COMMAND_ACK ; return mavlink_finalize_message ( msg , system_id , component_id , MAVLINK_MSG_ID_MAV_COMMAND_ACK_MIN_LEN , MAVLINK_MSG_ID_MAV_COMMAND_ACK_LEN , MAVLINK_MSG_ID_MAV_COMMAND_ACK_CRC ) ; }
@brief Pack a mav_command_ack message
 @param system_id ID of this system
 @param component_id ID of this component (e.g.
@brief Pack a mav_command_ack message @param system_id ID of this system @param component_id ID of this component ( e . g .