STM32/mavlink/Lattepanda_shiled/mavlink_msg_transmit_can_data.h
/**
 * @brief Pack a transmit_can_data 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 CAN_ID  CAN ID
 * @param CAN_Data  CAN DATA
 * @param CAN_RTR  CAN Request
 * @return length of the message in bytes (excluding serial stream start sign)
 */
@brief Pack a transmit_can_data 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 CAN_ID  CAN ID
@param CAN_Data  CAN DATA
@param CAN_RTR  CAN Request
@return length of the message in bytes (excluding serial stream start sign)
@brief Pack a transmit_can_data 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 CAN_ID CAN ID @param CAN_Data CAN DATA @param CAN_RTR CAN Request @return length of the message in bytes ( excluding serial stream start sign )
static inline uint16_t mavlink_msg_transmit_can_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
						       uint32_t CAN_ID, const uint8_t *CAN_Data, uint8_t CAN_RTR)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char buf[MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN];
	_mav_put_uint32_t(buf, 0, CAN_ID);
	_mav_put_uint8_t(buf, 12, CAN_RTR);
	_mav_put_uint8_t_array(buf, 4, CAN_Data, 8);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN);
#else
	mavlink_transmit_can_data_t packet;
	packet.CAN_ID = CAN_ID;
	packet.CAN_RTR = CAN_RTR;
	mav_array_memcpy(packet.CAN_Data, CAN_Data, sizeof(uint8_t)*8);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN);
#endif
	msg->msgid = MAVLINK_MSG_ID_TRANSMIT_CAN_DATA;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC);
}
static inline uint16_t mavlink_msg_transmit_can_data_pack ( uint8_t system_id , uint8_t component_id , mavlink_message_t * msg , uint32_t CAN_ID , const uint8_t * CAN_Data , uint8_t CAN_RTR ) { #if MAVLINK_NEED_BYTE_SWAP || ! MAVLINK_ALIGNED_FIELDS char buf [ MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN ] ; _mav_put_uint32_t ( buf , 0 , CAN_ID ) ; _mav_put_uint8_t ( buf , 12 , CAN_RTR ) ; _mav_put_uint8_t_array ( buf , 4 , CAN_Data , 8 ) ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , buf , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN ) ; #else mavlink_transmit_can_data_t packet ; packet . CAN_ID = CAN_ID ; packet . CAN_RTR = CAN_RTR ; mav_array_memcpy ( packet . CAN_Data , CAN_Data , sizeof ( uint8_t ) * 8 ) ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , & packet , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN ) ; #endif msg -> msgid = MAVLINK_MSG_ID_TRANSMIT_CAN_DATA ; return mavlink_finalize_message ( msg , system_id , component_id , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC ) ; }
@brief Pack a transmit_can_data message
 @param system_id ID of this system
 @param component_id ID of this component (e.g.
@brief Pack a transmit_can_data message @param system_id ID of this system @param component_id ID of this component ( e . g .