try to fix IV mode
This commit is contained in:
+4
@@ -731,6 +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);
|
||||
ret = ADCRealCurrent;
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -37,6 +37,10 @@ static int32_t IT_Plot(WorkMode *WorkModeData) {
|
||||
#define CURRENT_MODE WorkModeData->IT
|
||||
break;
|
||||
}
|
||||
default{
|
||||
#define CURRENT_MODE WorkModeData->IV
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// read ADC current
|
||||
@@ -62,10 +66,7 @@ static int32_t IT_Plot(WorkMode *WorkModeData) {
|
||||
// reset();
|
||||
// }
|
||||
// }
|
||||
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);
|
||||
|
||||
|
||||
return Real_Current;
|
||||
}
|
||||
|
||||
+1
@@ -204,6 +204,7 @@ static void EliteADCControl(WorkMode *WorkModeData) {
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
IT_Plot(WorkModeData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user