Browse Source

2020.12.22 / Jerry Wang

Actions:
1. add EV board output request voltage and current exceeding the default limit.

Files:
Module_EvComm.c

Image version: V1.02.XX.XXXX.XX
Image checksum: XXXXXXXX
Jerry_Wang 4 years ago
parent
commit
6d2c477ca9

+ 13 - 1
EVSE/Projects/DD360Audi/Apps/Module_EvComm.c

@@ -67,7 +67,7 @@ float _outCur_2 = 0;
 // Chademo : 500V, 125A,
 // GB : 750, 120A
 // CCS : 950V, 120A
-float maxChargingVol[2] = { 5000, 9500 };           // 限制最大充電電壓,如依照模塊則填上 0
+float maxChargingVol[2] = { 9500, 9500 };           // 限制最大充電電壓,如依照模塊則填上 0
 // 限制最大充電電流與能量透過 Web
 float maxChargingCur[2] = { 5000, 2000 };           // 限制最大充電電流,如依照模塊則填上 0
 float maxChargingPow = 0;                           // 限制最大充電能量,如依照模塊則填上 0
@@ -2267,8 +2267,20 @@ void CANReceiver()
                 break;
                 case ACK_GET_OUTPUT_REQ: {
                     _chargingData[targetGun]->EvBatterySoc = frame.data[1];
+
+                    //Jerry add set voltage limit
                     _chargingData[targetGun]->EvBatterytargetVoltage = (float)((frame.data[3] << 8) + frame.data[2]) / 10;
+                    if (_chargingData[targetGun]->EvBatterytargetVoltage > maxChargingVol[targetGun] * 0.1) {
+                        _chargingData[targetGun]->EvBatterytargetVoltage = maxChargingVol[targetGun] * 0.1;
+                    }
+                    //printf("id = %d, EvBatterytargetVoltage = %.2f\r\n", targetGun, _chargingData[targetGun]->EvBatterytargetVoltage);
+                    //Jerry add set currency limit
                     _chargingData[targetGun]->EvBatterytargetCurrent = (float)((frame.data[5] << 8) + frame.data[4]) / 10;
+                    if (_chargingData[targetGun]->EvBatterytargetCurrent > maxChargingCur[targetGun] * 0.1) {
+                        _chargingData[targetGun]->EvBatterytargetCurrent = maxChargingCur[targetGun] * 0.1;
+                    }
+                    //printf("id = %d, EvBatterytargetCurrent = %.2f\r\n", targetGun, _chargingData[targetGun]->EvBatterytargetCurrent);
+
                     _chargingData[targetGun]->RemainChargingDuration = ((short) frame.data[7] << 8) + (short) frame.data[6];
 
                     if (_chargingData[targetGun]->Type == _Type_Chademo) {

BIN
EVSE/Projects/DD360Audi/Images/ramdisk.gz


BIN
EVSE/Projects/DD360Audi/output/Module_EvComm


BIN
EVSE/Projects/DD360Audi/output/main