IV/CV has an auto gain prob

This commit is contained in:
YiChin
2019-11-04 11:47:16 +08:00
parent 4875bb271a
commit 080ca80f2b
2 changed files with 5 additions and 5 deletions
@@ -731,10 +731,10 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_
// IT curve
else {
ADCRealCurrent = DecodeADCCurrent(ADCGain, ADC_measure);
NotifyCurrent[0] = (uint8_t) (Real_Current >> 24);
NotifyCurrent[1] = (uint8_t) ((Real_Current & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((Real_Current & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (Real_Current & 0x000000FF);
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent >> 24);
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16);
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8);
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF);
ret = ADCRealCurrent;
}
@@ -37,7 +37,7 @@ static int32_t IT_Plot(WorkMode *WorkModeData) {
#define CURRENT_MODE WorkModeData->IT
break;
}
default{
default: {
#define CURRENT_MODE WorkModeData->IV
break;
}