Browse Source

2022-07-26 / Simon Xue

Action:
1. [Mod] Timeout using clock.
2. [Mod] Status will from MAINTAIN recover to IDLE when EMG Botton
release in power on.
3. [Add] Show reservation icon.
4. [Mod] Set system time when idle.

Files
As the following commit history files

Image Version: V2.16.XX.XXXX.XX
Simon Xue 2 years ago
parent
commit
c9261e1644
33 changed files with 372 additions and 262 deletions
  1. 19 16
      EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c
  2. 91 112
      EVSE/Projects/DD360Tcci/Apps/CSU/main.c
  3. 2 1
      EVSE/Projects/DD360Tcci/Apps/CSU/main.h
  4. 16 5
      EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.c
  5. 1 1
      EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.h
  6. 3 2
      EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvRxComm.c
  7. 24 11
      EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvTxComm.c
  8. 7 7
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/AcPlug.c
  9. 4 4
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/FanBoard.c
  10. 5 5
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/LEDlight.c
  11. 15 0
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.c
  12. 2 1
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.h
  13. 25 25
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/RelayBoard.c
  14. 58 27
      EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c
  15. 6 0
      EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.h
  16. 10 0
      EVSE/Projects/DD360Tcci/Apps/ModulePrimary/Module_PrimaryComm.c
  17. 35 25
      EVSE/Projects/DD360Tcci/Apps/ModulePsuComm/Module_PsuComm.c
  18. 4 4
      EVSE/Projects/DD360Tcci/Apps/ModulePsuComm/Module_PsuComm.h
  19. 17 4
      EVSE/Projects/DD360Tcci/Apps/OutputTask.c
  20. 1 1
      EVSE/Projects/DD360Tcci/Apps/OutputTask.h
  21. 23 8
      EVSE/Projects/DD360Tcci/Apps/ReadCmdline.c
  22. BIN
      EVSE/Projects/DD360Tcci/Apps/UnsafetyOutputTask
  23. 4 3
      EVSE/Projects/DD360Tcci/Apps/timeout.h
  24. BIN
      EVSE/Projects/DD360Tcci/Images/ramdisk.gz
  25. BIN
      EVSE/Projects/DD360Tcci/output/Module_DoComm
  26. BIN
      EVSE/Projects/DD360Tcci/output/Module_EvComm
  27. BIN
      EVSE/Projects/DD360Tcci/output/Module_InternalComm
  28. BIN
      EVSE/Projects/DD360Tcci/output/Module_LcmControl
  29. BIN
      EVSE/Projects/DD360Tcci/output/Module_PrimaryComm
  30. BIN
      EVSE/Projects/DD360Tcci/output/Module_UpdateFW
  31. BIN
      EVSE/Projects/DD360Tcci/output/ReadCmdline
  32. BIN
      EVSE/Projects/DD360Tcci/output/UnsafetyOutputTask
  33. BIN
      EVSE/Projects/DD360Tcci/output/main

+ 19 - 16
EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c

@@ -287,6 +287,11 @@ void storePayResult(uint8_t gunIndex)
     memcpy(&LocalTransactionInfo, &ShmDcCommonData->TransactionInfo[gunIndex] ,sizeof(RecordTransactionInfo));
     //LocalTransactionInfo.Amount = ShmDcCommonData->finalcost[gunIndex];
 }
+void getPayResult(uint8_t gunIndex)
+{
+    memcpy(&ShmDcCommonData->TransactionInfo[gunIndex], &LocalTransactionInfo, sizeof(RecordTransactionInfo));
+    memset(&LocalTransactionInfo, 0, sizeof(RecordTransactionInfo));
+}
 void PreAuthCompleteToCardReader(int fd,uint8_t gunIndex)
 {
     struct SysConfigData* pSysConfig = (struct SysConfigData*)GetShmSysConfigData();
@@ -361,12 +366,7 @@ void ReDeductProcess(int fd)
         log_info("Rededuct Total Number:%d", rededuct_num);
         for (j = rededuct_num-1; j >= 0 ; j--) {
             sleep(10);
-            /*
-            if (pSysInfo->SystemPage != _PAGE_IDLE && !ShmDcCommonData->Exe_ReDeduct) {
-                ShmDcCommonData->RoutineReduct = FALSE;
-                break;
-            }
-            */
+
             log_info("Start Rededuct item [%d]",j);
             if (deductInfo[j].isIntoCharge == FALSE ||
                 (deductInfo[j].Energy == 0 && deductInfo[j].Amount == 0) ||
@@ -505,17 +505,13 @@ void CreateRfidFork(void)
                 }
 
                 if (ShmDcCommonData->StopCharge[gunIndex] == TRUE && pDcChargingInfo->Replug_flag == TRUE) {
+                    ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                     // Remote Start of AutoStart ByPass Credit Card Reader
                     if (ShmDcCommonData->DebugFlag == TRUE ||
                         ShmDcCommonData->is_RemoteStart[gunIndex] == TRUE ||
                         ShmDcCommonData->is_AutoStart[gunIndex] == TRUE) {
-                        if (pSysInfo->CurGunSelected == gunIndex)
-                            pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                        ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
-                        ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                         continue;
                     }
-                    ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                     log_info("Gun %d Not Into Charging cancel Trade",gunIndex);
             
                     StopGunInfoTimeoutDet(gunIndex);
@@ -531,16 +527,17 @@ void CreateRfidFork(void)
                         ShmDcCommonData->PreAuth_Config != _CREDITCARD_CANCEL) {
                         ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                         pSysInfo->CurGunSelected = gunIndex;
-                        pSysInfo->SystemPage = _PAGE_PAYING;
                         StopGunInfoTimeoutDet(gunIndex); //Timeout_FinalCost
 
                         // Remote Start of AutoStart ByPass Credit Card Reader
                         if (ShmDcCommonData->DebugFlag == TRUE || checkRemoteStart(gunIndex) ||
                             ShmDcCommonData->is_AutoStart[gunIndex]) {
-                            ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
+                            if (ShmDcCommonData->is_AutoStart[gunIndex]) {
+                                ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                            }
                             continue;
                         }
+
                         // 實際扣款
                         if (ShmDcCommonData->TransactionInfo[gunIndex].Amount < 1) {
                             log_info("Final Cost less 1 , Cancel Trade!!");
@@ -569,7 +566,7 @@ void CreateRfidFork(void)
                 ShmDcCommonData->TransactionInfo[sel_gun].IsDonateInvoice = (unsigned char)donate;
                 ShmDcCommonData->TransactionInfo[sel_gun].LineStatus = linestatus;
         		result = CreditCardPreAuth(fd, PREAUTHMONEY,&pSysConfig->ModelName[0], &ShmDcCommonData->TransactionInfo[sel_gun].pCreditCard);
-
+                
                 pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(sel_gun);
                 {
                     if (!checkRemoteStart(sel_gun)) {
@@ -578,8 +575,14 @@ void CreateRfidFork(void)
                         if (ShmDcCommonData->TradeCancel == FALSE && result > 0) {
                             pSysInfo->SystemPage = _PAGE_SENSING;
                         }
-                        if (result > 0)
+                        /*
+                        if (result > 0) {
+                            storePayResult(sel_gun);
+                            log_info("sleep");
                             sleep(3);
+                            log_info("Wake");
+                            getPayResult(sel_gun);
+                        }*/
                     }
                     ShmDcCommonData->PreAuth_Result = result;
 

+ 91 - 112
EVSE/Projects/DD360Tcci/Apps/CSU/main.c

@@ -82,8 +82,8 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V2.13.00.0000.00"; // Phihong version
-char* DebugVersion = "V2.13.01";      // Software debug version
+char *fwVersion = "V2.16.00.0000.00"; // Phihong version
+char* DebugVersion = "V2.16.00";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -94,8 +94,8 @@ long long DiffTimebWithNow(struct timeb ST);
 uint8_t DetectBitValue(uint8_t _byte, uint8_t _bit);
 void SetBitValue(uint8_t *_byte, uint8_t _bit, uint8_t value);
 unsigned long GetTimeoutValue(struct timeval _sour_time);
-void GetClockTime(struct timespec *_now_time, void *null);
 unsigned long GetClockTimeoutValue(struct timespec _start_time);
+void GetClockTime(struct timespec *_now_time, void *null);
 void gpio_set_value(unsigned int gpio, unsigned int value);
 void InformOcppErrOccur(uint8_t codeType);
 
@@ -1536,7 +1536,7 @@ void _AuthorizedTimeout(void)
 void _DetectPlugInTimeout(uint8_t gunIndex)
 {
 	int i;
-    log_info("*********** _DetectPlugInTimeout *********** ");
+    log_info("*********** Gun%d _DetectPlugInTimeout *********** ",gunIndex);
     pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(gunIndex);
 
     //StopSystemTimeoutDet();
@@ -2480,7 +2480,7 @@ void StartGunInfoTimeoutDet(uint8_t gunIndex, uint8_t flag)
 
     if (gunIndex < pSysConfig->TotalConnectorCount) {
         if (pDcChargingInfo->TimeoutFlag != flag) {
-            gettimeofday(&pDcChargingInfo->TimeoutTimer, NULL);
+            GetClockTime(&pDcChargingInfo->ConnectorTimeout, NULL);
             //log_info("Set Gun%d Timeout Flag %d", gunIndex, flag);
         }
         pDcChargingInfo->TimeoutFlag = flag;
@@ -2520,15 +2520,15 @@ void CreateTimeoutFork(void)
 
     timeoutPid = fork();
     if (timeoutPid == 0) {
-        gettimeofday(&_cmdSubPriority_time, NULL);
+        GetClockTime(&_cmdSubPriority_time, NULL);
         CheckConnectionTimeout();
 
         //log_info("Timeout Fork Child's PID is %d", getpid());
 
         while (1) {
-            if ((GetTimeoutValue(_cmdSubPriority_time) / 1000) > 5000) {
+            if ((GetClockTimeoutValue(_cmdSubPriority_time) / 1000) > 5000) {
                 CheckConnectionTimeout();
-                gettimeofday(&_cmdSubPriority_time, NULL);
+                GetClockTime(&_cmdSubPriority_time, NULL);
             }
             /*
             if (pSysInfo->SystemTimeoutFlag != 0)
@@ -2676,12 +2676,12 @@ void CreateTimeoutFork(void)
                 /*
                 if (pDcChargingInfo->TimeoutFlag != 0)
                 log_info("Timeout ***********GunTimeoutFlag = %d(%d) ********",pDcChargingInfo->TimeoutFlag,
-                        GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL);
+                        GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL);
                 */        
                 switch (pDcChargingInfo->TimeoutFlag) {
 
                 case Timeout_AuthorizingForStop:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= AUTHORIZE_STOP_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= AUTHORIZE_STOP_TIMEOUT) {
                         log_info("Gun %d Timeout_AuthorizingForStop", gunIndex);
                         strcpy((char*)pSysConfig->UserId, "");
                         pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(gunIndex);
@@ -2693,25 +2693,25 @@ void CreateTimeoutFork(void)
                     }
                     break;
                 case Timeout_WaitPlug:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= _connectionTimeout) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= _connectionTimeout) {
                         _DetectPlugInTimeout(gunIndex);
                         destroySelGun(gunIndex);
                     }
                     break;
                 case Timeout_EVCCID_Link:
-                if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= EVCCID_LINK_TIMEOUT) {
+                if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= EVCCID_LINK_TIMEOUT) {
                     _evccidlinktimeout(gunIndex);
                 	}
                 break;
                 case Timeout_LinkError:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= LINKERROR_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= LINKERROR_TIMEOUT) {
                     	_LinkErrorTimeout(gunIndex);
                     	StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex);
                     }
                 	break;
                 case Timeout_Preparing:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= GUN_PREPARE_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= GUN_PREPARE_TIMEOUT) {
                         _PrepareTimeout(gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex); //jerry add
@@ -2719,7 +2719,7 @@ void CreateTimeoutFork(void)
                     break;
 
                 case Timeout_EvChargingDet:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= GUN_EV_WAIT_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= GUN_EV_WAIT_TIMEOUT) {
                         _DetectEvChargingEnableTimeout(gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex); //jerry add
@@ -2727,7 +2727,7 @@ void CreateTimeoutFork(void)
                     break;
 
                 case Timeout_EvseChargingDet:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= GUN_EVSE_WAIT_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= GUN_EVSE_WAIT_TIMEOUT) {
                         _DetectEvseChargingEnableTimeout(gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex); //jerry add
@@ -2735,21 +2735,21 @@ void CreateTimeoutFork(void)
                     break;
 
                 case Timeout_EvseCompleteDet:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= GUN_COMP_WAIT_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= GUN_COMP_WAIT_TIMEOUT) {
                         StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex); //jerry add
                     }
                     break;
 
                 case Timeout_ForCcsPrechargeDet:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= GUN_PRECHARGING_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= GUN_PRECHARGING_TIMEOUT) {
                         _CcsPrechargeTimeout(gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                         destroySelGun(gunIndex); //jerry add
                     }
                     break;
                 case Timeout_PlugOutGun:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= PLUGOUTGUN_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= PLUGOUTGUN_TIMEOUT) {
                         log_info("Gun[%d] Timeout_PlugOutGun",gunIndex);
                         setChargerMode(gunIndex, MODE_IDLE);
                         destroySelGun(gunIndex); //Jerry add
@@ -2760,23 +2760,19 @@ void CreateTimeoutFork(void)
                     }
                     break;
                 case Timeout_FinalCost:
-                	if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= TCC_FINALCOST_TIMEOUT) {
+                	if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= TCC_FINALCOST_TIMEOUT) {
                         log_info("Gun[%d] Timeout_FinalCost",gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                 		if (ShmDcCommonData->finalcost_flag[gunIndex] == FALSE) {
-                            if (ShmDcCommonData->is_AutoStart[gunIndex] || ShmDcCommonData->is_RemoteStart[gunIndex]) {
-                                ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
-                                ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
-                            } else {
-                                log_info("Not Get Final Cost");
-                                ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
+                            log_info("Not Get Final Cost");
+                            ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
+                            if (pSysInfo->CurGunSelected == gunIndex)
                                 pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                            }
                 		}
                 	}
                 	break;
                 case Timeout_LineReigster:
-                	if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= TCC_LINEREGISTER_TIMEOUT) {
+                	if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= TCC_LINEREGISTER_TIMEOUT) {
                         log_info("Gun[%d] Timeout_LineReigster",gunIndex);
                 		StopGunInfoTimeoutDet(gunIndex);
                         systemPageRestoreInit();
@@ -2785,7 +2781,7 @@ void CreateTimeoutFork(void)
                 	}
                 	break;
                 case Timeout_ExitPage:
-                    if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= TCC_EXITPAGE_TIMEOUT) {
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= TCC_EXITPAGE_TIMEOUT) {
                         log_info("Gun[%d] Timeout_ExitPage", gunIndex);
                         StopGunInfoTimeoutDet(gunIndex);
                         ShmDcCommonData->is_exit[gunIndex] = TRUE;
@@ -2794,6 +2790,14 @@ void CreateTimeoutFork(void)
                         StartGunInfoTimeoutDet(gunIndex, Timeout_PlugOutGun);
                     }
                     break;
+                case Timeout_CompletPlugout:
+                    if (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL >= TCC_COMPLETE_PLUGOUT_TIMEOUT) {
+                        log_info("Gun[%d] Timeout_CompletePlugout", gunIndex);
+                        setChargerMode(gunIndex, MODE_IDLE);
+                        destroySelGun(gunIndex); //Jerry add
+                        StopGunInfoTimeoutDet(gunIndex);
+                    }
+                    break;
                 }
             }
             sleep(1);
@@ -3965,8 +3969,9 @@ void ResetIdleData(uint8_t gunIndex)
 }
 void CheckErrorCode(uint8_t gunIndex)
 {
+    /*
     struct ChargingInfoData *pSelectedDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
-
+    
     if (gunIndex == pSysInfo->CurGunSelected) {
         pSysInfo->SystemPage = _PAGE_MAINTAIN;
     } else if (pSelectedDcChargingInfo->SystemStatus != S_IDLE &&
@@ -3982,6 +3987,7 @@ void CheckErrorCode(uint8_t gunIndex)
             systemPageRestoreInit();
         }
     }
+    */
     ClearDetectPluginFlag(gunIndex);
     if (pDcChargingInfo->SystemStatus != S_FAULT)
     {
@@ -4075,7 +4081,6 @@ static void SetGunTypeOTPValue(void)
     //struct ChargingInfoData* chargingData_2 = NULL;
     uint8_t Gun1Type = 0;
     uint8_t Gun2Type = 0;
-    uint8_t Type;
     int i;
     if (pSysConfig->TotalConnectorCount == 1) {
         pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(0);
@@ -4295,7 +4300,7 @@ int main(void)
 
     CheckFwSlotStatusLog();
     //AdjustChargerCurrent();
-    gettimeofday(&_cmdMainPriority_time, NULL);
+    GetClockTime(&_cmdMainPriority_time, NULL);
 
    // GunIndexInfo *pGunIndexInfo = (GunIndexInfo *)GetGunIndexInfo();
 
@@ -4329,7 +4334,7 @@ int main(void)
         // 當 AC 沒有搭上時,清除一些錯誤碼
         ClearAlarmCodeWhenAcOff();
 
-        if ((GetTimeoutValue(_cmdMainPriority_time) / 1000) > 5000) {
+        if ((GetClockTimeoutValue(_cmdMainPriority_time) / 1000) > 5000) {
 
             for (gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
                 pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
@@ -4351,7 +4356,7 @@ int main(void)
                 }
                 checkGunOTPState(gunIndex); //check gun OTP
             }
-            gettimeofday(&_cmdMainPriority_time, NULL);
+            GetClockTime(&_cmdMainPriority_time, NULL);
         }
 
         gEvBoardErr.GunErrMessage = 0; //清除系統執行中的錯誤訊息
@@ -4465,7 +4470,7 @@ int main(void)
                     if (pDcChargingInfo->SystemStatus == S_FAULT) {
                         log_info("============================= S_FAULT(%x) ============================= ", gunIndex);
                         //pSysInfo->SystemPage = _LCM_ERROR;
-                        pSysInfo->SystemPage = _PAGE_MAINTAIN;
+                        //pSysInfo->SystemPage = _PAGE_MAINTAIN;
                     }
                 }
             CheckStatus:
@@ -4574,7 +4579,6 @@ int main(void)
                     pDcChargingInfo->Replug_flag = TRUE;
                     StopSystemTimeoutDet();
                     StopGunInfoTimeoutDet(gunIndex);
-                    gettimeofday(&pDcChargingInfo->PreChargeTimer, NULL);
                 }
 
                 setChargerMode(gunIndex, S_PREPARNING);
@@ -4593,7 +4597,7 @@ int main(void)
 
                 if (ShmPsuData->SystemPresentPsuQuantity > 0 &&
                         ShmPsuData->SystemAvailablePower > 10 &&
-                        GetTimeoutValue(pDcChargingInfo->TimeoutTimer) >= 1000000) {
+                        GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) >= 1000000) {
                     setChargerMode(gunIndex, MODE_PREPARE_FOR_EV);
                 }
 
@@ -4767,9 +4771,16 @@ int main(void)
                         strcpy((char *)ShmOCPP16Data->StopTransaction[gunIndex].StopReason, "Local");
                     }
                     ShmDcCommonData->StopCharge[gunIndex] = TRUE;
-                    StopGunInfoTimeoutDet(gunIndex);
-                    StartGunInfoTimeoutDet(gunIndex, Timeout_FinalCost);
+                    if (ShmDcCommonData->is_AutoStart[gunIndex]) {
+                        ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
+                        ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                    }
+
+                    if (ShmDcCommonData->finalcost_flag[gunIndex] == FALSE && pSysInfo->CurGunSelected == gunIndex) {
+                        pSysInfo->SystemPage = _PAGE_PAYING;
+                    }
                     StartSystemTimeoutDet(Timeout_Terminating);
+                    StartGunInfoTimeoutDet(gunIndex, Timeout_FinalCost);
 
                     ShmDcCommonData->pGunInfo[gunIndex].RecordEnergyTime = time((time_t*)NULL);
                     if (ShmDcCommonData->pGunInfo[gunIndex].PowerConsumption != 0)
@@ -4796,33 +4807,17 @@ int main(void)
                         setChargerMode(gunIndex, MODE_COMPLETE);
                     }
                 }
-                // Remote start
-                if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
-                    if (pDcChargingInfo->Replug_flag == TRUE)
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                    else {
-                        if (ShmDcCommonData->finalcost_flag[gunIndex]) {
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
-                        } else {
-                            pSysInfo->SystemPage = _PAGE_PAYING;
-                        }
-                    }
+                if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
+                    pSysInfo->SystemPage = _PAGE_PLUGOUT;
                     break;
                 }
-                //if (pSysInfo->SystemPage == _LCM_ERROR) {
-                if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
-					break;
-                }
-                if (pSysInfo->CurGunSelected == gunIndex && 
+
+                if (pSysInfo->CurGunSelected == gunIndex &&
                     pSysInfo->SystemPage != _PAGE_PAYING && pSysInfo->SystemPage != _PAGE_SENSING) {
-                    if (pDcChargingInfo->Replug_flag == TRUE)
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                    else {
-                        if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
-                        else
-                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                    }
+                    if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
+                        pSysInfo->SystemPage = _PAGE_COMPLETE;
+                    else
+                        pSysInfo->SystemPage = _PAGE_PAYFAIL;
                 }
                 break;
 
@@ -4833,6 +4828,7 @@ int main(void)
                         OcppStopTransation(gunIndex);
                     }
                     TheEndCharging(gunIndex);
+                    
                     if (pDcChargingInfo->Replug_flag != TRUE && pSysInfo->SystemPage != _PAGE_PLUGOUT)
                         StopSystemTimeoutDet();
                     if (ShmDcCommonData->is_AutoStart[gunIndex] == TRUE && pSysInfo->CurGunSelected == gunIndex)
@@ -4853,27 +4849,19 @@ int main(void)
                     if (pSysInfo->CurGunSelected == gunIndex) {
                         StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
                     }
+                    if (pDcChargingInfo->TimeoutFlag != Timeout_ExitPage &&
+                        pDcChargingInfo->TimeoutFlag != Timeout_FinalCost) {
+
+                        StartGunInfoTimeoutDet(gunIndex, Timeout_CompletPlugout);
+                    }
+
                 }
+
                 if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
                     pSysInfo->SystemPage = _PAGE_PLUGOUT;
                     break;
                 }
-                // Remote start
-                if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
-
-                    if (ShmDcCommonData->finalcost_flag[gunIndex]) {
-                        if (ShmDcCommonData->PayPass_flag[gunIndex]) {
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
-                            //log_info("_PAGE_COMPLETE");
-                        } else {
-                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                            //log_info("_PAGE_PAYFAIL");
-                        }
-                    } else {
-                        pSysInfo->SystemPage = _PAGE_PAYING;
-                    }
-                    break;
-                }
+
                 if (pSysInfo->CurGunSelected == gunIndex && 
                     pSysInfo->SystemPage != _PAGE_PAYING && pSysInfo->SystemPage != _PAGE_SENSING) {
                     if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
@@ -4897,18 +4885,17 @@ int main(void)
                     TheEndCharging(gunIndex);
                     StopGunInfoTimeoutDet(gunIndex);
                     ShmDcCommonData->StopCharge[gunIndex] = TRUE;
-                    
+
+                    if (ShmDcCommonData->is_AutoStart[gunIndex]) {
+                        ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
+                        ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                    }
+
                     if (pDcChargingInfo->Replug_flag == TRUE) {
-                        /*
-                        ShmDcCommonData->TradeCancel = TRUE;
-                        StartSystemTimeoutDet(Timeout_TradeCancel);
-                		ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
-                		ShmDcCommonData->PreAuth_Result = 0;
-                        pSysInfo->SystemPage = _PAGE_SENSING;
-                        */
+
                     } else {
                         StartGunInfoTimeoutDet(gunIndex, Timeout_FinalCost);
-						if(ShmDcCommonData->finalcost_flag[gunIndex] == FALSE && !ShmDcCommonData->is_RemoteStart[gunIndex]) {
+						if(ShmDcCommonData->finalcost_flag[gunIndex] == FALSE && pSysInfo->CurGunSelected) {
 							pSysInfo->SystemPage = _PAGE_PAYING;
 						}
                     }
@@ -4932,23 +4919,16 @@ int main(void)
                     if (pSysInfo->CurGunSelected == gunIndex) {
                         StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
                     }
+                    if (pDcChargingInfo->TimeoutFlag != Timeout_ExitPage &&
+                        pDcChargingInfo->TimeoutFlag != Timeout_FinalCost) {
+                        StartGunInfoTimeoutDet(gunIndex, Timeout_CompletPlugout);
+                    }
                 }
                 if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
                     pSysInfo->SystemPage = _PAGE_PLUGOUT;
                     break;
                 }
-                // Remote start
-                if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
-                    if (ShmDcCommonData->finalcost_flag[gunIndex]) {
-                        if (ShmDcCommonData->PayPass_flag[gunIndex])
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
-                        else
-                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                    } else {
-                        pSysInfo->SystemPage = _PAGE_PAYING;
-                    }
-                    break;
-                }
+
                 if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING ) {
                 	if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
 						pSysInfo->SystemPage = _PAGE_COMPLETE;
@@ -4990,20 +4970,19 @@ int main(void)
                         StopProcessingLoop();
                         */
                 }
-                /*
-                if (pDcChargingInfo->IsAvailable == TRUE) {
-                    log_info("Gun[%d] set Available",gunIndex);
-                    setChargerMode(gunIndex, MODE_IDLE);
+
+                if (pSysInfo->SelfTestSeq == _STEST_FAIL && pSysInfo->SystemTimeoutFlag != Timeout_SelftestChk) {
+                    SelfTestRun();
+                    StopSystemTimeoutDet();
+                    sleep(3);
                     break;
                 }
-                */
-                //if (pSysInfo->CurGunSelected == gunIndex) {
-                StopSystemTimeoutDet();
-                StopGunInfoTimeoutDet(gunIndex);
-                pSysInfo->SystemPage = _PAGE_MAINTAIN;
-                sleep(1);
-                //}
-
+                if (pDcChargingInfo->IsAvailable && pSysInfo->SelfTestSeq == _STEST_COMPLETE) {
+                    setChargerMode(gunIndex, MODE_IDLE);
+                }
+                if (pSysInfo->CurGunSelected == gunIndex) {
+                    pSysInfo->SystemPage = _PAGE_MAINTAIN;
+                }
                 break;
             case S_UPDATE:
                 if (isModeChange(gunIndex)) {

+ 2 - 1
EVSE/Projects/DD360Tcci/Apps/CSU/main.h

@@ -50,12 +50,13 @@
 #define TCC_LINEREGISTER_TIMEOUT				(90)
 #define TCC_DONATECOMFIRM_TIMEOUT				(180)
 #define TCC_SELECTPAY_TIMEOUT					(180)
-#define TCC_FINALCOST_TIMEOUT					(60)
+#define TCC_FINALCOST_TIMEOUT					(30)
 #define TCC_SCANCARD_TIMEOUT					(30)
 #define TCC_TRADECANCEL_TIMEOUT                 (60)
 #define TCC_EXITPAGE_TIMEOUT                    (10)
 #define TCC_ISPLUGOUT_TIMEOUT                   (3)
 #define TCC_LINEPAYING_TIMEOUT                  (5)
+#define TCC_COMPLETE_PLUGOUT_TIMEOUT            (120)
 
 //#define log_info(format, args...) StoreLogMsg_1("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
 //#define log_warn(format, args...) StoreLogMsg_1("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)

+ 16 - 5
EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.c

@@ -445,6 +445,7 @@ static int qrCodeUrlInfoHandle(uint8_t *data)
     struct tm *tm;
     char _setTime[50];
     uint8_t cmdBuf[128];
+    int is_idle = TRUE;
     if ((char *)&data[0] == '\0') {
         log_error("QR code date error");
         return FAIL;
@@ -464,13 +465,18 @@ static int qrCodeUrlInfoHandle(uint8_t *data)
     //copy QR code string
     if (strncmp((char *)localTime, (char *)&data[0], timeLen - 2) != 0) {
         memset(pSysConfig->SystemId, '\0', sizeof(pSysConfig->SystemId));
-        //printf("data =  %s", data);
-        //len =
+
+        // 充電槍IDLE時才更新系統時間
+        for (int i = 0; i < pSysConfig->TotalConnectorCount; i++) {
+            pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(i);
+            if (pDcChargingInfo->SystemStatus != S_IDLE)
+                is_idle = FALSE;
+        }
 
         string2ByteArray((char *)data, (uint8_t *)pSysConfig->SystemId);
         string2Date((char*)data, (uint8_t*)_setTime);
         //printf("SystemId =  %s", pSysConfig->SystemId);
-        if (!timecmp(localTime, _setTime)) {
+        if (!timecmp(localTime, _setTime) && is_idle) {
             //log_info("Set Timer:%s", _setTime);
             sprintf((char*)cmdBuf, "date -u -s \"%s\" >> /dev/null &", _setTime);
             system((char*)cmdBuf);
@@ -708,7 +714,7 @@ static int miscCommandHandle(uint8_t dataLen, uint8_t plugNum, uint8_t *data)
             log_info("Remote start charging plugNum = %d", plugNum);
 
             //pSysInfo->CurGunSelected = (plugNum);
-            pSysInfo->CurGunSelectedByAc = NO_DEFINE;
+            //pSysInfo->CurGunSelectedByAc = NO_DEFINE;
 
             setConfirmSelGun(plugNum);
 
@@ -1371,6 +1377,9 @@ static int responsePackeHandle(int fd, uint8_t *pResult, uint8_t plugNum, uint8_
             {
                 log_info("id = %d reservation idTag: %s", pCsuResult->Head.ID, (char *)&ReservationIdTag[plugNum][0]);
                 strcpy(&ShmDcCommonData->pGunInfo[plugNum].ReservationID[0], (char*)&pCsuResult->Data.Data[1]);
+                if (pSysInfo->SystemPage == _PAGE_IDLE) {
+                    pSysInfo->SystemPage = _PAGE_SELECT_GUN;
+                }
             } else {
                 strcpy(&ShmDcCommonData->pGunInfo[plugNum].ReservationID[0], "");
             }
@@ -2262,8 +2271,10 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
 					ShmDcCommonData->TransactionInfo[plugNum].Amount = pDcChargingInfo->ChargingFee;
 					ShmDcCommonData->finalcost_flag[plugNum] = TRUE;
 					log_info("Gun %d get final cost %f", plugNum, ShmDcCommonData->TransactionInfo[plugNum].Amount);
-                    if (ShmDcCommonData->is_RemoteStart[plugNum] || ShmDcCommonData->is_AutoStart[plugNum]) {
+                    if (ShmDcCommonData->is_AutoStart[plugNum] || ShmDcCommonData->is_RemoteStart[plugNum]) {
                         ShmDcCommonData->PayPass_flag[plugNum] = TRUE;
+                        if (pSysInfo->CurGunSelected == plugNum)
+                            pSysInfo->SystemPage = _PAGE_COMPLETE;
                     }
                 }
             }

+ 1 - 1
EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.h

@@ -204,7 +204,7 @@ typedef union
         unsigned int FinalCostReq:1;                // 0: no effect,                1: need to request FinalCost
         unsigned int ChargingBill:1;                // 0: no effect,                1: need to request ChargineBill
         unsigned int res:27;
-    }bits;
+    } bits;
 } MoreInfoReq;
 
 typedef struct StStationVar {

+ 3 - 2
EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -27,7 +27,7 @@ static struct GBTData *ShmGBTData = NULL;
 static struct CcsData *ShmCcsData = NULL;
 static struct FanModuleData *ShmFanModuleData = NULL;
 static DcCommonInfo *ShmDcCommonData = NULL;
-
+struct StatusCodeData* ShmStatusCodeData;
 #define TempArraySize 10
 uint8_t TempArray_1[TempArraySize]={0};
 uint8_t TempArray_2[TempArraySize]={0};
@@ -318,6 +318,7 @@ void CANReceiver(int fd)
         ShmCcsData = (struct CcsData *)GetShmCcsData();
         ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
         ShmFanModuleData = (struct FanModuleData *)GetShmFanModuleData();
+        ShmStatusCodeData = (struct StatusCodeData*)GetShmStatusCodeData();
 
         //log_info("Module_EvRXComm Child's PID is %d", getpid());
         CCS_PlugoutTimer[0] = time((time_t*)NULL);
@@ -328,7 +329,7 @@ void CANReceiver(int fd)
 
             for (_index = 0; _index < pSysConfig->TotalConnectorCount; _index++) {
                 // 檢查是否有收到EV小板訊號
-                if (pSysInfo->SelfTestSeq == _STEST_COMPLETE) {
+                if (pSysInfo->SelfTestSeq == _STEST_COMPLETE && !ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemTaskLost) {
                     if ((time((time_t*)NULL) - ShmDcCommonData->pGunInfo[_index].EVLoseTimer > 5) &&
                         !ShmDcCommonData->pGunInfo[_index].EVLoseFlag &&
                         pDcChargingInfo->SystemStatus != S_UPDATE && !ShmDcCommonData->DebugFlag) {

+ 24 - 11
EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvTxComm.c

@@ -67,7 +67,10 @@ int GetCanFd(void)
 {
     return CanFd;
 }
-
+void GetClockTime(struct timespec* _now_time, void* null)
+{
+    clock_gettime(CLOCK_MONOTONIC, _now_time);
+}
 uint32_t GetTimeoutValue(struct timeval _sour_time)
 {
     struct timeval _end_time;
@@ -75,7 +78,17 @@ uint32_t GetTimeoutValue(struct timeval _sour_time)
 
     return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+    struct timespec ts_end;
+    unsigned long ret = 0;
 
+    clock_gettime(CLOCK_MONOTONIC, &ts_end);
+
+    ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+    return ret;
+}
 int InitCanBus(void)
 {
     int s0, nbytes;
@@ -747,8 +760,8 @@ int main(int argc, char *argv[])
     uint32_t _timeBuf = 0;
     uint32_t chargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY] = {0};
     float maxVol, maxCur;
-    struct timeval _chk_ratingPower_timeout[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
-    struct timeval _chk_chademo_permission_timeout[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+    struct timespec _chk_ratingPower_timeout[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+    struct timespec _chk_chademo_permission_timeout[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
     time_t rtc = {0};
     struct ChargingInfoData *pDcChargingInfo = NULL;
     struct timeb waitChargingTime;
@@ -846,17 +859,17 @@ int main(int argc, char *argv[])
                     if (pSysInfo->PageIndex == _PAGE_PLUGIN) {
                         if (!chkChademoPermission[gunIndex]) {
                             chkChademoPermission[gunIndex] = true;
-                            gettimeofday(&_chk_chademo_permission_timeout[gunIndex], NULL);
+                            GetClockTime(&_chk_chademo_permission_timeout[gunIndex], NULL);
                             SendCommunicationOnly(gunIndex);
                         } else {
-                            _timeBuf = GetTimeoutValue(_chk_chademo_permission_timeout[gunIndex]);
+                            _timeBuf = GetClockTimeoutValue(_chk_chademo_permission_timeout[gunIndex]);
 
                             if (_timeBuf < 0) {
-                                gettimeofday(&_chk_chademo_permission_timeout[gunIndex], NULL);
+                                GetClockTime(&_chk_chademo_permission_timeout[gunIndex], NULL);
                             } else {
                                 if (_timeBuf / 1000 > 10000) {
                                     SendCommunicationOnly(gunIndex);
-                                    gettimeofday(&_chk_chademo_permission_timeout[gunIndex], NULL);
+                                    GetClockTime(&_chk_chademo_permission_timeout[gunIndex], NULL);
                                 }
                             }
                         }
@@ -997,7 +1010,7 @@ int main(int argc, char *argv[])
                     GetEvBatteryInfo(gunIndex, pDcChargingInfo->Evboard_id);
                 }
 
-                gettimeofday(&_chk_ratingPower_timeout[gunIndex], NULL);
+                GetClockTime(&_chk_ratingPower_timeout[gunIndex], NULL);
                 break;
 
             case S_PREPARING_FOR_EVSE:
@@ -1041,7 +1054,7 @@ int main(int argc, char *argv[])
                     //log_info("To EV_%d GFD = %d ",   _index,pDcChargingInfo->GroundFaultStatus);
                     //if(_chargingData[_index]->GroundFaultStatus != GFD_WAIT)
                     {
-                        //if ((GetTimeoutValue(_derating_time) / 1000) > 1000)
+                        //if ((GetClockTimeoutValue(_derating_time) / 1000) > 1000)
                         gfgResult = pDcChargingInfo->GroundFaultStatus;
 
                         // GB & Chademo ~ Warning 也先算 Pass,因為 CCS 認證會驗 Warning 故不可更動
@@ -1053,9 +1066,9 @@ int main(int argc, char *argv[])
                         }
 
                         if (gfgResult == GFD_WARNING || gfgResult == GFD_PASS) {
-                            if (((GetTimeoutValue(_chk_ratingPower_timeout[gunIndex]) / 1000) > 12000 &&
+                            if (((GetClockTimeoutValue(_chk_ratingPower_timeout[gunIndex]) / 1000) > 12000 &&
                                     pDcChargingInfo->RealRatingPower > 0) ||
-                                    (GetTimeoutValue(_chk_ratingPower_timeout[gunIndex]) / 1000) > 14000) {
+                                    (GetClockTimeoutValue(_chk_ratingPower_timeout[gunIndex]) / 1000) > 14000) {
                                 //log_info("**********EvComm : gunIndex= %d, RealRatingPower = %d ",
                                 //            gunIndex,pDcChargingInfo->RealRatingPower);
                                 //gfgResult = GFD_PASS;

+ 7 - 7
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/AcPlug.c

@@ -25,8 +25,8 @@ static struct OCPP16Data *ShmOCPP16Data = NULL;
 
 static int Uart5Fd = 0;
 
-static struct timeval  _ac_charging_comp;
-static struct timeval  _ac_preparing;
+static struct timespec  _ac_charging_comp;
+static struct timespec  _ac_preparing;
 static struct timeb    _ac_startChargingTime;
 static struct timeb    _ac_endChargingTime;
 
@@ -347,7 +347,7 @@ void AcPlugTask(int uartFD)
             if (pAcChargingInfo->SystemStatus == S_CHARGING) {
                 _status = S_TERMINATING;
             } else if (pAcChargingInfo->SystemStatus >= S_TERMINATING) {
-                if (GetTimeoutValue(_ac_charging_comp) >= 10000000 && acStatus.CpStatus == AC_SYS_A) {
+                if (GetClockTimeoutValue(_ac_charging_comp) >= 10000000 && acStatus.CpStatus == AC_SYS_A) {
                     _status = S_IDLE;
                 }
             } else {
@@ -357,7 +357,7 @@ void AcPlugTask(int uartFD)
                    pAcChargingInfo->SystemStatus < S_CHARGING) {
             if (acStatus.CpStatus == AC_SYS_C && acStatus.RelayStatus == YES) {
                 _status = S_CHARGING;
-            } else if (GetTimeoutValue(_ac_preparing) >= 30000000) {
+            } else if (GetClockTimeoutValue(_ac_preparing) >= 30000000) {
                 _status = S_IDLE;
             }
         } else if ((acStatus.CpStatus == AC_SYS_B || pAcChargingInfo->ConnectorPlugIn == AC_SYS_B) &&
@@ -414,7 +414,7 @@ void AcPlugTask(int uartFD)
                 if (pSysInfo->OrderCharging != NO_DEFINE) {
                     pSysInfo->OrderCharging = NO_DEFINE;
                 }
-                gettimeofday(&_ac_preparing, NULL);
+                GetClockTime(&_ac_preparing, NULL);
             }
 
             if (GetChargingEnergy() == PASS) {
@@ -464,7 +464,7 @@ void AcPlugTask(int uartFD)
         case S_TERMINATING: {
             if (isModeChange()) {
                 ChangeStartOrStopDateTime(NO);
-                gettimeofday(&_ac_charging_comp, NULL);
+                GetClockTime(&_ac_charging_comp, NULL);
             }
 
             SetLegacyReq(NO);
@@ -475,7 +475,7 @@ void AcPlugTask(int uartFD)
         break;
         case S_COMPLETE: {
             if (isModeChange()) {
-                gettimeofday(&_ac_charging_comp, NULL);
+                GetClockTime(&_ac_charging_comp, NULL);
                 ftime(&_ac_endChargingTime);
                 if (strcmp((char *)pAcChargingInfo->StartDateTime, "") != EQUAL) {
                     // AC 固定為第2把槍

+ 4 - 4
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/FanBoard.c

@@ -22,7 +22,7 @@ static struct FanModuleData *ShmFanModuleData = NULL;
 static struct PsuData *ShmPsuData = NULL;
 
 static int Uart5Fd = 0;
-static struct timeval gFanBoardRunTimer;
+static struct timespec gFanBoardRunTimer;
 
 static uint16_t _setFanSpeed = 0;
 static uint16_t fanSpeedSmoothValue = 1000;
@@ -224,12 +224,12 @@ static void fanBoardPorcess(void)
             pSysInfo->FanModuleFwRev[0] != '\0') {
         ShmFanModuleData->SelfTest_Comp = YES;
 
-        if (GetTimeoutValue(gFanBoardRunTimer) / 1000 >= 1000) {
+        if (GetClockTimeoutValue(gFanBoardRunTimer) / 1000 >= 1000) {
             //GetPsuTempForFanSpeed();
             GetFanSpeedByFunction();
             GetFanSpeed();
             pSysInfo->SystemFanRotaSpeed = _setFanSpeed;
-            gettimeofday(&gFanBoardRunTimer, NULL);
+            GetClockTime(&gFanBoardRunTimer, NULL);
 
             ShmFanModuleData->SetFan1Speed = ShmFanModuleData->TestFanSpeed;
             ShmFanModuleData->SetFan2Speed = ShmFanModuleData->TestFanSpeed;
@@ -252,7 +252,7 @@ static void fanBoardSelfTest(void)
     SetModelName_Fan();
     SetRtcData_Fan();
     sleep(1);
-    gettimeofday(&gFanBoardRunTimer, NULL);
+    GetClockTime(&gFanBoardRunTimer, NULL);
 }
 
 void FanBoardTask(int uartFD)

+ 5 - 5
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/LEDlight.c

@@ -27,7 +27,7 @@ static int Uart5Fd = 0;
 static Led_Color cur_led_color = {COLOR_MIN_LV};
 static Led_Color led_color;
 
-static struct timeval _led_priority_time;
+static struct timespec _led_priority_time;
 
 //------------------------------------------------------------------------------
 static bool IsNoneMatchLedColor(void)
@@ -244,7 +244,7 @@ static void LEDBoardProcess(void)
         return;
     }
 
-    if (GetTimeoutValue(_led_priority_time) / 1000 >= 1000) {
+    if (GetClockTimeoutValue(_led_priority_time) / 1000 >= 1000) {
 
         //if (pSysConfig->TotalConnectorCount == 1) {
         //    pDcChargingInfo0 = (struct ChargeingInfoData *)GetDcChargingInfoData(0);
@@ -255,7 +255,7 @@ static void LEDBoardProcess(void)
         //    SetLedColor(pDcChargingInfo0, pDcChargingInfo1);
         //}
         SetLedColor();
-        gettimeofday(&_led_priority_time, NULL);
+        GetClockTime(&_led_priority_time, NULL);
     }
 }
 
@@ -269,7 +269,7 @@ static void LEDBoardSelfTest(void)
 #if defined DD360Tcci ||defined DD360Audi
     GetFwAndHwVersion_Led();
     sleep(1);
-    gettimeofday(&_led_priority_time, NULL);
+    GetClockTime(&_led_priority_time, NULL);
 
     return;
 #endif //defined DD360Tcci || defined DD360Audi
@@ -278,7 +278,7 @@ static void LEDBoardSelfTest(void)
     if (pSysInfo->SelfTestSeq <= _STEST_PSU_CAP) {
         GetFwAndHwVersion_Led();
         sleep(1);
-        gettimeofday(&_led_priority_time, NULL);
+        GetClockTime(&_led_priority_time, NULL);
     } else {
         // 自檢階段沒有問到版號
         if (pAlarmCode->AlarmEvents.bits.LedboardStestFail == NO) {

+ 15 - 0
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.c

@@ -45,6 +45,21 @@ uint32_t GetTimeoutValue(struct timeval _sour_time)
 
     return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
+void GetClockTime(struct timespec* _now_time, void* null)
+{
+    clock_gettime(CLOCK_MONOTONIC, _now_time);
+}
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+    struct timespec ts_end;
+    unsigned long ret = 0;
+
+    clock_gettime(CLOCK_MONOTONIC, &ts_end);
+
+    ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+    return ret;
+}
 
 static int Init485ComPort(void)
 {

+ 2 - 1
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.h

@@ -105,6 +105,7 @@ typedef struct StPreCharginState {
 
 //------------------------------------------------------------------------------
 uint32_t GetTimeoutValue(struct timeval _sour_time);
+unsigned long GetClockTimeoutValue(struct timespec _start_time);
 int DiffTimeb(struct timeb ST, struct timeb ET);
-
+void GetClockTime(struct timespec* _now_time, void* null);
 #endif /* _MODULE_INTERNAL_COMM_H_ */

+ 25 - 25
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/RelayBoard.c

@@ -29,13 +29,13 @@ static struct FanModuleData *ShmFanModuleData = NULL;
 static Relay outputRelay = {0};
 static Relay regRelay = {0};
 static int Uart5Fd = 0;
-static struct timeval gFanBoardRunTimer;
+static struct timespec gFanBoardRunTimer;
 static uint16_t _setFanSpeed = 0;
 static uint16_t fanSpeedSmoothValue = 500;
 
 static Led_Color cur_led_color = {COLOR_MIN_LV};
 static Led_Color led_color;
-static struct timeval _led_priority_time;
+static struct timespec _led_priority_time;
 int ReservationLed;
 time_t ReservationFlashTimer;
 bool _show_GFD_Warming[2] = {TRUE};
@@ -46,26 +46,26 @@ bool _show_GFD_Warming[2] = {TRUE};
 //static struct timeval _checkOutputNoneMatchTimer[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
 
 static bool _isOvpChkTimeFlag[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY]; //DS60-120 add
-static struct timeval _checkOutputVolProtectTimer[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY]; //DS60-120 add
+static struct timespec _checkOutputVolProtectTimer[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY]; //DS60-120 add
 
 static void SetLedColor(void);
-static struct timeval _close_ac_contactor;
+static struct timespec _close_ac_contactor;
 
 //------------------------------------------------------------------------------
 static void RunForceStopProcess(void)
 {
     static bool isCriticalStop = NO;
-    static struct timeval  _psuCriticalStop;
+    static struct timespec  _psuCriticalStop;
     uint32_t _timebuf;
 
     if (isCriticalStop == NO) {
         isCriticalStop = YES;
-        gettimeofday(&_psuCriticalStop, NULL);
+        GetClockTime(&_psuCriticalStop, NULL);
     } else {
-        _timebuf = GetTimeoutValue(_psuCriticalStop);
+        _timebuf = GetClockTimeoutValue(_psuCriticalStop);
 
         if (_timebuf < 0) {
-            gettimeofday(&_psuCriticalStop, NULL);
+            GetClockTime(&_psuCriticalStop, NULL);
         } else {
             if (_timebuf / 1000 >= (FORCE_STOP_TIME * 1000)) {
                 isCriticalStop = NO;
@@ -85,21 +85,21 @@ static void StopCheckRelayInfo(uint8_t _chkIndex)
 static void StartCheckRelayInfo(uint8_t _chkIndex, uint8_t toState)
 {
     // SMR1 *2 + SMR2 * 2 + Parallel * 2
-    static struct timeval lastCheckRelayStateTimer[6] = {0};
+    static struct timespec lastCheckRelayStateTimer[6] = {0};
     //uint8_t *pCheckRelayState = (uint8_t *)ShmDcCommonData->CheckRelayStatus[_chkIndex];
 
     if (ShmDcCommonData->CheckRelayStatus[_chkIndex] == STOP) {
-        gettimeofday(&lastCheckRelayStateTimer[_chkIndex], NULL);
+        GetClockTime(&lastCheckRelayStateTimer[_chkIndex], NULL);
         ShmDcCommonData->CheckRelayStatus[_chkIndex] = START;
     } else {
-        if ((GetTimeoutValue(lastCheckRelayStateTimer[_chkIndex]) / 1000000) >= 1) {
+        if ((GetClockTimeoutValue(lastCheckRelayStateTimer[_chkIndex]) / 1000000) >= 1) {
             //log_info("relay welding or driving fault = %d ", _chkIndex);
             if (toState == 1) {
                 ShmDcCommonData->CheckRelayStatus[_chkIndex] = RELAY_STATUS_ERROR_DRIVING;
             } else {
                 ShmDcCommonData->CheckRelayStatus[_chkIndex] = RELAY_STATUS_ERROR_WELDING;
             }
-            gettimeofday(&lastCheckRelayStateTimer[_chkIndex], NULL);
+            GetClockTime(&lastCheckRelayStateTimer[_chkIndex], NULL);
         }
     }
 }
@@ -376,7 +376,7 @@ void CheckOutputPowerOverCarReq(uint8_t index)
         if (fireV >= (carV + (carV * 0.02))) {
             if (!_isOvpChkTimeFlag[index]) {
                 if ((pDcChargingInfo->PresentChargingVoltage * 10) >= VOUT_MIN_VOLTAGE * 10) {
-                    gettimeofday(&_checkOutputVolProtectTimer[index], NULL);
+                    GetClockTime(&_checkOutputVolProtectTimer[index], NULL);
                     _isOvpChkTimeFlag[index] = YES;
                 }
             } else {
@@ -387,7 +387,7 @@ void CheckOutputPowerOverCarReq(uint8_t index)
                 log_error("[Module_InternalComm]CheckOutputPowerOverCarReq NG : fire = %f, battery = %f ",
                           pDcChargingInfo->FireChargingVoltage,
                           (pDcChargingInfo->EvBatterytargetVoltage * 10));
-                if ((GetTimeoutValue(_checkOutputVolProtectTimer[index]) / 1000) >= OUTPUT_VOL_CHK_TIME) {
+                if ((GetClockTimeoutValue(_checkOutputVolProtectTimer[index]) / 1000) >= OUTPUT_VOL_CHK_TIME) {
                     if (pDcChargingInfo->Type == _Type_Chademo) {
                         //pAlarmCode->AlarmEvents.bits.SystemChademoOutputOVP = YES;
                         ShmDcCommonData->ConnectErrList[index].GunBits.ChaConnectOVP = YES;
@@ -480,9 +480,9 @@ void CheckAcInputOvpStatus(uint8_t index)
 //                ((pDcChargingInfo->PresentChargingVoltage * 10) > pDcChargingInfo->FireChargingVoltage + 300)) {
 //            if (!_isOutputNoneMatch[index]) {
 //                _isOutputNoneMatch[index] = YES;
-//                gettimeofday(&_checkOutputNoneMatchTimer[index], NULL);
+//                GetClockTime(&_checkOutputNoneMatchTimer[index], NULL);
 //            } else {
-//                if ((GetTimeoutValue(_checkOutputNoneMatchTimer[index]) / 1000) >= 5000) {
+//                if ((GetClockTimeoutValue(_checkOutputNoneMatchTimer[index]) / 1000) >= 5000) {
 //                    /*log_info("[Module_InternalComm]CheckOutputVolNoneMatchFire NG (%d) : pre = %f, fire = %f ",
 //                            index, (pDcChargingInfo->PresentChargingVoltage * 10), pDcChargingInfo->FireChargingVoltage);
 //                    log_error("[Module_InternalComm]CheckOutputVolNoneMatchFire NG (%d): pre = %f, fire = %f ",
@@ -1408,7 +1408,7 @@ static void fanBoardSelfTest(void)
     SetModelName_Fan();
     SetRtcData_Fan();
     sleep(1);
-    gettimeofday(&gFanBoardRunTimer, NULL);
+    GetClockTime(&gFanBoardRunTimer, NULL);
 }
 
 static void fanBoardPorcess(void)
@@ -1422,12 +1422,12 @@ static void fanBoardPorcess(void)
             pSysInfo->FanModuleFwRev[0] != '\0') {
         ShmFanModuleData->SelfTest_Comp = YES;
 
-        if (GetTimeoutValue(gFanBoardRunTimer) / 1000 >= 1000) {
+        if (GetClockTimeoutValue(gFanBoardRunTimer) / 1000 >= 1000) {
             //GetPsuTempForFanSpeed();
             //GetFanSpeedByFunction();
             GetFanSpeed();
             pSysInfo->SystemFanRotaSpeed = _setFanSpeed;
-            gettimeofday(&gFanBoardRunTimer, NULL);
+            GetClockTime(&gFanBoardRunTimer, NULL);
             /*
             ShmFanModuleData->SetFan1Speed = ShmFanModuleData->TestFanSpeed;
             ShmFanModuleData->SetFan2Speed = ShmFanModuleData->TestFanSpeed;
@@ -1625,7 +1625,7 @@ static void LEDBoardSelfTest(void)
 #if defined DD360Tcci ||defined DD360Audi || defined DD360UCar
     GetFwAndHwVersion_Led();
     sleep(1);
-    gettimeofday(&_led_priority_time, NULL);
+    GetClockTime(&_led_priority_time, NULL);
 
     return;
 #endif //defined DD360Tcci || defined DD360Audi
@@ -1634,7 +1634,7 @@ static void LEDBoardSelfTest(void)
     if (pSysInfo->SelfTestSeq <= _STEST_PSU_CAP) {
         GetFwAndHwVersion_Led();
         sleep(1);
-        gettimeofday(&_led_priority_time, NULL);
+        GetClockTime(&_led_priority_time, NULL);
     } else {
         // 自檢階段沒有問到版號
         if (pAlarmCode->AlarmEvents.bits.LedboardStestFail == NO) {
@@ -1652,7 +1652,7 @@ static void LEDBoardProcess(void)
         return;
     }
     pSysConfig->LedInfo.Intensity = LED_INTENSITY_BRIGHTEST;
-    if (GetTimeoutValue(_led_priority_time) / 1000 >= 500) {
+    if (GetClockTimeoutValue(_led_priority_time) / 1000 >= 500) {
         if (time((time_t*)NULL) - ReservationFlashTimer >= 3) {
             ReservationFlashTimer = time((time_t*)NULL);
             if (ReservationLed)
@@ -1661,7 +1661,7 @@ static void LEDBoardProcess(void)
                 ReservationLed = 1;
         }
         SetLedColor();
-        gettimeofday(&_led_priority_time, NULL);
+        GetClockTime(&_led_priority_time, NULL);
     }
 }
 
@@ -1829,11 +1829,11 @@ void RelayBoardTask(int uartFD)
                         outputRelay.relay_event.bits.AC_Contactor = YES;
                     } else {
                         if (!isStopChargingCount) {
-                            gettimeofday(&_close_ac_contactor, NULL);
+                            GetClockTime(&_close_ac_contactor, NULL);
                             isStopChargingCount = true;
                         } else {
                             if ((outputRelay.relay_event.bits.AC_Contactor == YES &&
-                                    GetTimeoutValue(_close_ac_contactor) / 1000 >= (TEN_MINUTES * 1000))) {
+                                    GetClockTimeoutValue(_close_ac_contactor) / 1000 >= (TEN_MINUTES * 1000))) {
                                 outputRelay.relay_event.bits.AC_Contactor = NO;
                             }
                         }

+ 58 - 27
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -86,7 +86,7 @@ void StartGunInfoTimeoutDet(uint8_t gunIndex, uint8_t flag)
 
     if (gunIndex < pSysConfig->TotalConnectorCount) {
         if (pDcChargingInfo->TimeoutFlag != flag) {
-            gettimeofday(&pDcChargingInfo->TimeoutTimer, NULL);
+            GetClockTime(&pDcChargingInfo->ConnectorTimeout, NULL);
         }
         pDcChargingInfo->TimeoutFlag = flag;
     }
@@ -363,8 +363,7 @@ void CheckReturnPress()
 	pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
 	//pDcChargingInfo->SystemStatus = S_IDLE;
     if (pSysInfo->SystemPage >= _PAGE_BILL && pSysInfo->SystemPage <= _PAGE_PLUGIN) {
-        if (pSysInfo->SystemPage != _PAGE_AUTHORIZE)
-            ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
+        ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
         log_info("Operate return to IDLE");
     }
     // Cancel Trade
@@ -430,14 +429,14 @@ void CheckStopConfirmPress()
 	pDcChargingInfo->SystemStatus = S_TERMINATING;
 	pSysInfo->SystemPage = _PAGE_PAYING;
 	is_stop = FALSE;
+    /*
 	//ShmDcCommonData->StopCharge[pSysInfo->CurGunSelected] = TRUE;
     if (ShmDcCommonData->is_AutoStart[pSysInfo->CurGunSelected] ||
         ShmDcCommonData->is_RemoteStart[pSysInfo->CurGunSelected]) {
         pSysInfo->SystemPage = _PAGE_COMPLETE;
         return;
     }
-	StartGunInfoTimeoutDet(pSysInfo->CurGunSelected,Timeout_FinalCost);
-
+    */
 }
 void CheckStopCancelPress()
 {
@@ -523,13 +522,15 @@ void CheckTouchPress(short id)
             // Show log
         	if(pSysInfo->CurGunSelected != LEFT_GUN_NUM) {
         		pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(LEFT_GUN_NUM);
+                /*
                 if (pDcChargingInfo->SystemStatus == S_RESERVATION) {
                     systemPageRestoreInit();
                     log_info("Can't select Reservation Gun");
                     break;
                 }
+                */
         		pSysInfo->CurGunSelected = LEFT_GUN_NUM;
-                if(pDcChargingInfo->SystemStatus == S_IDLE) {
+                if(pDcChargingInfo->SystemStatus == S_IDLE || pDcChargingInfo->SystemStatus == S_RESERVATION) {
                     systemPageRestoreInit();
                 }
 				log_info("LCM left Gun down...............................%x %x %x",
@@ -549,13 +550,15 @@ void CheckTouchPress(short id)
 			// Show log
 			if(pSysInfo->CurGunSelected != RIGHT_GUN_NUM) {
 				pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(RIGHT_GUN_NUM);
+                /*
                 if (pDcChargingInfo->SystemStatus == S_RESERVATION) {
                     systemPageRestoreInit();
                     log_info("Can't select Reservation Gun");
                     break;
                 }
+                */
 				pSysInfo->CurGunSelected = RIGHT_GUN_NUM;
-	            if(pDcChargingInfo->SystemStatus == S_IDLE) {
+                if (pDcChargingInfo->SystemStatus == S_IDLE || pDcChargingInfo->SystemStatus == S_RESERVATION) {
                     systemPageRestoreInit();
 	            }
 				log_info("LCM Right Gun down...............................%x %x %x",
@@ -844,6 +847,7 @@ unsigned long GetTimeoutValue(struct timeval _sour_time)
 
     return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
+
 void showGunWorkingType()
 {
     if (pSysInfo->CurGunSelected == LEFT_GUN_NUM) {
@@ -964,17 +968,31 @@ void ShowSelectGun()
         pDcChargingInfo->SystemStatus <= S_ALARM) ||
         pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST0 ||
         pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST1) {
-		if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
-				pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
-			ChangeDisplay2Value(_Icon_Select_Left,_TCC_ShowLeftGunCharging_CCS1);
+        // 使用中
+        if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunCharging_CCS1);
 
-		} else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
-				pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
-			ChangeDisplay2Value(_Icon_Select_Left,_TCC_ShowLeftGunCharging_CCS2);
+        } else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunCharging_CCS2);
 
-		} else if (pDcChargingInfo->Type == _Type_Chademo) {
-			ChangeDisplay2Value(_Icon_Select_Left,_TCC_ShowLeftGunCharging_CHAdeMo);
-		}
+        } else if (pDcChargingInfo->Type == _Type_Chademo) {
+            ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunCharging_CHAdeMo);
+        }
+    } else if (pDcChargingInfo->SystemStatus == S_RESERVATION) {
+            // 預約中
+            if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
+                pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
+                ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunReservation_CCS1);
+
+            } else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
+                pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
+                ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunReservation_CCS2);
+
+            } else if (pDcChargingInfo->Type == _Type_Chademo) {
+                ChangeDisplay2Value(_Icon_Select_Left, _TCC_ShowLeftGunReservation_CHAdeMo);
+            }
 	} else {
 		if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
 				pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
@@ -993,18 +1011,31 @@ void ShowSelectGun()
         pDcChargingInfo->SystemStatus <= S_ALARM) ||
         pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST0 ||
         pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST1) {
-		if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
-				pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
-			ChangeDisplay2Value(_Icon_Select_Right,_TCC_ShowRightGunCharging_CCS1);
+        if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunCharging_CCS1);
 
-		} else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
-				pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
-			ChangeDisplay2Value(_Icon_Select_Right,_TCC_ShowRightGunCharging_CCS2);
+        } else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunCharging_CCS2);
 
-		} else if (pDcChargingInfo->Type == _Type_Chademo) {
-			ChangeDisplay2Value(_Icon_Select_Right,_TCC_ShowRightGunCharging_CHAdeMo);
+        } else if (pDcChargingInfo->Type == _Type_Chademo) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunCharging_CHAdeMo);
 
-		}
+        }
+    } else if (pDcChargingInfo->SystemStatus == S_RESERVATION) {
+        if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunReservation_CCS1);
+
+        } else if (pDcChargingInfo->CCSGunType == _TYPE_CCS2_Liquid ||
+            pDcChargingInfo->CCSGunType == _TYPE_CCS2_Natural) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunReservation_CCS2);
+
+        } else if (pDcChargingInfo->Type == _Type_Chademo) {
+            ChangeDisplay2Value(_Icon_Select_Right, _TCC_ShowRightGunReservation_CHAdeMo);
+
+        }
 	} else {
 		if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
 				pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
@@ -1219,8 +1250,8 @@ void ShowLineRegisterCountDown()
     int _ten, _digits;
     pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(pSysInfo->CurGunSelected);
     if (pDcChargingInfo->TimeoutFlag == Timeout_LineReigster) {
-        _ten = (TCC_LINEREGISTER_TIMEOUT - (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL)) / 10;
-        _digits = (TCC_LINEREGISTER_TIMEOUT - (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL)) % 10;
+        _ten = (TCC_LINEREGISTER_TIMEOUT - (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL)) / 10;
+        _digits = (TCC_LINEREGISTER_TIMEOUT - (GetClockTimeoutValue(pDcChargingInfo->ConnectorTimeout) / uSEC_VAL)) % 10;
         ChangeDisplay2Value(_Icon_ScanCntDownTen, (short)_TCC_CntDownNumber0+_ten);
         ChangeDisplay2Value(_Icon_ScanCntDownDigits, (short)_TCC_CntDownNumber0+ _digits);
     } else {

+ 6 - 0
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.h

@@ -378,6 +378,12 @@ enum _TCC_ICON_LIST_ {
 	_TCC_IDLE_RIGHT_CCS1,
 	_TCC_IDLE_RIGHT_CCS2,
 	_TCC_IDLE_RIGHT_CHAdeMo,
+	_TCC_ShowLeftGunReservation_CCS1,
+	_TCC_ShowLeftGunReservation_CCS2,
+	_TCC_ShowLeftGunReservation_CHAdeMo,
+	_TCC_ShowRightGunReservation_CCS1,
+	_TCC_ShowRightGunReservation_CCS2,
+	_TCC_ShowRightGunReservation_CHAdeMo,
 };
 
 

+ 10 - 0
EVSE/Projects/DD360Tcci/Apps/ModulePrimary/Module_PrimaryComm.c

@@ -400,7 +400,17 @@ unsigned long GetTimeoutValue(struct timeval _sour_time)
 
     return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+    struct timespec ts_end;
+    unsigned long ret = 0;
+
+    clock_gettime(CLOCK_MONOTONIC, &ts_end);
 
+    ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+    return ret;
+}
 static bool IsPrimaryProcessNeedPause(void)
 {
     bool _pause = false;

+ 35 - 25
EVSE/Projects/DD360Tcci/Apps/ModulePsuComm/Module_PsuComm.c

@@ -39,8 +39,6 @@ int StoreLogMsg(const char *fmt, ...);
 #define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
 #define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
 
-unsigned long GetTimeoutValue(struct timeval _sour_time);
-
 unsigned long GetTimeoutValue(struct timeval _sour_time)
 {
 	struct timeval _end_time;
@@ -49,6 +47,18 @@ unsigned long GetTimeoutValue(struct timeval _sour_time)
 	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
 
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+	struct timespec ts_end;
+	unsigned long ret = 0;
+
+	clock_gettime(CLOCK_MONOTONIC, &ts_end);
+
+	ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+	return ret;
+}
+
 int StoreLogMsg(const char *fmt, ...)
 {
 	char Buf[4096+256];
@@ -1223,7 +1233,7 @@ void CheckSmartChargingStep(bool isWaitingAver, bool isCharging, bool canAverage
 			{
 				PRINTF_FUNC("=============Smart Charging : _REASSIGNED_ADJUST_A_TO_M============= Step 12 \n");
 				preChargingCur = preChargingTarget = 0;
-				gettimeofday(&_max_time, NULL);
+				GetClockTime(&_max_time, NULL);
 				ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_ADJUST_A_TO_M;
 			}
 			else
@@ -1315,7 +1325,7 @@ int main(void)
 			case INITIAL_START:
 			{
 				PRINTF_FUNC("== PSU == INITIAL_START \n");
-				gettimeofday(&_cmdSubPriority_time, NULL);
+				GetClockTime(&_cmdSubPriority_time, NULL);
 				sleep(5);
 				SwitchPower(SYSTEM_CMD, PSU_POWER_OFF);
 				SetWalkInConfig(SYSTEM_CMD, NO, 0);
@@ -1326,7 +1336,7 @@ int main(void)
 				break;
 			case GET_PSU_COUNT:
 			{
-				int time = GetTimeoutValue(_cmdSubPriority_time) / 1000;
+				int time = GetClockTimeoutValue(_cmdSubPriority_time) / 1000;
 				byte moduleCount = 0;
 
 				if (time > 2000)
@@ -1364,17 +1374,17 @@ int main(void)
 							ShmPsuData->Work_Step = _WORK_CHARGING;
 
 							//sdlu test
-							gettimeofday(&_test_time, NULL);
+							GetClockTime(&_test_time, NULL);
 						}
 					}
 
-					gettimeofday(&_cmdSubPriority_time, NULL);
+					GetClockTime(&_cmdSubPriority_time, NULL);
 				}
 			}
 				break;
 			case GET_SYS_CAP:
 			{
-				int time = GetTimeoutValue(_cmdSubPriority_time) / 1000;
+				int time = GetClockTimeoutValue(_cmdSubPriority_time) / 1000;
 
 				if (time > 1000)
 				{
@@ -1413,7 +1423,7 @@ int main(void)
 						ShmPsuData->Work_Step = BOOTING_COMPLETE;
 					}
 
-					gettimeofday(&_cmdSubPriority_time, NULL);
+					GetClockTime(&_cmdSubPriority_time, NULL);
 				}
 			}
 				break;
@@ -1435,7 +1445,7 @@ int main(void)
 				break;
 			case _WORK_CHARGING:
 			{
-				int time = GetTimeoutValue(_cmdSubPriority_time) / 1000;
+				int time = GetClockTimeoutValue(_cmdSubPriority_time) / 1000;
 
 				// 低 Priority 的指令
 				if (time > 1500)
@@ -1496,7 +1506,7 @@ int main(void)
 						}
 					}
 
-					gettimeofday(&_cmdSubPriority_time, NULL);
+					GetClockTime(&_cmdSubPriority_time, NULL);
 					CheckSmartChargingStep(isWaitingAver, isCharging, CanAverageCharging);
 				}
 
@@ -1576,7 +1586,7 @@ int main(void)
 										PRINTF_FUNC("Index = %d, newEvCurrent = %f \n", groupIndex, (chargingInfo[groupIndex]->EvBatterytargetCurrent * 10));
 										PRINTF_FUNC("=============Smart Charging : _REASSIGNED_ADJUST_M_TO_A============= Step 3 \n");
 										ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_ADJUST_M_TO_A;
-										gettimeofday(&_derating_time, NULL);
+										GetClockTime(&_derating_time, NULL);
 										deratingKeepCount = 0;
 									}
 									else
@@ -1639,9 +1649,9 @@ int main(void)
 								}
 								else
 								{
-									if ((GetTimeoutValue(_derating_time) / 1000) > 1000)
+									if ((GetClockTimeoutValue(_derating_time) / 1000) > 1000)
 									{
-										gettimeofday(&_derating_time, NULL);
+										GetClockTime(&_derating_time, NULL);
 									}
 								}
 							}
@@ -1670,7 +1680,7 @@ int main(void)
 
 										if (reassignIndex != ELEMENT_NOT_FIND)
 										{
-											if ((GetTimeoutValue(_derating_time) / 1000) <= 50 ||
+											if ((GetClockTimeoutValue(_derating_time) / 1000) <= 50 ||
 													chargingInfo[groupIndex]->MaxChargingToAverPassFlag == 0)
 											{
 												chargingInfo[groupIndex]->MaxChargingToAverPassFlag = 1;
@@ -1681,7 +1691,7 @@ int main(void)
 												PresentOutputVol(groupIndex, targetVol, (chargingInfo[groupIndex]->EvBatterytargetCurrent * 10));
 //											}
 //
-//											if ((GetTimeoutValue(_derating_time) / 1000) <= 50)
+//											if ((GetClockTimeoutValue(_derating_time) / 1000) <= 50)
 //											{
 												// 直接拉掉 B 模塊的電流
 												//PRINTF_FUNC("B : index = %d, cur = %d \n", reassignIndex, CHK_CUR_RANGE);
@@ -1801,9 +1811,9 @@ int main(void)
 								}
 								else
 								{
-									if ((GetTimeoutValue(_max_time) / 1000) > 500)
+									if ((GetClockTimeoutValue(_max_time) / 1000) > 500)
 									{
-										gettimeofday(&_max_time, NULL);
+										GetClockTime(&_max_time, NULL);
 									}
 								}
 							}
@@ -1829,9 +1839,9 @@ int main(void)
 								}
 								else
 								{
-									if ((GetTimeoutValue(_max_time) / 1000) > 500)
+									if ((GetClockTimeoutValue(_max_time) / 1000) > 500)
 									{
-										gettimeofday(&_max_time, NULL);
+										GetClockTime(&_max_time, NULL);
 									}
 								}
 							}
@@ -1849,7 +1859,7 @@ int main(void)
 												chargingInfo[subIndex]->SystemStatus == S_REASSIGN_CHECK)
 										{
 											reassignIndex = subIndex;
-//											if ((GetTimeoutValue(_max_time) / 1000) <= 50)
+//											if ((GetClockTimeoutValue(_max_time) / 1000) <= 50)
 //											{
 //												// 閒置模塊升壓,另對剛分配近來的模塊,預上升電流值 (preChargingCur)
 //												PresentOutputVol(subIndex,
@@ -1868,7 +1878,7 @@ int main(void)
 										{
 											//PRINTF_FUNC("CurOutputCurrent = %d \n", ShmPsuData->PsuGroup[subIndex].GroupPresentOutputCurrent - preChargingCur);
 											// 充電中的模塊維持輸出
-//											if ((GetTimeoutValue(_max_time) / 1000) <= 50)
+//											if ((GetClockTimeoutValue(_max_time) / 1000) <= 50)
 //											{
 //												PresentOutputVol(subIndex,
 //													chargingInfo[subIndex]->EvBatterytargetVoltage,
@@ -1886,7 +1896,7 @@ int main(void)
 
 									if (reassignIndex != ELEMENT_NOT_FIND)
 									{
-										if ((GetTimeoutValue(_max_time) / 1000) <= 50)
+										if ((GetClockTimeoutValue(_max_time) / 1000) <= 50)
 										{
 											//PRINTF_FUNC("set out (%d) value = %d******** 5 \n", reassignIndex, ZERO_CURRENT + preChargingTarget);
 											// 閒置模塊升壓,另對剛分配近來的模塊,預上升電流值 (preChargingCur)
@@ -2071,7 +2081,7 @@ int main(void)
 			case _TEST_MODE:
 			{
 				// 在測試模式中,保持與模塊的通訊
-				int time = GetTimeoutValue(_cmdSubPriority_time) / 1000;
+				int time = GetClockTimeoutValue(_cmdSubPriority_time) / 1000;
 
 				if (time > 1500)
 				{
@@ -2084,7 +2094,7 @@ int main(void)
 						GetModuleOutputF(index);
 					}
 
-					gettimeofday(&_cmdSubPriority_time, NULL);
+					GetClockTime(&_cmdSubPriority_time, NULL);
 				}
 
 				byte _switch = 0x00;

+ 4 - 4
EVSE/Projects/DD360Tcci/Apps/ModulePsuComm/Module_PsuComm.h

@@ -40,11 +40,11 @@ unsigned char _gunCount;
 struct ChargingInfoData *chargingInfo[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
 bool isStartOutputSwitch[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
 
-struct timeval _cmdSubPriority_time;
-struct timeval _derating_time;
-struct timeval _max_time;
+struct timespec _cmdSubPriority_time;
+struct timespec _derating_time;
+struct timespec _max_time;
 
-struct timeval _test_time;
+struct timespec _test_time;
 
 bool isCharging = false;
 bool isWaitingAver = false;

+ 17 - 4
EVSE/Projects/DD360Tcci/Apps/OutputTask.c

@@ -35,7 +35,10 @@ int InitComPort()
 
 	return fd;
 }
-
+void GetClockTime(struct timespec* _now_time, void* null)
+{
+	clock_gettime(CLOCK_MONOTONIC, _now_time);
+}
 unsigned long GetTimeoutValue(struct timeval _sour_time)
 {
 	struct timeval _end_time;
@@ -43,7 +46,17 @@ unsigned long GetTimeoutValue(struct timeval _sour_time)
 
 	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
 }
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+	struct timespec ts_end;
+	unsigned long ret = 0;
 
+	clock_gettime(CLOCK_MONOTONIC, &ts_end);
+
+	ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+	return ret;
+}
 void ShowMainMsg()
 {
 	printf("Max Vol : %f, Max Cur : %d, POW : %d \n", UnSafeDataInfo->PSU_VOLTAGE,
@@ -263,7 +276,7 @@ int main(void)
 	}
 
 	sleep(5);
-	gettimeofday(&_cmdSubPriority_time, NULL);
+	GetClockTime(&_cmdSubPriority_time, NULL);
 	VOLTAGE = 0.0;
 	CURRENT = 0.0;
 
@@ -289,7 +302,7 @@ int main(void)
 		// ¤Á´« Walk-in mode (default 5s -> 2s)
 		SetWalkInConfig(SYSTEM_CMD, NO, 0);
 
-		int time = GetTimeoutValue(_cmdSubPriority_time) / 1000;
+		int time = GetClockTimeoutValue(_cmdSubPriority_time) / 1000;
 		while(isGetCount == YES)
 		{
 			if (_charging_mode == CHARGING_MODE_START)
@@ -347,7 +360,7 @@ int main(void)
 			{
 				printf("Step 1 : GetModuleCount...... \n");
 				GetModuleCount(SYSTEM_CMD);
-				gettimeofday(&_cmdSubPriority_time, NULL);
+				GetClockTime(&_cmdSubPriority_time, NULL);
 			}
 		}
 		else if (time < 5000)

+ 1 - 1
EVSE/Projects/DD360Tcci/Apps/OutputTask.h

@@ -56,7 +56,7 @@ int Uart1Fd = -1;
 char *priPortName = "/dev/ttyS1";
 
 bool libInitialize = false;
-struct timeval _cmdSubPriority_time;
+struct timespec _cmdSubPriority_time;
 
 unsigned char Button1 = RELEASE;
 unsigned char Button2 = RELEASE;

+ 23 - 8
EVSE/Projects/DD360Tcci/Apps/ReadCmdline.c

@@ -65,7 +65,7 @@
 //------------------------------------------------------------------------------
 uint8_t _curAutoRunCount = 0;
 uint8_t _usingAutoRun = 0;
-struct timeval _autoTime;
+struct timespec _autoTime;
 
 static struct SysConfigData *pSysConfig = NULL;
 static struct SysInfoData *pSysInfo = NULL;
@@ -188,6 +188,21 @@ unsigned long GetTimeoutValue(struct timeval _sour_time)
     return (_end_time.tv_sec - _sour_time.tv_sec);
 }
 
+void GetClockTime(struct timespec* _now_time, void* null)
+{
+    clock_gettime(CLOCK_MONOTONIC, _now_time);
+}
+unsigned long GetClockTimeoutValue(struct timespec _start_time)
+{
+    struct timespec ts_end;
+    unsigned long ret = 0;
+
+    clock_gettime(CLOCK_MONOTONIC, &ts_end);
+
+    ret = ((unsigned long)(ts_end.tv_sec - _start_time.tv_sec) * 1000000) + ((unsigned long)((ts_end.tv_nsec / 1000) - (_start_time.tv_nsec / 1000)));
+
+    return ret;
+}
 void RunStatusProc(char *v1, char *v2)
 {
     printf("OrderCharging = %d \n", pSysInfo->OrderCharging);
@@ -937,7 +952,7 @@ void RunUnconditionalChargeIndex1(char *v1, char *v2, char *v3)
                     pDcChargingInfo->EvBatterytargetCurrent = _Current;
                 } else {
                     _curAutoRunCount = 0;
-                    gettimeofday(&_autoTime, NULL);
+                    GetClockTime(&_autoTime, NULL);
                 }
 
                 pDcChargingInfo->EvBatterySoc = 50;
@@ -947,19 +962,19 @@ void RunUnconditionalChargeIndex1(char *v1, char *v2, char *v3)
             }
 
             if (_usingAutoRun == 0x01) {
-                if (((GetTimeoutValue(_autoTime)) >= AUTORUN_STEP1_TIME_START * 60 &&
-                        (GetTimeoutValue(_autoTime)) <= AUTORUN_STEP1_TIME_END * 60) ||
-                        ((GetTimeoutValue(_autoTime)) >= AUTORUN_STEP2_TIME_START * 60 &&
-                         (GetTimeoutValue(_autoTime)) <= AUTORUN_STEP2_TIME_END * 60)
+                if (((GetClockTimeoutValue(_autoTime)) >= AUTORUN_STEP1_TIME_START * 60 &&
+                        (GetClockTimeoutValue(_autoTime)) <= AUTORUN_STEP1_TIME_END * 60) ||
+                        ((GetClockTimeoutValue(_autoTime)) >= AUTORUN_STEP2_TIME_START * 60 &&
+                         (GetClockTimeoutValue(_autoTime)) <= AUTORUN_STEP2_TIME_END * 60)
                    ) {
                     pDcChargingInfo->EvBatterytargetVoltage = _Voltage;
                     pDcChargingInfo->EvBatterytargetCurrent = _Current;
-                } else if ((GetTimeoutValue(_autoTime)) >= AUTORUN_END_TIME * 60) {
+                } else if ((GetClockTimeoutValue(_autoTime)) >= AUTORUN_END_TIME * 60) {
                     _curAutoRunCount++;
                     if (_curAutoRunCount >= AUTORUN_CYCLE_COUNT) {
                         pDcChargingInfo->SystemStatus = S_TERMINATING;
                     } else {
-                        gettimeofday(&_autoTime, NULL);
+                        GetClockTime(&_autoTime, NULL);
                     }
                 } else {
                     pDcChargingInfo->EvBatterytargetVoltage = 0;

BIN
EVSE/Projects/DD360Tcci/Apps/UnsafetyOutputTask


+ 4 - 3
EVSE/Projects/DD360Tcci/Apps/timeout.h

@@ -64,16 +64,17 @@ enum Timeout_flag {
     Timeout_isPlugout              = 27,
     Timeout_TradeCancel            = 28,
     Timeout_LINEPAYING             = 29,
+    Timeout_CompletPlugout         = 30,
 };
 
 //------------------------------------------------------------------------------
 // for timeout fork
-struct timeval _cmdSubPriority_time;
+struct timespec _cmdSubPriority_time;
 unsigned short _connectionTimeout;
 
 // for main
-struct timeval _cmdMainPriority_time;
-struct timeval _toAverage_time;
+struct timespec _cmdMainPriority_time;
+struct timespec _toAverage_time;
 //uint8_t _ocppProfileChkFlag;
 
 #endif /* TIMEOUT_H_ */

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


BIN
EVSE/Projects/DD360Tcci/output/Module_DoComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EvComm


BIN
EVSE/Projects/DD360Tcci/output/Module_InternalComm


BIN
EVSE/Projects/DD360Tcci/output/Module_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360Tcci/output/Module_UpdateFW


BIN
EVSE/Projects/DD360Tcci/output/ReadCmdline


BIN
EVSE/Projects/DD360Tcci/output/UnsafetyOutputTask


BIN
EVSE/Projects/DD360Tcci/output/main