浏览代码

Merge branch 'DD360Audi'

FolusWen 3 年之前
父节点
当前提交
2aebc4603d
共有 62 个文件被更改,包括 216 次插入105 次删除
  1. 13 10
      EVSE/Projects/DD360/Apps/CSU/main.c
  2. 2 0
      EVSE/Projects/DD360/Apps/Define/define.h
  3. 6 4
      EVSE/Projects/DD360/Apps/FactoryConfig.c
  4. 1 1
      EVSE/Projects/DD360/Apps/Makefile
  5. 16 4
      EVSE/Projects/DD360/Apps/ModuleEvComm/Module_EvRxComm.c
  6. 28 10
      EVSE/Projects/DD360/Apps/ModuleEvComm/Module_EvTxComm.c
  7. 1 1
      EVSE/Projects/DD360/Apps/Script/init.sh
  8. 4 4
      EVSE/Projects/DD360/Apps/Script/replaceOtherDD360Project.sh
  9. 二进制
      EVSE/Projects/DD360/Apps/UnsafetyOutputTask
  10. 二进制
      EVSE/Projects/DD360/Images/FactoryDefaultConfig.bin
  11. 二进制
      EVSE/Projects/DD360/Images/ramdisk.gz
  12. 二进制
      EVSE/Projects/DD360/output/FactoryConfig
  13. 二进制
      EVSE/Projects/DD360/output/Module_DoComm
  14. 二进制
      EVSE/Projects/DD360/output/Module_EvComm
  15. 二进制
      EVSE/Projects/DD360/output/Module_EventLogging
  16. 二进制
      EVSE/Projects/DD360/output/Module_InternalComm
  17. 二进制
      EVSE/Projects/DD360/output/Module_LcmControl
  18. 二进制
      EVSE/Projects/DD360/output/Module_PrimaryComm
  19. 二进制
      EVSE/Projects/DD360/output/ReadCmdline
  20. 1 1
      EVSE/Projects/DD360/output/init.sh
  21. 二进制
      EVSE/Projects/DD360/output/main
  22. 13 10
      EVSE/Projects/DD360Audi/Apps/CSU/main.c
  23. 2 0
      EVSE/Projects/DD360Audi/Apps/Define/define.h
  24. 6 4
      EVSE/Projects/DD360Audi/Apps/FactoryConfig.c
  25. 1 1
      EVSE/Projects/DD360Audi/Apps/Makefile
  26. 16 4
      EVSE/Projects/DD360Audi/Apps/ModuleEvComm/Module_EvRxComm.c
  27. 28 10
      EVSE/Projects/DD360Audi/Apps/ModuleEvComm/Module_EvTxComm.c
  28. 1 1
      EVSE/Projects/DD360Audi/Apps/Script/init.sh
  29. 4 4
      EVSE/Projects/DD360Audi/Apps/Script/replaceOtherDD360Project.sh
  30. 二进制
      EVSE/Projects/DD360Audi/Images/FactoryDefaultConfig.bin
  31. 二进制
      EVSE/Projects/DD360Audi/Images/ramdisk.gz
  32. 二进制
      EVSE/Projects/DD360Audi/output/FactoryConfig
  33. 二进制
      EVSE/Projects/DD360Audi/output/Module_DoComm
  34. 二进制
      EVSE/Projects/DD360Audi/output/Module_EvComm
  35. 二进制
      EVSE/Projects/DD360Audi/output/Module_EventLogging
  36. 二进制
      EVSE/Projects/DD360Audi/output/Module_InternalComm
  37. 二进制
      EVSE/Projects/DD360Audi/output/Module_LcmControl
  38. 二进制
      EVSE/Projects/DD360Audi/output/Module_PrimaryComm
  39. 二进制
      EVSE/Projects/DD360Audi/output/ReadCmdline
  40. 1 1
      EVSE/Projects/DD360Audi/output/init.sh
  41. 二进制
      EVSE/Projects/DD360Audi/output/main
  42. 13 10
      EVSE/Projects/DD360ComBox/Apps/CSU/main.c
  43. 2 0
      EVSE/Projects/DD360ComBox/Apps/Define/define.h
  44. 6 4
      EVSE/Projects/DD360ComBox/Apps/FactoryConfig.c
  45. 1 1
      EVSE/Projects/DD360ComBox/Apps/Makefile
  46. 16 4
      EVSE/Projects/DD360ComBox/Apps/ModuleEvComm/Module_EvRxComm.c
  47. 28 10
      EVSE/Projects/DD360ComBox/Apps/ModuleEvComm/Module_EvTxComm.c
  48. 1 1
      EVSE/Projects/DD360ComBox/Apps/Script/init.sh
  49. 4 4
      EVSE/Projects/DD360ComBox/Apps/Script/replaceOtherDD360Project.sh
  50. 二进制
      EVSE/Projects/DD360ComBox/Apps/UnsafetyOutputTask
  51. 二进制
      EVSE/Projects/DD360ComBox/Images/FactoryDefaultConfig.bin
  52. 二进制
      EVSE/Projects/DD360ComBox/Images/ramdisk.gz
  53. 二进制
      EVSE/Projects/DD360ComBox/output/FactoryConfig
  54. 二进制
      EVSE/Projects/DD360ComBox/output/Module_DoComm
  55. 二进制
      EVSE/Projects/DD360ComBox/output/Module_EvComm
  56. 二进制
      EVSE/Projects/DD360ComBox/output/Module_EventLogging
  57. 二进制
      EVSE/Projects/DD360ComBox/output/Module_InternalComm
  58. 二进制
      EVSE/Projects/DD360ComBox/output/Module_LcmControl
  59. 二进制
      EVSE/Projects/DD360ComBox/output/Module_PrimaryComm
  60. 二进制
      EVSE/Projects/DD360ComBox/output/ReadCmdline
  61. 1 1
      EVSE/Projects/DD360ComBox/output/init.sh
  62. 二进制
      EVSE/Projects/DD360ComBox/output/main

+ 13 - 10
EVSE/Projects/DD360/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.10.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.11.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;
@@ -1056,7 +1056,7 @@ int LoadSysConfigAndInfo()
             if (ChkSum != ChkSumOrg) {
                 log_warn("factory default  SysConfigData checksum NG, restore factory default\n");
                 free(buf);
-                system("cd /root;./Module_FactoryConfig -m");
+                system("cd /root;./FactoryConfig -m");
                 system("rm -f /Storage/OCPP/OCPPConfiguration");
                 system("sync");
                 sleep(5);
@@ -1108,7 +1108,7 @@ int LoadSysConfigAndInfo()
             log_info("SystemId over length.\n");
         }
 
-        system("cd /root;./Module_FactoryConfig -m");
+        system("cd /root;./FactoryConfig -m");
         sleep(3);
         system("/usr/bin/run_evse_restart.sh");
     }
@@ -1487,7 +1487,7 @@ void DisplayChargingInfo()
 
     log_info("*********** DisplayChargingInfo *********** \n");
     for (i = 0; i < pSysConfig->TotalConnectorCount; i++) {
-        pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(i);
+        pAcChargingInfo =  (struct ChargingInfoData *)GetDcChargingInfoData(i);
 
         if (pAcChargingInfo->SystemStatus != S_IDLE &&
                 pAcChargingInfo->SystemStatus != S_RESERVATION) {
@@ -1496,13 +1496,16 @@ void DisplayChargingInfo()
         }
     }
 
-    pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(0);
-
     if (pSysConfig->AcConnectorCount > 0 &&
-            pSysInfo->CurGunSelectedByAc == NO_DEFINE &&
-            pAcChargingInfo->SystemStatus >= S_PREPARNING &&
-            pAcChargingInfo->SystemStatus <= S_COMPLETE) {
-        pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+            pSysInfo->CurGunSelectedByAc == NO_DEFINE)
+    {
+        pAcChargingInfo = (struct ChargingInfoData*)GetAcChargingInfoData(0);
+
+        if (pAcChargingInfo->SystemStatus >= S_PREPARNING &&
+            pAcChargingInfo->SystemStatus <= S_COMPLETE)
+        {
+            pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+        }
     }
 
     usleep(50000);

+ 2 - 0
EVSE/Projects/DD360/Apps/Define/define.h

@@ -473,6 +473,8 @@ struct SysConfigData
 	unsigned char 			OcppServerURL[512];			//http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
 	unsigned char 			ChargeBoxId[128];
 	unsigned char			chargePointVendor[20];		//the Vendor of the ChargePoint
+	unsigned char			OcppSecurityProfile;		//OCPP security profile 0~3
+	unsigned char			OcppSecurityPassword[41];	//OCPP AuthorizationKey for security profile
 	unsigned int 			Checksum;					//4 bytes checksum
 	struct LED				LedInfo;					// LED configuration info
 	unsigned char			ShowInformation;

+ 6 - 4
EVSE/Projects/DD360/Apps/FactoryConfig.c

@@ -160,8 +160,10 @@ int main(int argc, char *argv[])
     if (InitShareMemory() == FAIL) {
         log_error("InitShareMemory NG\n");
 
-        strcpy((char *)SysConfig.ModelName, "");
-        strcpy((char *)SysConfig.SerialNumber, "");
+        //strcpy((char *)SysConfig.ModelName, "");
+        //strcpy((char *)SysConfig.SerialNumber, "");
+        strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+        strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
         sleep(5);
     } else {
         memcpy((char *)SysConfig.ModelName,
@@ -180,8 +182,8 @@ int main(int argc, char *argv[])
     */
     //********** System **********// udhcpc -i eth1 -s ./dhcp_script/eth1.script
     //
-    strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
-    strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
+    //strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+    //strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
 
     memset(SysConfig.SystemId, 0x00, sizeof(SysConfig.SystemId));
     char Dash = '-';

+ 1 - 1
EVSE/Projects/DD360/Apps/Makefile

@@ -186,7 +186,7 @@ UnsafetyOutputTool:
 
 FactoryConfigApp:
 	@echo "===== Module_FactoryConfig_Task =================================="
-	rm -f Module_FactoryConfig
+	rm -f FactoryConfig
 	gcc $(DEFINE) -o FactoryConfig FactoryConfig.c
 	mkdir -p /Storage/SystemLog
 	./FactoryConfig -f;true

+ 16 - 4
EVSE/Projects/DD360/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -208,7 +208,9 @@ void CANReceiver(int fd)
         uint8_t printChillerTemp = NO;
         uint8_t printConnTemp = NO;
         uint8_t maxChillerTemp = 0;
+        uint8_t lastChillerTemp = 0;
         uint8_t maxConnTemp = 0;
+        uint8_t lastConnTemp[2] = {0, 0};
         struct can_frame frame;
         ChillerTemp chiilerTemp = {0};
         struct ChargingInfoData *pDcChargingInfo = NULL;
@@ -479,19 +481,29 @@ void CANReceiver(int fd)
                     getChillerTemperature(&chiilerTemp);
                     maxChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
 
-                    if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //    printChillerTemp = YES;
+                    //}
+                    if(maxChillerTemp > (lastChillerTemp + 1) || maxChillerTemp < (lastChillerTemp - 1))
+                    {
+                        lastChillerTemp = maxChillerTemp;
                         printChillerTemp = YES;
                     }
 
-                    pDcChargingInfo->ChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
+                    pDcChargingInfo->ChillerTemp = maxChillerTemp;
                 }
 
                 maxConnTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
-                if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //    printConnTemp = YES;
+                //}
+                if(maxConnTemp > (lastConnTemp[targetGun] + 1) || maxConnTemp < (lastConnTemp[targetGun] - 1))
+                {
+                    lastConnTemp[targetGun] = maxConnTemp;
                     printConnTemp = YES;
                 }
 
-                pDcChargingInfo->ConnectorTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
+                pDcChargingInfo->ConnectorTemp = maxConnTemp;
 
                 //紀錄槍頭和水冷機溫度, 在系統狀態變化或溫度大於150
                 if ((ShmDcCommonData->SystemModeChange[targetGun] == YES) ||

+ 28 - 10
EVSE/Projects/DD360/Apps/ModuleEvComm/Module_EvTxComm.c

@@ -52,6 +52,8 @@ static float maxChargingPow = 0;                   // 限制最大充電能量
 static float LogInfo[2][10]; //DS60-120 add
 static int CanFd = -1;
 
+bool psuOutputReady[2] = {0, 0};
+
 //------------------------------------------------------------------------------
 extern void CANReceiver(int fd);
 extern void ClearAbnormalStatus_Chademo(uint8_t gun_index);
@@ -465,9 +467,9 @@ static void SetPresentChargingOutputFromPcPsu(uint8_t gunCount)
         break;
     }
 
-    vol1 = (((float)pPcPsuOutput0->Voltage));
+    vol1 = pPcPsuOutput0->Voltage == 0 ? chargingData0->FireChargingVoltage : (((float)pPcPsuOutput0->Voltage));
     cur1 = (chargingData0->PresentChargingCurrent * 10);//(((float)pPcPsuOutput0->Current) * 0.1);
-    vol2 = (((float)pPcPsuOutput1->Voltage));
+    vol2 = pPcPsuOutput1->Voltage == 0 ? chargingData1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur2 = (chargingData1->PresentChargingCurrent * 10);//(((float)pPcPsuOutput1->Current) * 0.1);
 
     if (
@@ -499,20 +501,35 @@ static void SetPresentChargingOutputPower(void)
 {
     float vol1 = 0, cur1 = 0;
     float vol2 = 0, cur2 = 0;
+    PcPsuOutput *pPcPsuOutput1 = NULL;
+    PcPsuOutput *pPcPsuOutput2 = NULL;
     struct ChargingInfoData *chargingData_1 = NULL;
     struct ChargingInfoData *chargingData_2 = NULL;
+    bool isPsuOutput1 = false, isPsuOutput2 = false;
 
     if (pSysConfig->TotalConnectorCount == 1) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
     } else if (pSysConfig->TotalConnectorCount == 2) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[1];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(1);
     }
 
-    vol1 = chargingData_1->FireChargingVoltage;
+    psuOutputReady[0] = chargingData_1->SystemStatus != S_CHARGING ? false : psuOutputReady[0];
+    psuOutputReady[1] = chargingData_2->SystemStatus != S_CHARGING ? false : psuOutputReady[1];
+
+    isPsuOutput1 = (pPcPsuOutput1->Voltage != 0 && psuOutputReady[0] == true);
+    isPsuOutput2 = (pPcPsuOutput2->Voltage != 0 && psuOutputReady[1] == true);
+
+    //vol1 = chargingData_1->FireChargingVoltage;
+    vol1 = isPsuOutput1 == false ? chargingData_1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur1 = (chargingData_1->PresentChargingCurrent * 10);
-    vol2 = chargingData_2->FireChargingVoltage;
+    //vol2 = chargingData_2->FireChargingVoltage;
+    vol2 = isPsuOutput2 == false ? chargingData_2->FireChargingVoltage : (((float)pPcPsuOutput2->Voltage));
     cur2 = (chargingData_2->PresentChargingCurrent * 10);
 
     //DS60-120 add
@@ -525,9 +542,11 @@ static void SetPresentChargingOutputPower(void)
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] >= cur2 + CHK_CUR_RANGE) ||
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] <= cur2 - CHK_CUR_RANGE)
        ) {
-        log_info("G1 -> Output Vol = %.1f, Output Cur = %.1f -- G2 -> Output Vol = %.1f, Output Cur = %.1f\r\n",
+        log_info("G1 -> Output Vol(%s) = %.1f, Output Cur = %.1f -- G2 -> Output Vol(%s) = %.1f, Output Cur = %.1f\r\n",
+                 isPsuOutput1 == true ? "P" : "R",
                  vol1 / 10,
                  cur1 / 10,
+                 isPsuOutput2 == true ? "P" : "R",
                  vol2 / 10,
                  cur2 / 10);
 
@@ -998,12 +1017,11 @@ int main(int argc, char *argv[])
 
                 // 設定當前輸出
                 ftime(&nowTime);
-                if (DiffTimeb(waitChargingTime, nowTime) < 3000 ||
-                        DiffTimeb(waitChargingTime, nowTime) < 0) {
-                    SetPresentChargingOutputPower();
-                } else {
-                    SetPresentChargingOutputFromPcPsu(pSysConfig->TotalConnectorCount);
+                if (!(DiffTimeb(waitChargingTime, nowTime) < 5000 ||
+                        DiffTimeb(waitChargingTime, nowTime) < 0)) {
+                    psuOutputReady[gunIndex] = true;
                 }
+                SetPresentChargingOutputPower();
 
                 // for test end
                 if (priorityLow % 5 == 0) {

+ 1 - 1
EVSE/Projects/DD360/Apps/Script/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

+ 4 - 4
EVSE/Projects/DD360/Apps/Script/replaceOtherDD360Project.sh

@@ -17,7 +17,7 @@ rm -rf $ProjectPath/DD360ComBox/Apps/;
 cp -r $ProjectPath/DD360Audi/Apps/ $ProjectPath/DD360ComBox/Apps;
 cp -r $ProjectPath/DD360Audi/ModelNameList.txt $ProjectPath/DD360ComBox/ModelNameList.txt;
 
-git add $ProjectPath/DD360;
-git add $ProjectPath/DD360Audi;
-git add $ProjectPath/DD360ComBox;
-git status;
+# git add $ProjectPath/DD360;
+# git add $ProjectPath/DD360Audi;
+# git add $ProjectPath/DD360ComBox;
+# git status;

二进制
EVSE/Projects/DD360/Apps/UnsafetyOutputTask


二进制
EVSE/Projects/DD360/Images/FactoryDefaultConfig.bin


二进制
EVSE/Projects/DD360/Images/ramdisk.gz


二进制
EVSE/Projects/DD360/output/FactoryConfig


二进制
EVSE/Projects/DD360/output/Module_DoComm


二进制
EVSE/Projects/DD360/output/Module_EvComm


二进制
EVSE/Projects/DD360/output/Module_EventLogging


二进制
EVSE/Projects/DD360/output/Module_InternalComm


二进制
EVSE/Projects/DD360/output/Module_LcmControl


二进制
EVSE/Projects/DD360/output/Module_PrimaryComm


二进制
EVSE/Projects/DD360/output/ReadCmdline


+ 1 - 1
EVSE/Projects/DD360/output/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

二进制
EVSE/Projects/DD360/output/main


+ 13 - 10
EVSE/Projects/DD360Audi/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.10.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.11.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;
@@ -1056,7 +1056,7 @@ int LoadSysConfigAndInfo()
             if (ChkSum != ChkSumOrg) {
                 log_warn("factory default  SysConfigData checksum NG, restore factory default\n");
                 free(buf);
-                system("cd /root;./Module_FactoryConfig -m");
+                system("cd /root;./FactoryConfig -m");
                 system("rm -f /Storage/OCPP/OCPPConfiguration");
                 system("sync");
                 sleep(5);
@@ -1108,7 +1108,7 @@ int LoadSysConfigAndInfo()
             log_info("SystemId over length.\n");
         }
 
-        system("cd /root;./Module_FactoryConfig -m");
+        system("cd /root;./FactoryConfig -m");
         sleep(3);
         system("/usr/bin/run_evse_restart.sh");
     }
@@ -1487,7 +1487,7 @@ void DisplayChargingInfo()
 
     log_info("*********** DisplayChargingInfo *********** \n");
     for (i = 0; i < pSysConfig->TotalConnectorCount; i++) {
-        pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(i);
+        pAcChargingInfo =  (struct ChargingInfoData *)GetDcChargingInfoData(i);
 
         if (pAcChargingInfo->SystemStatus != S_IDLE &&
                 pAcChargingInfo->SystemStatus != S_RESERVATION) {
@@ -1496,13 +1496,16 @@ void DisplayChargingInfo()
         }
     }
 
-    pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(0);
-
     if (pSysConfig->AcConnectorCount > 0 &&
-            pSysInfo->CurGunSelectedByAc == NO_DEFINE &&
-            pAcChargingInfo->SystemStatus >= S_PREPARNING &&
-            pAcChargingInfo->SystemStatus <= S_COMPLETE) {
-        pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+            pSysInfo->CurGunSelectedByAc == NO_DEFINE)
+    {
+        pAcChargingInfo = (struct ChargingInfoData*)GetAcChargingInfoData(0);
+
+        if (pAcChargingInfo->SystemStatus >= S_PREPARNING &&
+            pAcChargingInfo->SystemStatus <= S_COMPLETE)
+        {
+            pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+        }
     }
 
     usleep(50000);

+ 2 - 0
EVSE/Projects/DD360Audi/Apps/Define/define.h

@@ -473,6 +473,8 @@ struct SysConfigData
 	unsigned char 			OcppServerURL[512];			//http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
 	unsigned char 			ChargeBoxId[128];
 	unsigned char			chargePointVendor[20];		//the Vendor of the ChargePoint
+	unsigned char			OcppSecurityProfile;		//OCPP security profile 0~3
+	unsigned char			OcppSecurityPassword[41];	//OCPP AuthorizationKey for security profile
 	unsigned int 			Checksum;					//4 bytes checksum
 	struct LED				LedInfo;					// LED configuration info
 	unsigned char			ShowInformation;

+ 6 - 4
EVSE/Projects/DD360Audi/Apps/FactoryConfig.c

@@ -160,8 +160,10 @@ int main(int argc, char *argv[])
     if (InitShareMemory() == FAIL) {
         log_error("InitShareMemory NG\n");
 
-        strcpy((char *)SysConfig.ModelName, "");
-        strcpy((char *)SysConfig.SerialNumber, "");
+        //strcpy((char *)SysConfig.ModelName, "");
+        //strcpy((char *)SysConfig.SerialNumber, "");
+        strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+        strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
         sleep(5);
     } else {
         memcpy((char *)SysConfig.ModelName,
@@ -180,8 +182,8 @@ int main(int argc, char *argv[])
     */
     //********** System **********// udhcpc -i eth1 -s ./dhcp_script/eth1.script
     //
-    strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
-    strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
+    //strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+    //strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
 
     memset(SysConfig.SystemId, 0x00, sizeof(SysConfig.SystemId));
     char Dash = '-';

+ 1 - 1
EVSE/Projects/DD360Audi/Apps/Makefile

@@ -186,7 +186,7 @@ UnsafetyOutputTool:
 
 FactoryConfigApp:
 	@echo "===== Module_FactoryConfig_Task =================================="
-	rm -f Module_FactoryConfig
+	rm -f FactoryConfig
 	gcc $(DEFINE) -o FactoryConfig FactoryConfig.c
 	mkdir -p /Storage/SystemLog
 	./FactoryConfig -f;true

+ 16 - 4
EVSE/Projects/DD360Audi/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -208,7 +208,9 @@ void CANReceiver(int fd)
         uint8_t printChillerTemp = NO;
         uint8_t printConnTemp = NO;
         uint8_t maxChillerTemp = 0;
+        uint8_t lastChillerTemp = 0;
         uint8_t maxConnTemp = 0;
+        uint8_t lastConnTemp[2] = {0, 0};
         struct can_frame frame;
         ChillerTemp chiilerTemp = {0};
         struct ChargingInfoData *pDcChargingInfo = NULL;
@@ -479,19 +481,29 @@ void CANReceiver(int fd)
                     getChillerTemperature(&chiilerTemp);
                     maxChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
 
-                    if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //    printChillerTemp = YES;
+                    //}
+                    if(maxChillerTemp > (lastChillerTemp + 1) || maxChillerTemp < (lastChillerTemp - 1))
+                    {
+                        lastChillerTemp = maxChillerTemp;
                         printChillerTemp = YES;
                     }
 
-                    pDcChargingInfo->ChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
+                    pDcChargingInfo->ChillerTemp = maxChillerTemp;
                 }
 
                 maxConnTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
-                if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //    printConnTemp = YES;
+                //}
+                if(maxConnTemp > (lastConnTemp[targetGun] + 1) || maxConnTemp < (lastConnTemp[targetGun] - 1))
+                {
+                    lastConnTemp[targetGun] = maxConnTemp;
                     printConnTemp = YES;
                 }
 
-                pDcChargingInfo->ConnectorTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
+                pDcChargingInfo->ConnectorTemp = maxConnTemp;
 
                 //紀錄槍頭和水冷機溫度, 在系統狀態變化或溫度大於150
                 if ((ShmDcCommonData->SystemModeChange[targetGun] == YES) ||

+ 28 - 10
EVSE/Projects/DD360Audi/Apps/ModuleEvComm/Module_EvTxComm.c

@@ -52,6 +52,8 @@ static float maxChargingPow = 0;                   // 限制最大充電能量
 static float LogInfo[2][10]; //DS60-120 add
 static int CanFd = -1;
 
+bool psuOutputReady[2] = {0, 0};
+
 //------------------------------------------------------------------------------
 extern void CANReceiver(int fd);
 extern void ClearAbnormalStatus_Chademo(uint8_t gun_index);
@@ -465,9 +467,9 @@ static void SetPresentChargingOutputFromPcPsu(uint8_t gunCount)
         break;
     }
 
-    vol1 = (((float)pPcPsuOutput0->Voltage));
+    vol1 = pPcPsuOutput0->Voltage == 0 ? chargingData0->FireChargingVoltage : (((float)pPcPsuOutput0->Voltage));
     cur1 = (chargingData0->PresentChargingCurrent * 10);//(((float)pPcPsuOutput0->Current) * 0.1);
-    vol2 = (((float)pPcPsuOutput1->Voltage));
+    vol2 = pPcPsuOutput1->Voltage == 0 ? chargingData1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur2 = (chargingData1->PresentChargingCurrent * 10);//(((float)pPcPsuOutput1->Current) * 0.1);
 
     if (
@@ -499,20 +501,35 @@ static void SetPresentChargingOutputPower(void)
 {
     float vol1 = 0, cur1 = 0;
     float vol2 = 0, cur2 = 0;
+    PcPsuOutput *pPcPsuOutput1 = NULL;
+    PcPsuOutput *pPcPsuOutput2 = NULL;
     struct ChargingInfoData *chargingData_1 = NULL;
     struct ChargingInfoData *chargingData_2 = NULL;
+    bool isPsuOutput1 = false, isPsuOutput2 = false;
 
     if (pSysConfig->TotalConnectorCount == 1) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
     } else if (pSysConfig->TotalConnectorCount == 2) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[1];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(1);
     }
 
-    vol1 = chargingData_1->FireChargingVoltage;
+    psuOutputReady[0] = chargingData_1->SystemStatus != S_CHARGING ? false : psuOutputReady[0];
+    psuOutputReady[1] = chargingData_2->SystemStatus != S_CHARGING ? false : psuOutputReady[1];
+
+    isPsuOutput1 = (pPcPsuOutput1->Voltage != 0 && psuOutputReady[0] == true);
+    isPsuOutput2 = (pPcPsuOutput2->Voltage != 0 && psuOutputReady[1] == true);
+
+    //vol1 = chargingData_1->FireChargingVoltage;
+    vol1 = isPsuOutput1 == false ? chargingData_1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur1 = (chargingData_1->PresentChargingCurrent * 10);
-    vol2 = chargingData_2->FireChargingVoltage;
+    //vol2 = chargingData_2->FireChargingVoltage;
+    vol2 = isPsuOutput2 == false ? chargingData_2->FireChargingVoltage : (((float)pPcPsuOutput2->Voltage));
     cur2 = (chargingData_2->PresentChargingCurrent * 10);
 
     //DS60-120 add
@@ -525,9 +542,11 @@ static void SetPresentChargingOutputPower(void)
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] >= cur2 + CHK_CUR_RANGE) ||
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] <= cur2 - CHK_CUR_RANGE)
        ) {
-        log_info("G1 -> Output Vol = %.1f, Output Cur = %.1f -- G2 -> Output Vol = %.1f, Output Cur = %.1f\r\n",
+        log_info("G1 -> Output Vol(%s) = %.1f, Output Cur = %.1f -- G2 -> Output Vol(%s) = %.1f, Output Cur = %.1f\r\n",
+                 isPsuOutput1 == true ? "P" : "R",
                  vol1 / 10,
                  cur1 / 10,
+                 isPsuOutput2 == true ? "P" : "R",
                  vol2 / 10,
                  cur2 / 10);
 
@@ -998,12 +1017,11 @@ int main(int argc, char *argv[])
 
                 // 設定當前輸出
                 ftime(&nowTime);
-                if (DiffTimeb(waitChargingTime, nowTime) < 3000 ||
-                        DiffTimeb(waitChargingTime, nowTime) < 0) {
-                    SetPresentChargingOutputPower();
-                } else {
-                    SetPresentChargingOutputFromPcPsu(pSysConfig->TotalConnectorCount);
+                if (!(DiffTimeb(waitChargingTime, nowTime) < 5000 ||
+                        DiffTimeb(waitChargingTime, nowTime) < 0)) {
+                    psuOutputReady[gunIndex] = true;
                 }
+                SetPresentChargingOutputPower();
 
                 // for test end
                 if (priorityLow % 5 == 0) {

+ 1 - 1
EVSE/Projects/DD360Audi/Apps/Script/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

+ 4 - 4
EVSE/Projects/DD360Audi/Apps/Script/replaceOtherDD360Project.sh

@@ -17,7 +17,7 @@ rm -rf $ProjectPath/DD360ComBox/Apps/;
 cp -r $ProjectPath/DD360Audi/Apps/ $ProjectPath/DD360ComBox/Apps;
 cp -r $ProjectPath/DD360Audi/ModelNameList.txt $ProjectPath/DD360ComBox/ModelNameList.txt;
 
-git add $ProjectPath/DD360;
-git add $ProjectPath/DD360Audi;
-git add $ProjectPath/DD360ComBox;
-git status;
+# git add $ProjectPath/DD360;
+# git add $ProjectPath/DD360Audi;
+# git add $ProjectPath/DD360ComBox;
+# git status;

二进制
EVSE/Projects/DD360Audi/Images/FactoryDefaultConfig.bin


二进制
EVSE/Projects/DD360Audi/Images/ramdisk.gz


二进制
EVSE/Projects/DD360Audi/output/FactoryConfig


二进制
EVSE/Projects/DD360Audi/output/Module_DoComm


二进制
EVSE/Projects/DD360Audi/output/Module_EvComm


二进制
EVSE/Projects/DD360Audi/output/Module_EventLogging


二进制
EVSE/Projects/DD360Audi/output/Module_InternalComm


二进制
EVSE/Projects/DD360Audi/output/Module_LcmControl


二进制
EVSE/Projects/DD360Audi/output/Module_PrimaryComm


二进制
EVSE/Projects/DD360Audi/output/ReadCmdline


+ 1 - 1
EVSE/Projects/DD360Audi/output/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

二进制
EVSE/Projects/DD360Audi/output/main


+ 13 - 10
EVSE/Projects/DD360ComBox/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.10.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.11.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;
@@ -1056,7 +1056,7 @@ int LoadSysConfigAndInfo()
             if (ChkSum != ChkSumOrg) {
                 log_warn("factory default  SysConfigData checksum NG, restore factory default\n");
                 free(buf);
-                system("cd /root;./Module_FactoryConfig -m");
+                system("cd /root;./FactoryConfig -m");
                 system("rm -f /Storage/OCPP/OCPPConfiguration");
                 system("sync");
                 sleep(5);
@@ -1108,7 +1108,7 @@ int LoadSysConfigAndInfo()
             log_info("SystemId over length.\n");
         }
 
-        system("cd /root;./Module_FactoryConfig -m");
+        system("cd /root;./FactoryConfig -m");
         sleep(3);
         system("/usr/bin/run_evse_restart.sh");
     }
@@ -1487,7 +1487,7 @@ void DisplayChargingInfo()
 
     log_info("*********** DisplayChargingInfo *********** \n");
     for (i = 0; i < pSysConfig->TotalConnectorCount; i++) {
-        pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(i);
+        pAcChargingInfo =  (struct ChargingInfoData *)GetDcChargingInfoData(i);
 
         if (pAcChargingInfo->SystemStatus != S_IDLE &&
                 pAcChargingInfo->SystemStatus != S_RESERVATION) {
@@ -1496,13 +1496,16 @@ void DisplayChargingInfo()
         }
     }
 
-    pAcChargingInfo =  (struct ChargingInfoData *)GetAcChargingInfoData(0);
-
     if (pSysConfig->AcConnectorCount > 0 &&
-            pSysInfo->CurGunSelectedByAc == NO_DEFINE &&
-            pAcChargingInfo->SystemStatus >= S_PREPARNING &&
-            pAcChargingInfo->SystemStatus <= S_COMPLETE) {
-        pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+            pSysInfo->CurGunSelectedByAc == NO_DEFINE)
+    {
+        pAcChargingInfo = (struct ChargingInfoData*)GetAcChargingInfoData(0);
+
+        if (pAcChargingInfo->SystemStatus >= S_PREPARNING &&
+            pAcChargingInfo->SystemStatus <= S_COMPLETE)
+        {
+            pSysInfo->CurGunSelectedByAc = DEFAULT_AC_INDEX;
+        }
     }
 
     usleep(50000);

+ 2 - 0
EVSE/Projects/DD360ComBox/Apps/Define/define.h

@@ -473,6 +473,8 @@ struct SysConfigData
 	unsigned char 			OcppServerURL[512];			//http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
 	unsigned char 			ChargeBoxId[128];
 	unsigned char			chargePointVendor[20];		//the Vendor of the ChargePoint
+	unsigned char			OcppSecurityProfile;		//OCPP security profile 0~3
+	unsigned char			OcppSecurityPassword[41];	//OCPP AuthorizationKey for security profile
 	unsigned int 			Checksum;					//4 bytes checksum
 	struct LED				LedInfo;					// LED configuration info
 	unsigned char			ShowInformation;

+ 6 - 4
EVSE/Projects/DD360ComBox/Apps/FactoryConfig.c

@@ -160,8 +160,10 @@ int main(int argc, char *argv[])
     if (InitShareMemory() == FAIL) {
         log_error("InitShareMemory NG\n");
 
-        strcpy((char *)SysConfig.ModelName, "");
-        strcpy((char *)SysConfig.SerialNumber, "");
+        //strcpy((char *)SysConfig.ModelName, "");
+        //strcpy((char *)SysConfig.SerialNumber, "");
+        strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+        strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
         sleep(5);
     } else {
         memcpy((char *)SysConfig.ModelName,
@@ -180,8 +182,8 @@ int main(int argc, char *argv[])
     */
     //********** System **********// udhcpc -i eth1 -s ./dhcp_script/eth1.script
     //
-    strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
-    strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
+    //strcpy((char *)SysConfig.ModelName, "DDYC182V0UE2AD");
+    //strcpy((char *)SysConfig.SerialNumber, "SERIALFORRD");
 
     memset(SysConfig.SystemId, 0x00, sizeof(SysConfig.SystemId));
     char Dash = '-';

+ 1 - 1
EVSE/Projects/DD360ComBox/Apps/Makefile

@@ -186,7 +186,7 @@ UnsafetyOutputTool:
 
 FactoryConfigApp:
 	@echo "===== Module_FactoryConfig_Task =================================="
-	rm -f Module_FactoryConfig
+	rm -f FactoryConfig
 	gcc $(DEFINE) -o FactoryConfig FactoryConfig.c
 	mkdir -p /Storage/SystemLog
 	./FactoryConfig -f;true

+ 16 - 4
EVSE/Projects/DD360ComBox/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -208,7 +208,9 @@ void CANReceiver(int fd)
         uint8_t printChillerTemp = NO;
         uint8_t printConnTemp = NO;
         uint8_t maxChillerTemp = 0;
+        uint8_t lastChillerTemp = 0;
         uint8_t maxConnTemp = 0;
+        uint8_t lastConnTemp[2] = {0, 0};
         struct can_frame frame;
         ChillerTemp chiilerTemp = {0};
         struct ChargingInfoData *pDcChargingInfo = NULL;
@@ -479,19 +481,29 @@ void CANReceiver(int fd)
                     getChillerTemperature(&chiilerTemp);
                     maxChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
 
-                    if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //if ((maxChillerTemp - 3) >= pDcChargingInfo->ChillerTemp) {
+                    //    printChillerTemp = YES;
+                    //}
+                    if(maxChillerTemp > (lastChillerTemp + 1) || maxChillerTemp < (lastChillerTemp - 1))
+                    {
+                        lastChillerTemp = maxChillerTemp;
                         printChillerTemp = YES;
                     }
 
-                    pDcChargingInfo->ChillerTemp = getMaxConnectTemp(chiilerTemp.Temp[0], chiilerTemp.Temp[1]);
+                    pDcChargingInfo->ChillerTemp = maxChillerTemp;
                 }
 
                 maxConnTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
-                if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //if ((maxConnTemp - 3) >= pDcChargingInfo->ConnectorTemp) {
+                //    printConnTemp = YES;
+                //}
+                if(maxConnTemp > (lastConnTemp[targetGun] + 1) || maxConnTemp < (lastConnTemp[targetGun] - 1))
+                {
+                    lastConnTemp[targetGun] = maxConnTemp;
                     printConnTemp = YES;
                 }
 
-                pDcChargingInfo->ConnectorTemp = getMaxConnectTemp(frame.data[1], frame.data[2]);
+                pDcChargingInfo->ConnectorTemp = maxConnTemp;
 
                 //紀錄槍頭和水冷機溫度, 在系統狀態變化或溫度大於150
                 if ((ShmDcCommonData->SystemModeChange[targetGun] == YES) ||

+ 28 - 10
EVSE/Projects/DD360ComBox/Apps/ModuleEvComm/Module_EvTxComm.c

@@ -52,6 +52,8 @@ static float maxChargingPow = 0;                   // 限制最大充電能量
 static float LogInfo[2][10]; //DS60-120 add
 static int CanFd = -1;
 
+bool psuOutputReady[2] = {0, 0};
+
 //------------------------------------------------------------------------------
 extern void CANReceiver(int fd);
 extern void ClearAbnormalStatus_Chademo(uint8_t gun_index);
@@ -465,9 +467,9 @@ static void SetPresentChargingOutputFromPcPsu(uint8_t gunCount)
         break;
     }
 
-    vol1 = (((float)pPcPsuOutput0->Voltage));
+    vol1 = pPcPsuOutput0->Voltage == 0 ? chargingData0->FireChargingVoltage : (((float)pPcPsuOutput0->Voltage));
     cur1 = (chargingData0->PresentChargingCurrent * 10);//(((float)pPcPsuOutput0->Current) * 0.1);
-    vol2 = (((float)pPcPsuOutput1->Voltage));
+    vol2 = pPcPsuOutput1->Voltage == 0 ? chargingData1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur2 = (chargingData1->PresentChargingCurrent * 10);//(((float)pPcPsuOutput1->Current) * 0.1);
 
     if (
@@ -499,20 +501,35 @@ static void SetPresentChargingOutputPower(void)
 {
     float vol1 = 0, cur1 = 0;
     float vol2 = 0, cur2 = 0;
+    PcPsuOutput *pPcPsuOutput1 = NULL;
+    PcPsuOutput *pPcPsuOutput2 = NULL;
     struct ChargingInfoData *chargingData_1 = NULL;
     struct ChargingInfoData *chargingData_2 = NULL;
+    bool isPsuOutput1 = false, isPsuOutput2 = false;
 
     if (pSysConfig->TotalConnectorCount == 1) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
     } else if (pSysConfig->TotalConnectorCount == 2) {
+        pPcPsuOutput1 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[0];
+        pPcPsuOutput2 = (PcPsuOutput *)&ShmDcCommonData->PcPsuOutput[1];
         chargingData_1 = (struct ChargingInfoData *)GetDcChargingInfoData(0);
         chargingData_2 = (struct ChargingInfoData *)GetDcChargingInfoData(1);
     }
 
-    vol1 = chargingData_1->FireChargingVoltage;
+    psuOutputReady[0] = chargingData_1->SystemStatus != S_CHARGING ? false : psuOutputReady[0];
+    psuOutputReady[1] = chargingData_2->SystemStatus != S_CHARGING ? false : psuOutputReady[1];
+
+    isPsuOutput1 = (pPcPsuOutput1->Voltage != 0 && psuOutputReady[0] == true);
+    isPsuOutput2 = (pPcPsuOutput2->Voltage != 0 && psuOutputReady[1] == true);
+
+    //vol1 = chargingData_1->FireChargingVoltage;
+    vol1 = isPsuOutput1 == false ? chargingData_1->FireChargingVoltage : (((float)pPcPsuOutput1->Voltage));
     cur1 = (chargingData_1->PresentChargingCurrent * 10);
-    vol2 = chargingData_2->FireChargingVoltage;
+    //vol2 = chargingData_2->FireChargingVoltage;
+    vol2 = isPsuOutput2 == false ? chargingData_2->FireChargingVoltage : (((float)pPcPsuOutput2->Voltage));
     cur2 = (chargingData_2->PresentChargingCurrent * 10);
 
     //DS60-120 add
@@ -525,9 +542,11 @@ static void SetPresentChargingOutputPower(void)
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] >= cur2 + CHK_CUR_RANGE) ||
             (LogInfo[1][EV_LOG_NOW_OUTPUT_CUR] <= cur2 - CHK_CUR_RANGE)
        ) {
-        log_info("G1 -> Output Vol = %.1f, Output Cur = %.1f -- G2 -> Output Vol = %.1f, Output Cur = %.1f\r\n",
+        log_info("G1 -> Output Vol(%s) = %.1f, Output Cur = %.1f -- G2 -> Output Vol(%s) = %.1f, Output Cur = %.1f\r\n",
+                 isPsuOutput1 == true ? "P" : "R",
                  vol1 / 10,
                  cur1 / 10,
+                 isPsuOutput2 == true ? "P" : "R",
                  vol2 / 10,
                  cur2 / 10);
 
@@ -998,12 +1017,11 @@ int main(int argc, char *argv[])
 
                 // 設定當前輸出
                 ftime(&nowTime);
-                if (DiffTimeb(waitChargingTime, nowTime) < 3000 ||
-                        DiffTimeb(waitChargingTime, nowTime) < 0) {
-                    SetPresentChargingOutputPower();
-                } else {
-                    SetPresentChargingOutputFromPcPsu(pSysConfig->TotalConnectorCount);
+                if (!(DiffTimeb(waitChargingTime, nowTime) < 5000 ||
+                        DiffTimeb(waitChargingTime, nowTime) < 0)) {
+                    psuOutputReady[gunIndex] = true;
                 }
+                SetPresentChargingOutputPower();
 
                 // for test end
                 if (priorityLow % 5 == 0) {

+ 1 - 1
EVSE/Projects/DD360ComBox/Apps/Script/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

+ 4 - 4
EVSE/Projects/DD360ComBox/Apps/Script/replaceOtherDD360Project.sh

@@ -17,7 +17,7 @@ rm -rf $ProjectPath/DD360ComBox/Apps/;
 cp -r $ProjectPath/DD360Audi/Apps/ $ProjectPath/DD360ComBox/Apps;
 cp -r $ProjectPath/DD360Audi/ModelNameList.txt $ProjectPath/DD360ComBox/ModelNameList.txt;
 
-git add $ProjectPath/DD360;
-git add $ProjectPath/DD360Audi;
-git add $ProjectPath/DD360ComBox;
-git status;
+# git add $ProjectPath/DD360;
+# git add $ProjectPath/DD360Audi;
+# git add $ProjectPath/DD360ComBox;
+# git status;

二进制
EVSE/Projects/DD360ComBox/Apps/UnsafetyOutputTask


二进制
EVSE/Projects/DD360ComBox/Images/FactoryDefaultConfig.bin


二进制
EVSE/Projects/DD360ComBox/Images/ramdisk.gz


二进制
EVSE/Projects/DD360ComBox/output/FactoryConfig


二进制
EVSE/Projects/DD360ComBox/output/Module_DoComm


二进制
EVSE/Projects/DD360ComBox/output/Module_EvComm


二进制
EVSE/Projects/DD360ComBox/output/Module_EventLogging


二进制
EVSE/Projects/DD360ComBox/output/Module_InternalComm


二进制
EVSE/Projects/DD360ComBox/output/Module_LcmControl


二进制
EVSE/Projects/DD360ComBox/output/Module_PrimaryComm


二进制
EVSE/Projects/DD360ComBox/output/ReadCmdline


+ 1 - 1
EVSE/Projects/DD360ComBox/output/init.sh

@@ -10,4 +10,4 @@ chmod 777 kill.sh
 chmod 777 ReadCmdline
 chmod 777 Module_DoComm
 chmod 777 SearchIP.sh
-chmod 777 Module_FactoryConfig
+chmod 777 FactoryConfig

二进制
EVSE/Projects/DD360ComBox/output/main