diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteADC.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteADC.h index c785104f8..919f41fec 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteADC.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteADC.h @@ -193,12 +193,8 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){ // switch to small range current if (Real_Current < GAIN_MID_BOUNDARY1 && Real_Current > -1*GAIN_MID_BOUNDARY1){ INSTRUCTION.ADCGainLevel = GAIN_200K; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); }else{ INSTRUCTION.ADCGainLevel = GAIN_10K; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); } } } @@ -209,33 +205,24 @@ static int32_t AutoGainReadCurrent(uint8_t *buf){ // switch to large range current if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){ INSTRUCTION.ADCGainLevel = GAIN_200R; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); } // switch to small range current else if (Real_Current < GAIN_MID_BOUNDARY1 && Real_Current > -1*GAIN_MID_BOUNDARY1){ INSTRUCTION.ADCGainLevel = GAIN_200K; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); } } else if(INSTRUCTION.ADCGainLevel == GAIN_200K){ ReadCurrent(spi_ADC_rxbuf); Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); - //Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); // switch to mid range current if(Real_Current > GAIN_SMALL_BOUNDARY || Real_Current < -1*GAIN_SMALL_BOUNDARY){ // switch to large range current if(Real_Current > GAIN_MID_BOUNDARY2 || Real_Current < -1*GAIN_MID_BOUNDARY2){ INSTRUCTION.ADCGainLevel = GAIN_200R; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); }else{ INSTRUCTION.ADCGainLevel = GAIN_10K; - ReadCurrent(spi_ADC_rxbuf); - Real_Current = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); } } } diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h index b7609636b..1098abf55 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h @@ -45,16 +45,6 @@ static void CV3_Plot(CV3Mode *CV3){ // read current if(INSTRUCTION.AutoGainEnable){ CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); CV3->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -98,16 +88,6 @@ static void CV3_Plot(CV3Mode *CV3){ // read current if(INSTRUCTION.AutoGainEnable){ CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); CV3->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -119,16 +99,6 @@ static void CV3_Plot(CV3Mode *CV3){ // read current if(INSTRUCTION.AutoGainEnable){ CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV3->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } } else{ ReadCurrent(spi_ADC_rxbuf); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCVCurve.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCVCurve.h index 9e120c529..65d60959d 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCVCurve.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCVCurve.h @@ -149,16 +149,6 @@ static void CV_Plot(CVMode *CV){ // read current if(INSTRUCTION.AutoGainEnable){ CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); CV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -202,16 +192,6 @@ static void CV_Plot(CVMode *CV){ // read current if(INSTRUCTION.AutoGainEnable){ CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); CV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -223,16 +203,6 @@ static void CV_Plot(CVMode *CV){ // read current if(INSTRUCTION.AutoGainEnable){ CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - CV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } } else{ ReadCurrent(spi_ADC_rxbuf); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDeviceCorrection.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDeviceCorrection.h index 7a5bf1bec..9184a6e58 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDeviceCorrection.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteDeviceCorrection.h @@ -29,7 +29,7 @@ */ -#define BOARD_ANGUS +#define BOARD_7C8C typedef struct _formula{ diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteIVCurve.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteIVCurve.h index ce72dd4e7..6736762f6 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteIVCurve.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteIVCurve.h @@ -56,16 +56,6 @@ static void IV_Plot(IVMode *IV) { // read current if(INSTRUCTION.AutoGainEnable){ IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); IV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -109,16 +99,6 @@ static void IV_Plot(IVMode *IV) { // read current if(INSTRUCTION.AutoGainEnable){ IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } }else{ ReadCurrent(spi_ADC_rxbuf); IV->_MeasureData = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_CURRENT, spi_ADC_rxbuf); @@ -130,16 +110,6 @@ static void IV_Plot(IVMode *IV) { // read current if(INSTRUCTION.AutoGainEnable){ IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } - if(PreviousGain != INSTRUCTION.ADCGainLevel){ - PreviousGain = INSTRUCTION.ADCGainLevel; - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - IV->_MeasureData = AutoGainReadCurrent(spi_ADC_rxbuf); - } } else{ ReadCurrent(spi_ADC_rxbuf); diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h index c1a4dda7e..2f5672ff6 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h @@ -4,9 +4,9 @@ #define VERSION_DATE_YEAR 20 #define VERSION_DATE_MONTH 5 -#define VERSION_DATE_DAY 22 +#define VERSION_DATE_DAY 25 #define VERSION_DATE_HOUR 15 -#define VERSION_DATE_MINUTE 42 +#define VERSION_DATE_MINUTE 52 // this is NOT the version hash !! // it's the last version hash