STM32/mavlink/Lattepanda_shiled/mavlink_msg_measuring_data.h
/**
 * @brief Pack a measuring_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 Reg 4 Wire Kelvin [mOhm]
 * @param Cap  Capacitance [pF]
 * @param Ind  inductance [nH]
 * @param TC  Temperature [degC*10]
 * @param kelvin_mV 4 Wire Kelvin [mV]
 * @param TC_mV 4 Wire TC mV [mV]
 * @param ADC_ch1  12bit ADC [mV]
 * @param ADC_ch2  12bit ADC [mV]
 * @param DI  Digital Input [High/Low]
 * @param Set_Status  Setting status bit
 * @return length of the message in bytes (excluding serial stream start sign)
 */
@brief Pack a measuring_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


@brief Pack a measuring_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
static inline uint16_t mavlink_msg_measuring_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
						       float Reg, float Cap, float Ind, float TC, float kelvin_mV, float TC_mV, uint16_t ADC_ch1, uint16_t ADC_ch2, uint8_t DI, uint8_t Set_Status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char buf[MAVLINK_MSG_ID_MEASURING_DATA_LEN];
	_mav_put_float(buf, 0, Reg);
	_mav_put_float(buf, 4, Cap);
	_mav_put_float(buf, 8, Ind);
	_mav_put_float(buf, 12, TC);
	_mav_put_float(buf, 16, kelvin_mV);
	_mav_put_float(buf, 20, TC_mV);
	_mav_put_uint16_t(buf, 24, ADC_ch1);
	_mav_put_uint16_t(buf, 26, ADC_ch2);
	_mav_put_uint8_t(buf, 28, DI);
	_mav_put_uint8_t(buf, 29, Set_Status);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEASURING_DATA_LEN);
#else
	mavlink_measuring_data_t packet;
	packet.Reg = Reg;
	packet.Cap = Cap;
	packet.Ind = Ind;
	packet.TC = TC;
	packet.kelvin_mV = kelvin_mV;
	packet.TC_mV = TC_mV;
	packet.ADC_ch1 = ADC_ch1;
	packet.ADC_ch2 = ADC_ch2;
	packet.DI = DI;
	packet.Set_Status = Set_Status;
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEASURING_DATA_LEN);
#endif
	msg->msgid = MAVLINK_MSG_ID_MEASURING_DATA;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEASURING_DATA_MIN_LEN, MAVLINK_MSG_ID_MEASURING_DATA_LEN, MAVLINK_MSG_ID_MEASURING_DATA_CRC);
}
static inline uint16_t mavlink_msg_measuring_data_pack ( uint8_t system_id , uint8_t component_id , mavlink_message_t * msg , float Reg , float Cap , float Ind , float TC , float kelvin_mV , float TC_mV , uint16_t ADC_ch1 , uint16_t ADC_ch2 , uint8_t DI , uint8_t Set_Status ) { #if MAVLINK_NEED_BYTE_SWAP || ! MAVLINK_ALIGNED_FIELDS char buf [ MAVLINK_MSG_ID_MEASURING_DATA_LEN ] ; _mav_put_float ( buf , 0 , Reg ) ; _mav_put_float ( buf , 4 , Cap ) ; _mav_put_float ( buf , 8 , Ind ) ; _mav_put_float ( buf , 12 , TC ) ; _mav_put_float ( buf , 16 , kelvin_mV ) ; _mav_put_float ( buf , 20 , TC_mV ) ; _mav_put_uint16_t ( buf , 24 , ADC_ch1 ) ; _mav_put_uint16_t ( buf , 26 , ADC_ch2 ) ; _mav_put_uint8_t ( buf , 28 , DI ) ; _mav_put_uint8_t ( buf , 29 , Set_Status ) ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , buf , MAVLINK_MSG_ID_MEASURING_DATA_LEN ) ; #else mavlink_measuring_data_t packet ; packet . Reg = Reg ; packet . Cap = Cap ; packet . Ind = Ind ; packet . TC = TC ; packet . kelvin_mV = kelvin_mV ; packet . TC_mV = TC_mV ; packet . ADC_ch1 = ADC_ch1 ; packet . ADC_ch2 = ADC_ch2 ; packet . DI = DI ; packet . Set_Status = Set_Status ; memcpy ( _MAV_PAYLOAD_NON_CONST ( msg ) , & packet , MAVLINK_MSG_ID_MEASURING_DATA_LEN ) ; #endif msg -> msgid = MAVLINK_MSG_ID_MEASURING_DATA ; return mavlink_finalize_message ( msg , system_id , component_id , MAVLINK_MSG_ID_MEASURING_DATA_MIN_LEN , MAVLINK_MSG_ID_MEASURING_DATA_LEN , MAVLINK_MSG_ID_MEASURING_DATA_CRC ) ; }
@brief Pack a measuring_data message
 @param system_id ID of this system
 @param component_id ID of this component (e.g.
@brief Pack a measuring_data message @param system_id ID of this system @param component_id ID of this component ( e . g .