Merge remote-tracking branch 'origin/Elite_OBJ_Version' into Elite_OBJ_Version

# Conflicts:
#	simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteIVCurve.h
This commit is contained in:
YiChin
2019-11-18 09:53:17 +08:00
2 changed files with 3 additions and 7 deletions
@@ -160,7 +160,6 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){
if(INSTRUCTION.ADCGainLevel == GAIN_AUTO){
INSTRUCTION.ADCGainLevel = GAIN_200R;
// LED_color(DARKLED, 0x00, 0x00, 0xFF);
}
if(INSTRUCTION.ADCGainLevel == GAIN_200R){
@@ -192,7 +191,6 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){
INSTRUCTION.ADCGainLevel = GAIN_200R;
ReadCurrent(spi_ADC_rxbuf);
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
// LED_color(DARKLED, 0x00, 0x00, 0xFF);
}
// switch to small range current
@@ -200,7 +198,6 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){
INSTRUCTION.ADCGainLevel = GAIN_200K;
ReadCurrent(spi_ADC_rxbuf);
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
// LED_color(DARKLED, 0xFF, 0x00, 0x00);
}
}
else if(INSTRUCTION.ADCGainLevel == GAIN_200K){
@@ -212,7 +209,6 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){
INSTRUCTION.ADCGainLevel = GAIN_10K;
ReadCurrent(spi_ADC_rxbuf);
Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);
// LED_color(DARKLED, 0x00, 0xFF, 0x00);
// switch to large range current
// if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){
// INSTRUCTION.ADCGainLevel = GAIN_200R;
@@ -91,13 +91,13 @@ static void IV_Plot(IVMode *IV) {
else if(VoltCurrentSwitch == 5){
// read current
if(INSTRUCTION.AutoGainEnable){
// if(INSTRUCTION.AutoGainEnable){
IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
// if(PreviousGain != INSTRUCTION.ADCGainLevel){
// while(PreviousGain != INSTRUCTION.ADCGainLevel){
// PreviousGain = INSTRUCTION.ADCGainLevel;
// IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf);
// }
}
// }
// else{
// ReadCurrent(spi_ADC_rxbuf);
// IV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf);