This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SCI通信 数据验证

// read the dcBus voltage value
value = (_iq)ADC_readResult(obj->adcHandle,ADC_ResultNumber_7); // divide by 2^numAdcBits = 2^12
value = _IQ12mpy(value,voltage_sf);
pAdcData->dcBus = value;

iqvalue=_IQabs(CTRL_getIq_in_pu(ctrlHandle));

gMotorVars.Speed_krpm =_IQabs( EST_getSpeed_krpm(ctrlHandle->estHandle));

通信时,当我获得这些值发给上位机的时候,我怎么去验证这些值发的对不对?怎么计算去看是不是输入的值?还有怎么转成整形数?