[CC] everything well, NEED RETURN VIN

This commit is contained in:
YiChin
2019-11-08 17:38:55 +08:00
parent fb43ec6ac3
commit c862e6790f
@@ -33,7 +33,7 @@ static int32_t CCModeReadCurrent(CCMode *CC){
// // decode ADC value and put it into notify buffer
// CC->BatteryV = DecodeADCValue(INSTRUCTION.ADCGainLevel, ADC_CH_VOLT, spi_ADC_rxbuf);
// }
//
// NotifyVolt[0] = (uint8_t) (CC->BatteryV >> 24);
// NotifyVolt[1] = (uint8_t) ((CC->BatteryV & 0x00FF0000) >> 16);
// NotifyVolt[2] = (uint8_t) ((CC->BatteryV & 0x0000FF00) >> 8);
@@ -70,7 +70,7 @@ static int32_t CCModeVoltOut(CCMode *CC){
// ADCRealVolt = 2*(INSTRUCTION.VoltConstant - 25000)/10 - IUCCurrent*200/1e6;
// }
// else{
CC->BatteryV = 2*(INSTRUCTION.VoltConstant - 25000)/10 - IUCCurrent*200/1e7;
CC->BatteryV = 2*(INSTRUCTION.VoltConstant - 25000)/10 - IUCCurrent*200/1e7;
// }
NotifyVolt[0] = (uint8_t) (CC->BatteryV >> 24);
@@ -110,11 +110,6 @@ static void CCModeDACControl(int32_t IUC_Measure_Difference){
INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + step;
}
DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant));
// NotifyCurrent[0] = (uint8_t) ( step >> 24);
// NotifyCurrent[1] = (uint8_t) (( step & 0x00FF0000) >> 16);
// NotifyCurrent[2] = (uint8_t) (( step & 0x0000FF00) >> 8);
// NotifyCurrent[3] = (uint8_t) ( step & 0x000000FF);
}
// XXX : should we reset DAC output after STOP?