Browse Source

2021.04.20 / Jerry Wang

Actions:
1. Fixed CSU STM32F407 LED blinking action.
2. Add replaceOtherProject.sh script file. copy DD360Audi/Apps file to DD360 DD360ComBox project.
3. Fixed DoComm wait CSU self test complete.

Files:
1. As follow as commit history.
Jerry_Wang 3 years ago
parent
commit
d33b28e348
33 changed files with 294 additions and 85 deletions
  1. BIN
      EVSE/Projects/DD360/Apps/Module_PsuComm
  2. 9 0
      EVSE/Projects/DD360/Apps/ReDoComm.c
  3. 40 11
      EVSE/Projects/DD360/Apps/ReMain.c
  4. 20 4
      EVSE/Projects/DD360/Apps/ReModule_EvComm.c
  5. 4 3
      EVSE/Projects/DD360/Apps/main.c
  6. 0 8
      EVSE/Projects/DD360/Apps/replaceOther.sh
  7. 11 0
      EVSE/Projects/DD360/Apps/replaceOtherProject.sh
  8. 15 0
      EVSE/Projects/DD360/ModelNameList.txt
  9. BIN
      EVSE/Projects/DD360Audi/Apps/Module_PsuComm
  10. 9 0
      EVSE/Projects/DD360Audi/Apps/ReDoComm.c
  11. 40 11
      EVSE/Projects/DD360Audi/Apps/ReMain.c
  12. 20 4
      EVSE/Projects/DD360Audi/Apps/ReModule_EvComm.c
  13. 4 3
      EVSE/Projects/DD360Audi/Apps/main.c
  14. 0 8
      EVSE/Projects/DD360Audi/Apps/replaceOther.sh
  15. 11 0
      EVSE/Projects/DD360Audi/Apps/replaceOtherProject.sh
  16. BIN
      EVSE/Projects/DD360Audi/Images/ramdisk.gz
  17. 15 0
      EVSE/Projects/DD360Audi/ModelNameList.txt
  18. BIN
      EVSE/Projects/DD360Audi/output/DoComm
  19. BIN
      EVSE/Projects/DD360Audi/output/Module_ProduceUtils
  20. BIN
      EVSE/Projects/DD360Audi/output/main
  21. BIN
      EVSE/Projects/DD360ComBox/Apps/Module_PsuComm
  22. 9 0
      EVSE/Projects/DD360ComBox/Apps/ReDoComm.c
  23. 40 11
      EVSE/Projects/DD360ComBox/Apps/ReMain.c
  24. 20 4
      EVSE/Projects/DD360ComBox/Apps/ReModule_EvComm.c
  25. BIN
      EVSE/Projects/DD360ComBox/Apps/UnsafetyOutputTask
  26. 4 3
      EVSE/Projects/DD360ComBox/Apps/main.c
  27. 0 8
      EVSE/Projects/DD360ComBox/Apps/replaceOther.sh
  28. 11 0
      EVSE/Projects/DD360ComBox/Apps/replaceOtherProject.sh
  29. BIN
      EVSE/Projects/DD360ComBox/Images/ramdisk.gz
  30. 12 7
      EVSE/Projects/DD360ComBox/ModelNameList.txt
  31. BIN
      EVSE/Projects/DD360ComBox/output/DoComm
  32. BIN
      EVSE/Projects/DD360ComBox/output/main
  33. BIN
      EVSE/rootfs/root/OcppBackend20

BIN
EVSE/Projects/DD360/Apps/Module_PsuComm


+ 9 - 0
EVSE/Projects/DD360/Apps/ReDoComm.c

@@ -2084,8 +2084,17 @@ static int networkCreatePorcess(void)
 {
     int fd = 0;
 
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(128);
+    }
+    setTcpStatus(ABNORMAL);
+
     /**************** Check Network **********/
     DEBUG_INFO("Check Dispenser Network Information");
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(125);
+    }
+
     while (!CheckNetworkStatus()) {
         calDisconnectCount(&gDoCommGblData.DisConnCount, CHECK_NETWORK_FAIL_COUNT);
         DEBUG_ERROR("disconnect count = % d\r\n", gDoCommGblData.DisConnCount);

+ 40 - 11
EVSE/Projects/DD360/Apps/ReMain.c

@@ -344,12 +344,34 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 //printf("level = %d\r\n", ShmSysConfigAndInfo->SysWarningInfo.Level);
                 switch (chargingInfo[gunIndex]->SystemStatus) {
                 case S_BOOTING:
+                    if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+                        //DoComm tcp disconnect
+                        if (pLedConfig->RedLED == YES ||
+                                pLedConfig->YellowLED == YES ||
+                                pLedConfig->GreenLED == YES) {
+                            pLedConfig->RedLED = NO;
+                            pLedConfig->YellowLED = NO;
+                            pLedConfig->GreenLED = NO;
+                        } else {
+                            pLedConfig->RedLED = YES;
+                            pLedConfig->YellowLED = YES;
+                            pLedConfig->GreenLED = YES;
+                        }
+                        break;
+                    }
+
                     pLedConfig->RedLED = YES;
                     pLedConfig->YellowLED = YES;
                     pLedConfig->GreenLED = YES;
                     break;
 
                 case S_IDLE:
+                    //DoComm connected and system idle
+                    pLedConfig->RedLED = NO;
+                    pLedConfig->YellowLED = NO;
+                    pLedConfig->GreenLED = YES;
+                    break;
+
                 case S_RESERVATION:
                 case S_AUTHORIZING:
                 case S_REASSIGN_CHECK:
@@ -359,9 +381,7 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 case S_PREPARING_FOR_EVSE:
                 case S_CCS_PRECHARGE_ST0:
                 case S_CCS_PRECHARGE_ST1:
-                    pLedConfig->RedLED = NO;
-                    pLedConfig->YellowLED = NO;
-
+                    //precharging status
                     if (pLedConfig->GreenLED == YES) {
                         pLedConfig->GreenLED = NO;
                     } else {
@@ -392,8 +412,8 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                         }
                     } else {
                         pLedConfig->RedLED = NO;
-                        pLedConfig->YellowLED = NO;
-                        pLedConfig->GreenLED = YES;
+                        pLedConfig->YellowLED = YES;
+                        pLedConfig->GreenLED = NO;
                     }
                     break;
 
@@ -1729,12 +1749,17 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
-    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE ||
-            GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
+
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE //||
+            //GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
           ) {
+        if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+            return;
+        }
+
         ChkPrimaryStatus();
-        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 ||
-                ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
+        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 //||
+                //ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
            ) {
             ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_FAIL;
             return;
@@ -3432,6 +3457,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
+
+    case 'T': //Rema CCS1
+    case 'D': //Rema CCS2
     case 'U': // CCS1 combo
     case 'E': // CCS2 combo
     case 'V': // Liquid CCS1 combo
@@ -3477,8 +3505,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
-    case 'D': // GBT DC x 2
-        break;
+
+        //case 'D': // GBT DC x 2
+        //    break;
     }
     return result;
 }

+ 20 - 4
EVSE/Projects/DD360/Apps/ReModule_EvComm.c

@@ -2944,17 +2944,33 @@ void FormatVoltageAndCurrent()
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 } else if (_index == 1) {
                     if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "V", 1) == 0) ||
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 }
             } else if (_chargingData[_index]->Type == _Type_GB) {
                 maxChargingCur[_index] = 2500;

+ 4 - 3
EVSE/Projects/DD360/Apps/main.c

@@ -1329,6 +1329,7 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
+
     while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
         ChkPrimaryStatus();
         if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2) {
@@ -4796,7 +4797,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012234");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012289");
                         ChargingTerminalProcess(gun_index);
@@ -4810,7 +4811,7 @@ int main(void)
                         RecordAlarmCode(gun_index, "012236");
                     } else if (isPrechargeStatus_gb(gun_index) == 10 &&
                                (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
                         // UVP
                         RecordAlarmCode(gun_index, "012290");
                         ChargingTerminalProcess(gun_index);
@@ -4823,7 +4824,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012235");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012288");
                         ChargingTerminalProcess(gun_index);

+ 0 - 8
EVSE/Projects/DD360/Apps/replaceOther.sh

@@ -1,8 +0,0 @@
-#/bin/bash
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/;
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/;
-

+ 11 - 0
EVSE/Projects/DD360/Apps/replaceOtherProject.sh

@@ -0,0 +1,11 @@
+#/bin/bash
+
+ProjectPath="/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects"
+
+rm -rf $ProjectPath/DD360/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360/ModelNameList.txt;
+
+rm -rf $ProjectPath/DD360ComBox/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360ComBox/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360ComBox/ModelNameList.txt;

+ 15 - 0
EVSE/Projects/DD360/ModelNameList.txt

@@ -0,0 +1,15 @@
+// ********** Audi ********** //
+Model Name: DOYC182000D2AD
+Model Name: DDYC182V0UE2AD
+
+// ********** e4you ********** //
+Model Name: DKYE182000D1E4
+Model Name: DXYE182E00E1E4
+
+// ********** xpeng ********** //
+Model Name: DOYE362000D2XP
+Model Name: DDYE362F0KE2XP
+
+// *********** BYD *********** //
+Model Name: DOYE242000D2BD
+Model Name: DDYE242V0UE2BD

BIN
EVSE/Projects/DD360Audi/Apps/Module_PsuComm


+ 9 - 0
EVSE/Projects/DD360Audi/Apps/ReDoComm.c

@@ -2084,8 +2084,17 @@ static int networkCreatePorcess(void)
 {
     int fd = 0;
 
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(128);
+    }
+    setTcpStatus(ABNORMAL);
+
     /**************** Check Network **********/
     DEBUG_INFO("Check Dispenser Network Information");
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(125);
+    }
+
     while (!CheckNetworkStatus()) {
         calDisconnectCount(&gDoCommGblData.DisConnCount, CHECK_NETWORK_FAIL_COUNT);
         DEBUG_ERROR("disconnect count = % d\r\n", gDoCommGblData.DisConnCount);

+ 40 - 11
EVSE/Projects/DD360Audi/Apps/ReMain.c

@@ -344,12 +344,34 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 //printf("level = %d\r\n", ShmSysConfigAndInfo->SysWarningInfo.Level);
                 switch (chargingInfo[gunIndex]->SystemStatus) {
                 case S_BOOTING:
+                    if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+                        //DoComm tcp disconnect
+                        if (pLedConfig->RedLED == YES ||
+                                pLedConfig->YellowLED == YES ||
+                                pLedConfig->GreenLED == YES) {
+                            pLedConfig->RedLED = NO;
+                            pLedConfig->YellowLED = NO;
+                            pLedConfig->GreenLED = NO;
+                        } else {
+                            pLedConfig->RedLED = YES;
+                            pLedConfig->YellowLED = YES;
+                            pLedConfig->GreenLED = YES;
+                        }
+                        break;
+                    }
+
                     pLedConfig->RedLED = YES;
                     pLedConfig->YellowLED = YES;
                     pLedConfig->GreenLED = YES;
                     break;
 
                 case S_IDLE:
+                    //DoComm connected and system idle
+                    pLedConfig->RedLED = NO;
+                    pLedConfig->YellowLED = NO;
+                    pLedConfig->GreenLED = YES;
+                    break;
+
                 case S_RESERVATION:
                 case S_AUTHORIZING:
                 case S_REASSIGN_CHECK:
@@ -359,9 +381,7 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 case S_PREPARING_FOR_EVSE:
                 case S_CCS_PRECHARGE_ST0:
                 case S_CCS_PRECHARGE_ST1:
-                    pLedConfig->RedLED = NO;
-                    pLedConfig->YellowLED = NO;
-
+                    //precharging status
                     if (pLedConfig->GreenLED == YES) {
                         pLedConfig->GreenLED = NO;
                     } else {
@@ -392,8 +412,8 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                         }
                     } else {
                         pLedConfig->RedLED = NO;
-                        pLedConfig->YellowLED = NO;
-                        pLedConfig->GreenLED = YES;
+                        pLedConfig->YellowLED = YES;
+                        pLedConfig->GreenLED = NO;
                     }
                     break;
 
@@ -1729,12 +1749,17 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
-    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE ||
-            GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
+
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE //||
+            //GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
           ) {
+        if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+            return;
+        }
+
         ChkPrimaryStatus();
-        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 ||
-                ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
+        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 //||
+                //ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
            ) {
             ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_FAIL;
             return;
@@ -3432,6 +3457,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
+
+    case 'T': //Rema CCS1
+    case 'D': //Rema CCS2
     case 'U': // CCS1 combo
     case 'E': // CCS2 combo
     case 'V': // Liquid CCS1 combo
@@ -3477,8 +3505,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
-    case 'D': // GBT DC x 2
-        break;
+
+        //case 'D': // GBT DC x 2
+        //    break;
     }
     return result;
 }

+ 20 - 4
EVSE/Projects/DD360Audi/Apps/ReModule_EvComm.c

@@ -2944,17 +2944,33 @@ void FormatVoltageAndCurrent()
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 } else if (_index == 1) {
                     if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "V", 1) == 0) ||
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 }
             } else if (_chargingData[_index]->Type == _Type_GB) {
                 maxChargingCur[_index] = 2500;

+ 4 - 3
EVSE/Projects/DD360Audi/Apps/main.c

@@ -1329,6 +1329,7 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
+
     while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
         ChkPrimaryStatus();
         if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2) {
@@ -4796,7 +4797,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012234");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012289");
                         ChargingTerminalProcess(gun_index);
@@ -4810,7 +4811,7 @@ int main(void)
                         RecordAlarmCode(gun_index, "012236");
                     } else if (isPrechargeStatus_gb(gun_index) == 10 &&
                                (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
                         // UVP
                         RecordAlarmCode(gun_index, "012290");
                         ChargingTerminalProcess(gun_index);
@@ -4823,7 +4824,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012235");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012288");
                         ChargingTerminalProcess(gun_index);

+ 0 - 8
EVSE/Projects/DD360Audi/Apps/replaceOther.sh

@@ -1,8 +0,0 @@
-#/bin/bash
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/;
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/;
-

+ 11 - 0
EVSE/Projects/DD360Audi/Apps/replaceOtherProject.sh

@@ -0,0 +1,11 @@
+#/bin/bash
+
+ProjectPath="/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects"
+
+rm -rf $ProjectPath/DD360/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360/ModelNameList.txt;
+
+rm -rf $ProjectPath/DD360ComBox/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360ComBox/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360ComBox/ModelNameList.txt;

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


+ 15 - 0
EVSE/Projects/DD360Audi/ModelNameList.txt

@@ -0,0 +1,15 @@
+// ********** Audi ********** //
+Model Name: DOYC182000D2AD
+Model Name: DDYC182V0UE2AD
+
+// ********** e4you ********** //
+Model Name: DKYE182000D1E4
+Model Name: DXYE182E00E1E4
+
+// ********** xpeng ********** //
+Model Name: DOYE362000D2XP
+Model Name: DDYE362F0KE2XP
+
+// *********** BYD *********** //
+Model Name: DOYE242000D2BD
+Model Name: DDYE242V0UE2BD

BIN
EVSE/Projects/DD360Audi/output/DoComm


BIN
EVSE/Projects/DD360Audi/output/Module_ProduceUtils


BIN
EVSE/Projects/DD360Audi/output/main


BIN
EVSE/Projects/DD360ComBox/Apps/Module_PsuComm


+ 9 - 0
EVSE/Projects/DD360ComBox/Apps/ReDoComm.c

@@ -2084,8 +2084,17 @@ static int networkCreatePorcess(void)
 {
     int fd = 0;
 
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(128);
+    }
+    setTcpStatus(ABNORMAL);
+
     /**************** Check Network **********/
     DEBUG_INFO("Check Dispenser Network Information");
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
+        usleep(125);
+    }
+
     while (!CheckNetworkStatus()) {
         calDisconnectCount(&gDoCommGblData.DisConnCount, CHECK_NETWORK_FAIL_COUNT);
         DEBUG_ERROR("disconnect count = % d\r\n", gDoCommGblData.DisConnCount);

+ 40 - 11
EVSE/Projects/DD360ComBox/Apps/ReMain.c

@@ -344,12 +344,34 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 //printf("level = %d\r\n", ShmSysConfigAndInfo->SysWarningInfo.Level);
                 switch (chargingInfo[gunIndex]->SystemStatus) {
                 case S_BOOTING:
+                    if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+                        //DoComm tcp disconnect
+                        if (pLedConfig->RedLED == YES ||
+                                pLedConfig->YellowLED == YES ||
+                                pLedConfig->GreenLED == YES) {
+                            pLedConfig->RedLED = NO;
+                            pLedConfig->YellowLED = NO;
+                            pLedConfig->GreenLED = NO;
+                        } else {
+                            pLedConfig->RedLED = YES;
+                            pLedConfig->YellowLED = YES;
+                            pLedConfig->GreenLED = YES;
+                        }
+                        break;
+                    }
+
                     pLedConfig->RedLED = YES;
                     pLedConfig->YellowLED = YES;
                     pLedConfig->GreenLED = YES;
                     break;
 
                 case S_IDLE:
+                    //DoComm connected and system idle
+                    pLedConfig->RedLED = NO;
+                    pLedConfig->YellowLED = NO;
+                    pLedConfig->GreenLED = YES;
+                    break;
+
                 case S_RESERVATION:
                 case S_AUTHORIZING:
                 case S_REASSIGN_CHECK:
@@ -359,9 +381,7 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                 case S_PREPARING_FOR_EVSE:
                 case S_CCS_PRECHARGE_ST0:
                 case S_CCS_PRECHARGE_ST1:
-                    pLedConfig->RedLED = NO;
-                    pLedConfig->YellowLED = NO;
-
+                    //precharging status
                     if (pLedConfig->GreenLED == YES) {
                         pLedConfig->GreenLED = NO;
                     } else {
@@ -392,8 +412,8 @@ static void startPrimaryLedIndicatorCtrlFork(void)
                         }
                     } else {
                         pLedConfig->RedLED = NO;
-                        pLedConfig->YellowLED = NO;
-                        pLedConfig->GreenLED = YES;
+                        pLedConfig->YellowLED = YES;
+                        pLedConfig->GreenLED = NO;
                     }
                     break;
 
@@ -1729,12 +1749,17 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
-    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE ||
-            GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
+
+    while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE //||
+            //GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL <= 20 //DS60-120 add
           ) {
+        if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_COMPLETE) {
+            return;
+        }
+
         ChkPrimaryStatus();
-        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 ||
-                ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
+        if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2 //||
+                //ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuDipSwitchStestFail == YES //DS60-120 add
            ) {
             ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_FAIL;
             return;
@@ -3432,6 +3457,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
+
+    case 'T': //Rema CCS1
+    case 'D': //Rema CCS2
     case 'U': // CCS1 combo
     case 'E': // CCS2 combo
     case 'V': // Liquid CCS1 combo
@@ -3477,8 +3505,9 @@ bool AddGunInfoByConnector(byte typeValue, byte slots)
         }
     }
     break;
-    case 'D': // GBT DC x 2
-        break;
+
+        //case 'D': // GBT DC x 2
+        //    break;
     }
     return result;
 }

+ 20 - 4
EVSE/Projects/DD360ComBox/Apps/ReModule_EvComm.c

@@ -2944,17 +2944,33 @@ void FormatVoltageAndCurrent()
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[7], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 } else if (_index == 1) {
                     if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "V", 1) == 0) ||
                             (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "F", 1) == 0)
                        ) {
                         maxChargingCur[_index] = 5000;
-                    } else {
-                        maxChargingCur[_index] = 2000;
+                        continue;
+                    }
+
+                    if ((strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "T", 1) == 0) ||
+                            (strncmp((char *)&ShmSysConfigAndInfo->SysConfig.ModelName[9], "D", 1) == 0)
+                       ) {
+                        maxChargingCur[_index] = 3000;
+                        continue;
                     }
+
+                    maxChargingCur[_index] = 2000;
                 }
             } else if (_chargingData[_index]->Type == _Type_GB) {
                 maxChargingCur[_index] = 2500;

BIN
EVSE/Projects/DD360ComBox/Apps/UnsafetyOutputTask


+ 4 - 3
EVSE/Projects/DD360ComBox/Apps/main.c

@@ -1329,6 +1329,7 @@ void SelfTestRun()
 
     StartSystemTimeoutDet(Timeout_SelftestChk);
     ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
+
     while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE) {
         ChkPrimaryStatus();
         if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2) {
@@ -4796,7 +4797,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012234");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012289");
                         ChargingTerminalProcess(gun_index);
@@ -4810,7 +4811,7 @@ int main(void)
                         RecordAlarmCode(gun_index, "012236");
                     } else if (isPrechargeStatus_gb(gun_index) == 10 &&
                                (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/)) {
                         // UVP
                         RecordAlarmCode(gun_index, "012290");
                         ChargingTerminalProcess(gun_index);
@@ -4823,7 +4824,7 @@ int main(void)
                         // GFD 錯誤停止
                         RecordAlarmCode(gun_index, "012235");
                     } else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL)/* ||
-                    (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
+            (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)*/) {
                         // UVP
                         RecordAlarmCode(gun_index, "012288");
                         ChargingTerminalProcess(gun_index);

+ 0 - 8
EVSE/Projects/DD360ComBox/Apps/replaceOther.sh

@@ -1,8 +0,0 @@
-#/bin/bash
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360/;
-
-rm -rf /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/Apps;
-cp -r /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360Audi/Apps /opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects/DD360ComBox/;
-

+ 11 - 0
EVSE/Projects/DD360ComBox/Apps/replaceOtherProject.sh

@@ -0,0 +1,11 @@
+#/bin/bash
+
+ProjectPath="/opt/ti-processor-sdk-linux-am335x-evm-04.02.00.09/EVSE/Projects"
+
+rm -rf $ProjectPath/DD360/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360/ModelNameList.txt;
+
+rm -rf $ProjectPath/DD360ComBox/Apps/;
+cp -r  $ProjectPath/DD360Audi/Apps/  $ProjectPath/DD360ComBox/Apps;
+cp -r  $ProjectPath/DD360Audi/ModelNameList.txt  $ProjectPath/DD360ComBox/ModelNameList.txt;

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


+ 12 - 7
EVSE/Projects/DD360ComBox/ModelNameList.txt

@@ -1,10 +1,15 @@
-Dispenser
+// ********** Audi ********** //
+Model Name: DOYC182000D2AD
+Model Name: DDYC182V0UE2AD
 
-Standard:
+// ********** e4you ********** //
+Model Name: DKYE182000D1E4
+Model Name: DXYE182E00E1E4
 
+// ********** xpeng ********** //
+Model Name: DOYE362000D2XP
+Model Name: DDYE362F0KE2XP
 
-Audi:
-DDYC182V0UE2AD
-
-ComBox:
-DXYE18200EE1E4
+// *********** BYD *********** //
+Model Name: DOYE242000D2BD
+Model Name: DDYE242V0UE2BD

BIN
EVSE/Projects/DD360ComBox/output/DoComm


BIN
EVSE/Projects/DD360ComBox/output/main


BIN
EVSE/rootfs/root/OcppBackend20