try to fix IV mode

This commit is contained in:
weiting2
2019-11-04 13:27:44 +08:00
parent 3f617786ef
commit 48e566dea4
@@ -700,6 +700,7 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_
// wait 0.1 sec until circuit stable => discard first data means wait 0.1 sec
if(DiscardIVFirstData){
DiscardIVFirstData = 0;
DecodeADCCurrent(ADCGain, ADC_measure);
ret = DecodeADCCurrent(ADCGain, ADC_measure);
return ret;
}
@@ -731,13 +732,12 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_
// IT curve
else {
ADCRealCurrent = DecodeADCCurrent(ADCGain, ADC_measure);
ret = ADCRealCurrent;
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent >> 24);
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF);
ret = ADCRealCurrent;
}
}
else{