Firmware/src/communication/mavlink/mav_home/mavlink_msg_mav_curtains_drive_state.h
static inline uint16_t mavlink_msg_mav_curtains_drive_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t drive_state, uint8_t lamp_state, uint8_t errors, uint8_t brightness)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN];
    _mav_put_uint8_t(buf, 0, drive_state);
    _mav_put_uint8_t(buf, 1, lamp_state);
    _mav_put_uint8_t(buf, 2, errors);
    _mav_put_uint8_t(buf, 3, brightness);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN);
#else
    mavlink_mav_curtains_drive_state_t packet;
    packet.drive_state = drive_state;
    packet.lamp_state = lamp_state;
    packet.errors = errors;
    packet.brightness = brightness;

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

    msg->msgid = MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_MIN_LEN, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_CRC);
}
/**
 * @brief Pack a mav_curtains_drive_state 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 drive_state Curtains drive state
 * @param lamp_state Curtains drive lamp state
 * @param errors Curtains drive errors
 * @param brightness Light sensor value
 * @return length of the message in bytes (excluding serial stream start sign)
 */
@brief Pack a mav_curtains_drive_state 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


@brief Pack a mav_curtains_drive_state 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
static inline uint16_t mavlink_msg_mav_curtains_drive_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t drive_state, uint8_t lamp_state, uint8_t errors, uint8_t brightness)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN];
    _mav_put_uint8_t(buf, 0, drive_state);
    _mav_put_uint8_t(buf, 1, lamp_state);
    _mav_put_uint8_t(buf, 2, errors);
    _mav_put_uint8_t(buf, 3, brightness);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN);
#else
    mavlink_mav_curtains_drive_state_t packet;
    packet.drive_state = drive_state;
    packet.lamp_state = lamp_state;
    packet.errors = errors;
    packet.brightness = brightness;
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN);
#endif
    msg->msgid = MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_MIN_LEN, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN, MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_CRC);
}
static inline uint16_t mavlink_msg_mav_curtains_drive_state_pack ( uint8_t system_id , uint8_t component_id , mavlink_message_t * msg , uint8_t drive_state , uint8_t lamp_state , uint8_t errors , uint8_t brightness ) { #if MAVLINK_NEED_BYTE_SWAP || ! MAVLINK_ALIGNED_FIELDS char buf [ MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN ] ; _mav_put_uint8_t ( buf , 0 , drive_state ) ; _mav_put_uint8_t ( buf , 1 , lamp_state ) ; _mav_put_uint8_t ( buf , 2 , errors ) ; _mav_put_uint8_t ( buf , 3 , brightness ) ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , buf , MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN ) ; #else mavlink_mav_curtains_drive_state_t packet ; packet . drive_state = drive_state ; packet . lamp_state = lamp_state ; packet . errors = errors ; packet . brightness = brightness ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , & packet , MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN ) ; #endif msg -> msgid = MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE ; return mavlink_finalize_message ( msg , system_id , component_id , MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_MIN_LEN , MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_LEN , MAVLINK_MSG_ID_MAV_CURTAINS_DRIVE_STATE_CRC ) ; }
@brief Pack a mav_curtains_drive_state message
 @param system_id ID of this system
 @param component_id ID of this component (e.g.
@brief Pack a mav_curtains_drive_state message @param system_id ID of this system @param component_id ID of this component ( e . g .