Bläddra i källkod

2022-08-22 / Simon Xue

Action:
1. [Fix] Authorizing fail will not clear line status to backend.

Files
As the following commit history files

Image Version: V2.18.XX.XXXX.XX
Simon Xue 2 år sedan
förälder
incheckning
4df9caa63e

+ 4 - 4
EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c

@@ -591,19 +591,19 @@ void CreateRfidFork(void)
 
                         ShmDcCommonData->AuthPass_flag[sel_gun] = TRUE;
                         strncpy((char*)pSysConfig->UserId, (char*)ShmDcCommonData->TransactionInfo[sel_gun].pCreditCard.CardNo, 20);
-                        log_info("Authorize card:%s", pSysConfig->UserId);
+                        log_info("Gun%d Authorize card:%s", sel_gun, pSysConfig->UserId);
                         ShmDcCommonData->TransactionInfo[sel_gun].DeductResult = _DEDUCT_PREAUTH;
                         ShmDcCommonData->TransactionInfo[sel_gun].IsUpload = FALSE;
                         ShmDcCommonData->TransactionInfo[sel_gun].ConnectorID = ShmDcCommonData->ConnectorID[sel_gun];
-                        log_info("Line Status:%d", ShmDcCommonData->TransactionInfo[sel_gun].LineStatus);
+                        //log_info("Gun%d Line Status:%d", ShmDcCommonData->TransactionInfo[sel_gun].LineStatus);
                         InsertDeductInfo(ShmDcCommonData->ConnectorID[sel_gun], &ShmDcCommonData->TransactionInfo[sel_gun]);
-                        log_info("PreAuth OK");
+                        //log_info("Gun%d PreAuth OK",sel_gun);
                     } else if (result < 0) {
                         if (ShmDcCommonData->TradeCancel == FALSE && !checkRemoteStart(sel_gun))
                             pSysInfo->SystemPage = _PAGE_AUTHORIZE_FAIL;
                         ShmDcCommonData->AuthPass_flag[sel_gun] = FALSE;
                         memset(&ShmDcCommonData->TransactionInfo[sel_gun].pCreditCard, 0, sizeof(TransInfo));
-                        log_info("PreAuth Fail");
+                        log_info("Gun%d PreAuth Fail",sel_gun);
                     }
                     ShmDcCommonData->PreAuth_Config = _CREDITCARD_IDLE;
                 }

+ 3 - 2
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.17.00.0000.00"; // Phihong version
-char* DebugVersion = "V2.17.01";      // Software debug version
+char *fwVersion = "V2.18.00.0000.00"; // Phihong version
+char* DebugVersion = "V2.18.00";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -2582,6 +2582,7 @@ void CreateTimeoutFork(void)
                     StopSystemTimeoutDet();
                     systemPageRestoreInit();
                     setChargerMode(pSysInfo->CurGunSelected, S_IDLE);
+                    ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
                 }
                 break;
                 /*

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

@@ -2308,7 +2308,7 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
                     if (writeDispenserRequest(fd, gunID, plugNum) == PASS)
                     {
                         gConnectorActReq[plugNum].Value = 0;
-                        //log_info("Gun %d CHARGING_CANCEL OK", plugNum);
+                        log_info("Gun %d CHARGING_CANCEL OK", plugNum);
                         ShmDcCommonData->OperateIDLE[plugNum] = 0;
                         ShmDcCommonData->TransactionInfo[plugNum].LineStatus = _LINE_INIT;
                     }

+ 4 - 3
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -362,7 +362,8 @@ void CheckReturnPress()
 	int i;
 	pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
 	//pDcChargingInfo->SystemStatus = S_IDLE;
-    if (pSysInfo->SystemPage >= _PAGE_BILL && pSysInfo->SystemPage <= _PAGE_PLUGIN) {
+    if (pSysInfo->SystemPage >= _PAGE_BILL && pSysInfo->SystemPage <= _PAGE_PLUGIN ||
+        pSysInfo->SystemPage == _PAGE_AUTHORIZE_FAIL || pSysInfo->SystemPage == _PAGE_DONATE_RIGHT) {
         ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
         log_info("Operate return to IDLE");
     }
@@ -492,8 +493,8 @@ void CheckPayCreditCard()
         ShmDcCommonData->PreAuth_Config = _CREDITCARD_PREAUTH;
         ShmDcCommonData->PreAuth_Result = 0;
 		pSysInfo->SystemPage = _PAGE_AUTHORIZE;
-        log_info("Press Credit card pay status:%d Page:%d Config:%d", pDcChargingInfo->SystemStatus,
-            pSysInfo->SystemPage, ShmDcCommonData->PreAuth_Config);
+        //log_info("Press Credit card pay status:%d Page:%d Config:%d", pDcChargingInfo->SystemStatus,
+        //    pSysInfo->SystemPage, ShmDcCommonData->PreAuth_Config);
 	}
 }
 void CheckPayIcash()

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


BIN
EVSE/Projects/DD360Tcci/output/Module_DoComm


BIN
EVSE/Projects/DD360Tcci/output/Module_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/main