From 04c7e8d6400aea91e81da7ea58841bc6b40a462a Mon Sep 17 00:00:00 2001 From: weiting2 Date: Mon, 11 Nov 2019 12:39:21 +0800 Subject: [PATCH] [headstage] add NotifyReady flag --- .../cc26xx/app/headstage/EliteDeviceCorrection.h | 2 -- .../simple_peripheral/cc26xx/app/headstage/EliteZTcurve.h | 1 - .../simple_peripheral/cc26xx/app/headstage/impedance_meter.h | 4 ++++ 3 files changed, 4 insertions(+), 3 deletions(-) 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 70d47d3d1..662d01dc2 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 @@ -663,7 +663,6 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_ // return real volt to controller if(ADCChannel == ADC_CH_VOLT){ ADCRealVolt = DecodeADCVolt(ADC_measure); - NotifyReady = true; ret = ADCRealVolt; } @@ -710,7 +709,6 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_ NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16); NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8); NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF); - NotifyReady = true; ret = ADCRealCurrent; } } diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteZTcurve.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteZTcurve.h index 66a8ccba7..c6c108da1 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteZTcurve.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteZTcurve.h @@ -48,7 +48,6 @@ static void ZT_Plot(RTMode *RT) { NotifyImpedance[1] = (uint8_t) ((resister_32 & 0x00FF0000) >> 16); NotifyImpedance[2] = (uint8_t) ((resister_32 & 0x0000FF00) >> 8); NotifyImpedance[3] = (uint8_t) (resister_32 & 0x000000FF); - NotifyReady = true; // set ADC GAIN // if(INSTRUCTION.ResisterMeter == RESISTER_METER_LARGE){ diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h index f9f00bddd..84183af3b 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/impedance_meter.h @@ -199,15 +199,18 @@ static void EliteADCControl(WorkMode *WorkModeData) { } case IT_CURVE:{ IT_Plot(WorkModeData); + NotifyReady = true; break; } case VT_CURVE:{ // read volt through ADC and put it into notify buffer VT_Plot(WorkModeData->VT); + NotifyReady = true; break; } case ZT_CURVE:{ ZT_Plot(WorkModeData->RT); + NotifyReady = true; break; } case CONSTANT_CURRENT:{ @@ -217,6 +220,7 @@ static void EliteADCControl(WorkMode *WorkModeData) { } default:{ IT_Plot(WorkModeData); + NotifyReady = true; break; } }