Browse Source

Merge remote-tracking branch 'origin/DD360Tcci'

Folus Wen 2 years ago
parent
commit
4e356ed015

+ 33 - 22
EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c

@@ -113,9 +113,11 @@ void showDeductInfo(RecordTransactionInfo* transactionInfo)
     char ApprovalNo[10];
     char vemdata[65];
     char cardno[21];
+    char sn[37];
     memset(ApprovalNo,'\0',sizeof(ApprovalNo));
     memset(vemdata,'\0',sizeof(vemdata));
     memset(cardno,'\0',sizeof(cardno));
+    memset(sn,'\0',sizeof(sn));
     memcpy(ApprovalNo,&transactionInfo->pCreditCard.ApprovalNo[0],9);
     memcpy(vemdata,&transactionInfo->pCreditCard.VemData[0],64);
     memcpy(cardno,&transactionInfo->pCreditCard.CardNo[0],20);
@@ -290,20 +292,25 @@ void ScannerCardProcess(int gunIndex)
 void storePayResult(uint8_t gunIndex)
 {
     memset(&LocalTransactionInfo, 0x00, sizeof(RecordTransactionInfo));
-    if (ShmDcCommonData->pGunInfo[gunIndex].ParkingStatus > _TCC_PARKING_NONE) {
-        memcpy(&LocalTransactionInfo, &ShmDcCommonData->ParkingInfo[gunIndex] ,sizeof(RecordTransactionInfo));
-    } else
-        memcpy(&LocalTransactionInfo, &ShmDcCommonData->TransactionInfo[gunIndex] ,sizeof(RecordTransactionInfo));
+
+    memcpy(&LocalTransactionInfo, &ShmDcCommonData->TransactionInfo[gunIndex] ,sizeof(RecordTransactionInfo));
 
 }
 void getPayResult(uint8_t gunIndex)
 {
+    memcpy(&ShmDcCommonData->TransactionInfo[gunIndex], &LocalTransactionInfo, sizeof(RecordTransactionInfo));
+}
+
+void storeParkingPayResult(uint8_t gunIndex)
+{
+    memset(&LocalTransactionInfo, 0x00, sizeof(RecordTransactionInfo));
+    memcpy(&LocalTransactionInfo, &ShmDcCommonData->ParkingInfo[gunIndex] ,sizeof(RecordTransactionInfo));
 
-    if (ShmDcCommonData->pGunInfo[gunIndex].ParkingStatus > _TCC_PARKING_NONE) {
-        memcpy(&ShmDcCommonData->ParkingInfo[gunIndex], &LocalTransactionInfo, sizeof(RecordTransactionInfo));
-    } else {
-        memcpy(&ShmDcCommonData->TransactionInfo[gunIndex], &LocalTransactionInfo, sizeof(RecordTransactionInfo));
-    }
+}
+void getParkingPayResult(uint8_t gunIndex)
+{
+    //memcpy(&ShmDcCommonData->ParkingInfo[gunIndex], &LocalTransactionInfo, sizeof(RecordTransactionInfo));
+    memcpy( ShmDcCommonData->ParkingInfo[gunIndex].OccupancySN, LocalTransactionInfo.OccupancySN, 36);
 }
 void WritePayResult(int result ,uint8_t gunIndex)
 {
@@ -366,16 +373,11 @@ int CreditCardCancelPreAuth(int fd, uint8_t gunIndex)
     }
     struct SysConfigData* pSysConfig = (struct SysConfigData*)GetShmSysConfigData();
     storePayResult(gunIndex);
-    if (ShmDcCommonData->pGunInfo[gunIndex].ParkingStatus)
-        ShmDcCommonData->PreAuth_Result = CreditCardPreAuthCancel(fd, LocalTransactionInfo.Amount, &pSysConfig->ModelName[0],
-        &LocalTransactionInfo.pCreditCard.ApprovalNo[0],
-        &LocalTransactionInfo.pCreditCard.CardNo[0],
-        &LocalTransactionInfo.pCreditCard.VemData[0]);
-    else
-        ShmDcCommonData->PreAuth_Result = CreditCardPreAuthCancel(fd, PREAUTHMONEY, &pSysConfig->ModelName[0],
-        &LocalTransactionInfo.pCreditCard.ApprovalNo[0],
-        &LocalTransactionInfo.pCreditCard.CardNo[0],
-        &LocalTransactionInfo.pCreditCard.VemData[0]);
+
+    ShmDcCommonData->PreAuth_Result = CreditCardPreAuthCancel(fd, PREAUTHMONEY, &pSysConfig->ModelName[0],
+                                    &LocalTransactionInfo.pCreditCard.ApprovalNo[0],
+                                    &LocalTransactionInfo.pCreditCard.CardNo[0],
+                                    &LocalTransactionInfo.pCreditCard.VemData[0]);
     //sleep(10);
     if (ShmDcCommonData->PreAuth_Result >= 0) {
         strcpy((char*)pSysConfig->UserId, "");
@@ -700,19 +702,22 @@ void CreateRfidFork(void)
             if (ShmDcCommonData->PreAuth_Config == _CREDITCARD_SALE /*&& ShmDcCommonData->pGunInfo[pSysInfo->CurGunSelected].isParking*/) {
                 sel_gun = pSysInfo->CurGunSelected;
                 ShmDcCommonData->PreAuth_Result = 0;
+                storeParkingPayResult(sel_gun);
+                
                 ShmDcCommonData->PreAuth_Result = CreditCardSale(fd,(int)ShmDcCommonData->ParkingInfo[sel_gun].Amount,
                                                 &pSysConfig->ModelName[0],
                                                 &ShmDcCommonData->ParkingInfo[sel_gun].pCreditCard);
                 StopSystemTimeoutDet(); //Timeout_ScanCard
+                getParkingPayResult(sel_gun);
                 if (ShmDcCommonData->PreAuth_Result > 0 ) {
-                    log_info("Gun%d Parking Fee PreAuthComplete Success",sel_gun);
+                    log_info("Gun%d Parking Fee Sale Success",sel_gun);
                     pSysInfo->SystemPage = _PAGE_PLUGIN;
                     ShmDcCommonData->ParkingInfo[sel_gun].IsUpload = FALSE;
                     //ShmDcCommonData->pGunInfo[sel_gun].GetParkingBill = FALSE;
                     ShmDcCommonData->ParkingInfo[sel_gun].DeductResult = _DEDUCT_SALE_PASS;
                     InsertParkingDeductInfo(ShmDcCommonData->ConnectorID[sel_gun], &ShmDcCommonData->ParkingInfo[sel_gun]);
                 } else {
-                    log_info("Gun%d Parking Fee PreAuthComplete Fail",sel_gun);
+                    log_info("Gun%d Parking Fee Sale Fail",sel_gun);
                     if (!ShmDcCommonData->TradeCancel) {
                         pSysInfo->SystemPage = _PAGE_AUTHORIZE_FAIL;
                     }
@@ -725,7 +730,13 @@ void CreateRfidFork(void)
             } else if (ShmDcCommonData->PreAuth_Config == _CREDITCARD_PREAUTH ) {
                 // 預授權
                 sel_gun = pSysInfo->CurGunSelected;
-                PreAuthCreditCard(fd,sel_gun);
+                if (ShmDcCommonData->pGunInfo[sel_gun].isParking) {
+                    log_info("In Parking Status can't enable PreAuth function");
+                    pSysInfo->SystemPage = _PAGE_AUTHORIZE_FAIL;
+                    ShmDcCommonData->AuthPass_flag[gunIndex] = FALSE;
+                    ShmDcCommonData->PreAuth_Config = _CREDITCARD_IDLE;
+                } else
+                    PreAuthCreditCard(fd,sel_gun);
                 // 佔位費預授權並扣款
                 /*
                 if (ShmDcCommonData->PreAuth_Result > 0 ) {

+ 5 - 4
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.20.00.0000.00"; // Phihong version
-char* DebugVersion = "V2.20.03";      // Software debug version
+char *fwVersion = "V2.22.00.0000.00"; // Phihong version
+char* DebugVersion = "V2.22.00";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -2664,7 +2664,6 @@ void CreateTimeoutFork(void)
                     systemPageRestoreInit();
                     ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
                     ShmDcCommonData->pGunInfo[pSysInfo->CurGunSelected].GetParkingBill = FALSE;
-
                 }
                 break;
             case Timeout_LINEPAYING:
@@ -3068,6 +3067,7 @@ void OcppRemoteStartChk()
                 !isDetectPlugin(_index)) {
                 if (pDcChargingInfo->SystemStatus == S_IDLE ||
                     pDcChargingInfo->SystemStatus == S_RESERVATION) {
+
                     pDcChargingInfo->RemoteStartFlag = YES;
                     ShmDcCommonData->is_RemoteStart[_index] = TRUE;
                     //pSysInfo->OrderCharging = YES;
@@ -4104,10 +4104,10 @@ void ParkingProcess(int gunIndex)
         pSysInfo->SystemPage != _PAGE_COMPLETE &&
         pSysInfo->SystemPage != _PAGE_PAYFAIL &&
         pSysInfo->SystemPage != _PAGE_PLUGOUT &&
+        pSysInfo->SystemPage != _PAGE_SENSING &&
         pSysInfo->SystemPage != _PAGE_PLUGIN) {
         pSysInfo->SystemPage = _PAGE_PAYING;
         StartGunInfoTimeoutDet(gunIndex, Timeout_WaitParkingInfo);
-
         return;
     }
     if (ShmDcCommonData->pGunInfo[gunIndex].GetParkingBill && pSysInfo->SystemPage == _PAGE_PAYING) {
@@ -4516,6 +4516,7 @@ CheckStatus:
                     log_info("============================= S_AUTHORIZING(%x) ============================= ", gunIndex);
                     StartGunInfoTimeoutDet(gunIndex, Timeout_AuthorizingForStop);
                 }
+
                 if (pSysInfo->CurGunSelected == gunIndex)
                     ScannerCardProcess(gunIndex);
 

+ 29 - 21
EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.c

@@ -487,11 +487,11 @@ static int qrCodeUrlInfoHandle(uint8_t *data)
                       tm->tm_mday,
                       tm->tm_hour,
                       tm->tm_min);
-
+    memset(pSysConfig->SystemId, '\0', sizeof(pSysConfig->SystemId));
+    string2ByteArray((char *)data, (uint8_t *)pSysConfig->SystemId);
+    //log_info("Data = %s SystemId = %s",data, pSysConfig->SystemId);
     //copy QR code string
     if (strncmp((char *)localTime, (char *)&data[0], timeLen - 2) != 0) {
-        memset(pSysConfig->SystemId, '\0', sizeof(pSysConfig->SystemId));
-
         // 充電槍IDLE時才更新系統時間
         for (int i = 0; i < pSysConfig->TotalConnectorCount; i++) {
             pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(i);
@@ -499,9 +499,8 @@ static int qrCodeUrlInfoHandle(uint8_t *data)
                 is_idle = FALSE;
         }
 
-        string2ByteArray((char *)data, (uint8_t *)pSysConfig->SystemId);
         string2Date((char*)data, (uint8_t*)_setTime);
-        //printf("SystemId =  %s", pSysConfig->SystemId);
+        //printf("SystemId = %s", pSysConfig->SystemId);
         if (!timecmp(localTime, _setTime) && is_idle) {
             //log_info("Set Timer:%s", _setTime);
             sprintf((char*)cmdBuf, "date -u -s \"%s\" >> /dev/null &", _setTime);
@@ -741,11 +740,15 @@ static int miscCommandHandle(uint8_t dataLen, uint8_t plugNum, uint8_t *data)
 
             //pSysInfo->CurGunSelected = (plugNum);
             //pSysInfo->CurGunSelectedByAc = NO_DEFINE;
-
+            if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus) {
+                log_info("Gun%d is in the Parking status can't access Remote Start",plugNum);
+                break;
+            }
             setConfirmSelGun(plugNum);
 
             ShmOCPP16Data->CsMsg.bits[plugNum].RemoteStartTransactionReq = YES;
             ShmSelectGunInfo->PricesInfo[plugNum].Balance = 0.00;
+
             clearMiscCommand();
             break;
 
@@ -945,12 +948,12 @@ static int chargingbillHandle(uint8_t* data, uint8_t gunIndex)
     ShmDcCommonData->PriceBill.ParkingFee = transPricesUnit(ntohl(pBillInfo->ParkingFee));
     pBillInfo->RemainAmount = ntohl(pBillInfo->RemainAmount);
     memcpy((char*)&ShmDcCommonData->PriceBill.RemainAmount, (char*)&pBillInfo->RemainAmount, sizeof(uint32_t));
-    log_info("\t ******* TxId %d Charging Bill *******\n", ShmDcCommonData->PriceBill.TransactionId);
-    log_info("\t Total Cost = %.2f\n", ShmDcCommonData->PriceBill.TotalCost);
-    log_info("\t Discount = %.2f\n", ShmDcCommonData->PriceBill.Discount);
-    log_info("\t EnergyCost = %.2f\n", ShmDcCommonData->PriceBill.EnergyCost);
-    log_info("\t ParkingFee = %.2f\n", ShmDcCommonData->PriceBill.ParkingFee);
-    log_info("\t RemainAmount = %.2f\n", ShmDcCommonData->PriceBill.RemainAmount);
+    log_info("\t ******* TxId %d Charging Bill *******", ShmDcCommonData->PriceBill.TransactionId);
+    log_info("\t Total Cost = %.2f", ShmDcCommonData->PriceBill.TotalCost);
+    log_info("\t Discount = %.2f", ShmDcCommonData->PriceBill.Discount);
+    log_info("\t EnergyCost = %.2f", ShmDcCommonData->PriceBill.EnergyCost);
+    log_info("\t ParkingFee = %.2f", ShmDcCommonData->PriceBill.ParkingFee);
+    log_info("\t RemainAmount = %.2f", ShmDcCommonData->PriceBill.RemainAmount);
     if (ShmDcCommonData->PriceBill.TransactionId != ShmDcCommonData->TransactionInfo[gunIndex].TransactionId)
         UpdateRedeuctBill(ShmDcCommonData->PriceBill.TransactionId, ShmDcCommonData->PriceBill.TotalCost);
 }
@@ -1556,10 +1559,13 @@ static int responsePackeHandle(int fd, uint8_t *pResult, uint8_t plugNum, uint8_
             memcpy(ShmDcCommonData->ParkingInfo[plugNum].OccupancySN,&pCsuResult->Data.Data[1],36);
         }
         if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus != pCsuResult->Data.Data[0]) {
-            if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus)
-                ShmDcCommonData->pGunInfo[plugNum].isParking = TRUE;
             ShmDcCommonData->pGunInfo[plugNum].ParkingStatus = pCsuResult->Data.Data[0];
-            log_info("Gun%d Parking STATUS is [%d] SN:[%s]",plugNum,pCsuResult->Data.Data[0],cmd);
+            if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus == _TCC_PARKING_NONE )
+                ShmDcCommonData->pGunInfo[plugNum].isParking = FALSE;
+            else {
+                ShmDcCommonData->pGunInfo[plugNum].isParking = TRUE;
+            }
+            log_info("Gun%d Parking STATUS is [%d] SN:[%s] isParking:[%s]",plugNum,pCsuResult->Data.Data[0],cmd,(ShmDcCommonData->pGunInfo[plugNum].isParking ? "ON":"OFF"));
             if (!ShmDcCommonData->pGunInfo[plugNum].ParkingStatus) {
                 //if (pSysInfo->CurGunSelected == plugNum)
                 //    systemPageRestoreInit();
@@ -2483,7 +2489,7 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
 					log_info("Gun %d get final cost %f", plugNum, ShmDcCommonData->TransactionInfo[plugNum].Amount);
                     if (ShmDcCommonData->is_AutoStart[plugNum] || ShmDcCommonData->is_RemoteStart[plugNum]) {
                         ShmDcCommonData->PayPass_flag[plugNum] = TRUE;
-                        if (pSysInfo->CurGunSelected == plugNum && !ShmDcCommonData->pGunInfo[plugNum].isParking)
+                        if (pSysInfo->CurGunSelected == plugNum )
                             pSysInfo->SystemPage = _PAGE_COMPLETE;
                     } else {
                         UpdateDeductInfoStatus(plugNum, &ShmDcCommonData->TransactionInfo[plugNum]);
@@ -2537,14 +2543,15 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
             curReg = REG_PARKING_BILL;
             break;
         case REG_PARKING_BILL:
-            if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus == _TCC_WAIT_PAY && ShmDcCommonData->pGunInfo[plugNum].GetParkingBill == FALSE) {
+            if (ShmDcCommonData->pGunInfo[plugNum].ParkingStatus == _TCC_WAIT_PAY && ShmDcCommonData->pGunInfo[plugNum].GetParkingBill == FALSE &&
+                pSysInfo->SystemPage == _PAGE_PAYING) {
                 if (DiffTimeb(gRegTimeUp[plugNum][curReg], NowTime) > LOOP_RETRY_TIME ||
                     DiffTimeb(gRegTimeUp[plugNum][curReg], NowTime) < 0) {
                     //log_info("Ask Parking Bill ");
                     if (readParkingBill(fd, gunID) == PASS)
                     {
                         ShmDcCommonData->pGunInfo[plugNum].GetParkingBill = TRUE;
-                        if (pSysInfo->CurGunSelected == plugNum && pSysInfo->SystemPage == _PAGE_PAYING &&
+                        if (pSysInfo->CurGunSelected == plugNum &&
                              ShmDcCommonData->pGunInfo[plugNum].ReqParkingBill)
                             pSysInfo->SystemPage = _PAGE_BILL;
                     }
@@ -2554,14 +2561,14 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
             curReg = REG_QRCODE_URL_INFO;
             break;
         case REG_QRCODE_URL_INFO:
-            if (gunID == 1) {
+            //if (gunID == 1) {
                 if (DiffTimeb(gRegTimeUp[plugNum][curReg], NowTime) > (LOOP_RETRY_TIME * 10) ||
                     DiffTimeb(gRegTimeUp[plugNum][curReg], NowTime) < 0
                     ) {
                     readQRcodeURLAndSystemDate(fd);
                     ftime(&gRegTimeUp[plugNum][curReg]);
                 }
-            }
+            //}
 
             //check misc command from power cabinet
             if (gDoCommGblData.MiscCmd != 0) {
@@ -3108,7 +3115,8 @@ void CreditCardProcess(int fd,int plugNum,int gunID,bool isPark, RecordTransacti
     struct timeb AuthNowTime = {0};
     //佔位費處理
     if (isPark) {
-        if (pInfo->IsUpload == TRUE || (strcmp((char*)pInfo->pCreditCard.ApprovalNo,"") == 0))
+        if (pInfo->IsUpload == TRUE || (strcmp((char*)pInfo->pCreditCard.ApprovalNo,"") == 0) ||
+            pInfo->DeductResult != _TCC_ONLINEPAY_PASS)
             return;
         ftime(&AuthNowTime);
         if (DiffTimeb(gRegTimeUp[plugNum][REG_DEDUCT_INFO], AuthNowTime) > LOOP_RETRY_TIME * 5 ||

+ 14 - 5
EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -36,7 +36,7 @@ uint8_t ptemp_2 = 0;
 bool firstcircule = true;
 float EvTargetVolt[2] = { 0 };
 float EvTargetCur[2] = { 0 };
-
+unsigned char GunStatus[2] = {0};
 //------------------------------------------------------------------------------
 extern bool AbnormalStopAnalysis(uint8_t gun_index, uint8_t *errCode);
 
@@ -491,9 +491,9 @@ void CANReceiver(int fd)
                 break;
 
             case ACK_GET_OUTPUT_REQ:
-                //DS60-120 add
                 if ((pDcChargingInfo->SystemStatus >= S_PREPARING_FOR_EV &&
-                        pDcChargingInfo->SystemStatus <= S_CHARGING) ||
+                        pDcChargingInfo->SystemStatus <= S_TERMINATING) ||
+                        pDcChargingInfo->SystemStatus == S_ALARM ||
                         (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
                          pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)
                    ) {
@@ -502,9 +502,18 @@ void CANReceiver(int fd)
                         pDcChargingInfo->EvBatteryStartSoc = frame.data[1];
                     }
 
-                    if (frame.data[1] > pDcChargingInfo->EvBatterySoc) {
+                    // 進入充電時重新更新電池電量
+                    if (GunStatus[targetGun] != pDcChargingInfo->SystemStatus && pDcChargingInfo->SystemStatus == S_CHARGING) {
+
+                        log_info("Reset Gun%d SoC:%d", targetGun, frame.data[1]);
+                        pDcChargingInfo->EvBatterySoc = frame.data[1];
+                        GunStatus[targetGun] = pDcChargingInfo->SystemStatus;
+                    }
+
+                    if (frame.data[1] > pDcChargingInfo->EvBatterySoc || pDcChargingInfo->SystemStatus == S_CHARGING) {
                         pDcChargingInfo->EvBatterySoc = frame.data[1];
-                        log_info("Gun%d SOC:%d", targetGun,pDcChargingInfo->EvBatterySoc);
+                        if (frame.data[1] > pDcChargingInfo->EvBatterySoc)
+                            log_info("Gun%d SOC:%d", targetGun,pDcChargingInfo->EvBatterySoc);
                     }
                 }
                 //pDcChargingInfo->EvBatterySoc = frame.data[1]; //DS60-120 remove

+ 5 - 6
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -386,21 +386,20 @@ void CheckReturnPress()
     // Cancel Trade
     if (ShmDcCommonData->pGunInfo[pSysInfo->CurGunSelected].ParkingStatus) {
         ShmDcCommonData->pGunInfo[pSysInfo->CurGunSelected].GetParkingBill = FALSE;
-        if (pSysInfo->SystemPage == _PAGE_AUTHORIZE) {
+        //if (pSysInfo->SystemPage == _PAGE_AUTHORIZE) {
             log_info("Press Return button Cancel Sale");
             ShmDcCommonData->TradeCancel = TRUE;
             pSysInfo->SystemPage = _PAGE_SENSING;
             StopGunInfoTimeoutDet(pSysInfo->CurGunSelected);
             StartSystemTimeoutDet(Timeout_TradeCancel);
-            for (i = 0; i <= 30; i++) {
-            if (ShmDcCommonData->PreAuth_Config == _CREDITCARD_IDLE)
+            for (i = 0; i <= 60; i++) {
+            if (ShmDcCommonData->pGunInfo[pSysInfo->CurGunSelected].ParkingStatus == _TCC_PARKING_OCCUPENCY_Ready)
                 break;
                 sleep(1);
             }
-            ShmDcCommonData->PreAuth_Result = 0;
-        }
+        //}
+        ShmDcCommonData->TradeCancel = FALSE;
         StopSystemTimeoutDet();
-        ShmDcCommonData->PreAuth_Result = 0;
         systemPageRestoreInit();
         return;
     } else if ( pDcChargingInfo->SystemStatus == S_AUTHORIZING || 

+ 1 - 1
EVSE/Projects/DD360Tcci/Apps/ModulePrimary/Module_PrimaryComm.c

@@ -216,7 +216,7 @@ static void checkChillerStatus(Gpio_out *gpio)
         pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
         pChillerInfo = (ChillerInfo *)&fChillerInfo[gunIndex];
 
-        if((pDcChargingInfo->SystemStatus > S_IDLE && pDcChargingInfo->SystemStatus < S_TERMINATING) ||
+        if((pDcChargingInfo->SystemStatus > S_AUTHORIZING && pDcChargingInfo->SystemStatus < S_TERMINATING) ||
             (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 && pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)) {
             pChillerInfo->ChillerSwitch = YES;
             pChillerInfo->ChillerOnTime = time((time_t *)NULL);

+ 2 - 2
EVSE/Projects/DD360Tcci/Apps/ModuleUpdateFW/Module_UpdateFW.c

@@ -232,7 +232,7 @@ unsigned long long getAvailableMemory()
     sleep(1);
     long pages = sysconf(_SC_AVPHYS_PAGES);
     long page_size = sysconf(_SC_PAGE_SIZE);
-    log_info("Avaiable Memory size:%.1f MB",pages*page_size/(1024*1024));
+    log_info("Avaiable Memory size:%d MB",pages*page_size/(1024*1024));
     return pages * page_size;
 }
 
@@ -482,7 +482,7 @@ static int CheckUpdateProcess(void)
 
         }
     }
-    free(dir);
+    //free(dir);
     closedir(d);
 
     if (retFail != 0) {

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_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360Tcci/output/Module_UpdateFW


BIN
EVSE/Projects/DD360Tcci/output/main