[headstage] add NotifyReady flag

This commit is contained in:
weiting2
2019-11-11 12:39:21 +08:00
parent 813ef50bf5
commit 04c7e8d640
3 changed files with 4 additions and 3 deletions
@@ -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;
}
}
@@ -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){
@@ -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;
}
}