Browse Source

2020.12.23 / Jerry Wang

Actions:
1. Debug DoComo to get the current beyond the limit and can't preparing for the problem.

Files:
ReDoComm.c

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

+ 12 - 3
EVSE/Projects/DD360Audi/Apps/ReDoComm.c

@@ -645,17 +645,26 @@ static int chargingcapabilityHandle(uint8_t *data, uint8_t gunID)
     pCapabilityInfo = (CapabilityInfo *)&data[0];
 
     MaxVolt = (float)(ntohs(pCapabilityInfo->OutputVoltage));
-    if ((MaxVolt >= 0) && (MaxVolt <= MAX_VOLTAGE)) {
+    if (MaxVolt >= 0) {
+        if (MaxVolt > MAX_VOLTAGE) {
+            MaxVolt = MAX_VOLTAGE;
+        }
         ChargingData[gunID]->MaximumChargingVoltage = MaxVolt;
     }
 
     MaxCurrent = (float)(ntohs(pCapabilityInfo->OutputCurrent));
-    if ((MaxCurrent >= 0) && (MaxCurrent <= MAX_CURRENCY)) {
+    if (MaxCurrent >= 0) {
+        if (MaxCurrent > MAX_CURRENCY) {
+            MaxCurrent = MAX_CURRENCY;
+        }
         ChargingData[gunID]->AvailableChargingCurrent = MaxCurrent;
     }
 
     MaxPower = (float)(ntohs(pCapabilityInfo->OutputPower));
-    if ((MaxPower >= 0) && (MaxPower <= MAX_POWER)) {
+    if (MaxPower >= 0) {
+        if (MaxPower > MAX_POWER) {
+            MaxPower = MAX_POWER;
+        }
         ChargingData[gunID]->AvailableChargingPower = MaxPower;
     }
     //MaxVolt = (float)(data[0] << 8 |data[1]);

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


BIN
EVSE/Projects/DD360Audi/output/DoComm