auto shift bug fix
This commit is contained in:
+3
-4
@@ -206,18 +206,17 @@ static void IT_Plot() {
|
||||
// read ADC volt
|
||||
ADCGainControl(ADCGain);
|
||||
ADCChannelSelect(ADC_CH_CURRENT);
|
||||
CPUdelay(16000);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
|
||||
uint16_t rawdata = ((uint16_t) (spi_ADC_rxbuf[0] << 8 )) | (spi_ADC_rxbuf[1]);
|
||||
|
||||
CPUdelay(16000);
|
||||
|
||||
if(ADC_overflow(ADCGain, rawdata)){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
CPUdelay(16000);
|
||||
ADC_read(spi_ADC_rxbuf);
|
||||
|
||||
// decode ADC value and put it into notify buffer
|
||||
DecodeADCValue(ADCGain, ADC_CH_CURRENT, spi_ADC_rxbuf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user