Elite 1.4-re IV avg out at steptime-1
This commit is contained in:
+1
-1
@@ -226,7 +226,7 @@ static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_
|
||||
ADCRealCurrent_long += DecodeADCCurrent(ADCGain, ADC_measure);
|
||||
avg_number++;
|
||||
|
||||
if (StepTimeCounter == INSTRUCTION.StepTime) {
|
||||
if (StepTimeCounter == INSTRUCTION.StepTime - 1) {
|
||||
ADCRealCurrent_long = ADCRealCurrent_long / avg_number;
|
||||
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent_long >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent_long & 0x00FF0000) >> 16);
|
||||
|
||||
Reference in New Issue
Block a user