Эх сурвалжийг харах

2022-02-11 / Simon Xue

Action
1. Release to TCC DAKA

Files
As the commit history files

Image Version: V2.01.XX.XXXX.XX
Simon Xue 3 жил өмнө
parent
commit
3d3e6178a9

+ 20 - 39
EVSE/Projects/DD360Tcci/Apps/CSU/Ethernet.c

@@ -19,7 +19,7 @@ static struct SysInfoData *pSysInfo 			= NULL;
 bool isDeductDb_ready;
 //------------------------------------------------------------------------------
 static char *rfidPortName = "/dev/ttyS2";
-int fd = -1;
+
 static bool isCardScan = false;
 
 //------------------------------------------------------------------------------
@@ -278,27 +278,24 @@ void AuthorizeToCharge()
     if(isAuthorizedComplete())
     {
        // StopSystemTimeoutDet();
-      //  StartSystemTimeoutDet(Timeout_WaitBalance);
-       // if (ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance != FAIL_BALANCE_PRICES)
-        {
-       //     StopSystemTimeoutDet();
+        StartSystemTimeoutDet(Timeout_WaitBalance);
+        if (ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance != FAIL_BALANCE_PRICES) {
+            StopSystemTimeoutDet();
             // 判斷後台回覆狀態
             if (canStartCharging()) {
             // LCM => Authorize complete
             	//pDcChargingInfo->SystemStatus = S_AUTHORIZING;
                 //pSysInfo->SystemPage = _PAGE_PLUGIN;
                 //log_info("Wait Gun(%d) plugin",pSysInfo->CurGunSelected);
-            	if (ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] == TRUE) {
-					DetectPluginStart();
-					pSysInfo->SystemPage = _PAGE_PLUGIN;
-					log_info("Authorize Complete can plugin gun");
-            	}
+                DetectPluginStart();
+                if (ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] == TRUE)
+                	pSysInfo->SystemPage = _PAGE_PLUGIN;
                 //log_info("Gun(%d) Balance: %f",pSysInfo->CurGunSelected,
                 //        ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance);
             } else {
-                //log_info("LCM => Authorize fail");
+                log_info("LCM => Authorize fail");
                 //pSysInfo->SystemPage = _PAGE_AUTHORIZE_FAIL;
-                //strcpy((char *)pSysConfig->UserId, "");
+                strcpy((char *)pSysConfig->UserId, "");
             }
         }
         ClearAuthorizedFlag();
@@ -353,6 +350,7 @@ void PreAuthCompleteToCardReader(int fd,uint8_t gunIndex)
 	result = CreditCardPreAuthComplete(fd,(int)ShmDcCommonData->finalcost[pSysInfo->CurGunSelected] ,"TCC Test",
 											&ShmDcCommonData->pCreditCard[gunIndex].VemData[0],
 											&ShmDcCommonData->pCreditCard[gunIndex]);
+
 	//result = 1;
 	if (result > 0 ) {
 		log_info("Credit Card Spend Money:%.1f",ShmDcCommonData->finalcost[gunIndex]);
@@ -406,7 +404,7 @@ void CreateRfidFork(void)
         struct timeb SeqEndTime;
         struct tm *tm;
         pSysInfo = (struct SysInfoData *)GetShmSysInfoData();
-
+        int fd = -1;
         int isContinue = 1;
         RFID rfid = {0};
         RecordTransactionInfo deduct;
@@ -483,20 +481,15 @@ void CreateRfidFork(void)
 					is_idle = TRUE;
 				}
 
-				if (ShmDcCommonData->finalcost_flag[gunIndex]) {
-					StopGunInfoTimeoutDet(gunIndex); //Timeout_FinalCost
-					pSysInfo->SystemPage = _PAGE_PAYING;
-					if (ShmDcCommonData->finalcost[gunIndex] < 1) {
-						ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
-						pSysInfo->SystemPage = _PAGE_COMPLETE;
+				if (ShmDcCommonData->StopCharge[gunIndex] == TRUE && ShmDcCommonData->finalcost_flag[gunIndex]) {
+					if (ShmDcCommonData->finalcost[gunIndex] <= 0) {
+
 					} else {
 						ShmDcCommonData->StopCharge[gunIndex] = FALSE;
-
+						StopGunInfoTimeoutDet(gunIndex); //Timeout_FinalCost
 						PreAuthCompleteToCardReader(fd,gunIndex);
 						ShmDcCommonData->PayFinish[gunIndex] = TRUE;
 					}
-					ShmDcCommonData->finalcost_flag[gunIndex] = FALSE;
-
 				}
 			} // for
 			if (is_idle == TRUE && tm->tm_min%15 == 0 &&
@@ -507,7 +500,7 @@ void CreateRfidFork(void)
 					result = CreditCardPreAuthComplete(fd,(int)ShmDcCommonData->ReAuthComplete.Amount ,"TCC Test",
 															&ShmDcCommonData->ReAuthComplete.VemData[0],
 															&ShmDcCommonData->pCreditCard[0]);
-					sleep(10);
+                    sleep(10);
 					if (result > 0) {
 						ShmDcCommonData->ReAuthComplete.DeductResult = YES;
 						ShmDcCommonData->ReAuthComplete.IsUpload = NO;
@@ -524,37 +517,25 @@ void CreateRfidFork(void)
 				}
 			}
             if(ShmDcCommonData->PreAuth_Config == _CREDITCARD_CANCEL) {
-
-        		log_info("PreAuth Cancel ApprovalNo:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].ApprovalNo[0]);
-        		log_info("PreAuth Cancel CardNo:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].CardNo[0]);
-        		log_info("PreAuth Cancel VemData:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].VemData[0]);
-
             	ShmDcCommonData->PreAuth_Result = CreditCardPreAuthCancel(fd,PREAUTHMONEY,"TCC Test",
 					&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].ApprovalNo[0],
 					&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].CardNo[0],
 					&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].VemData[0]);
-            	sleep(10);
+                sleep(10);
 				if (ShmDcCommonData->PreAuth_Result > 0 ) {
 					strcpy((char *)pSysConfig->UserId,"");
-					log_info("Credit Card Cancel Stop");
-					ShmDcCommonData->TradeCancel = FALSE;
-					ShmDcCommonData->finalcost_flag[gunIndex] = FALSE;
+					log_info("Card Reader Stop");
 					memset(&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected], 0, sizeof(TransInfo));
 				} else if (ShmDcCommonData->PreAuth_Result < 0) {
-					log_info("Credit Card Cancel Fail");
+					log_info("Car Reader Stop Fail");
 
 				}
 				ShmDcCommonData->PreAuth_Config = _CREDITCARD_IDLE;
             } else if (ShmDcCommonData->PreAuth_Config == _CREDITCARD_PREAUTH) {
-
         		result = CreditCardPreAuth(fd, PREAUTHMONEY,"TCC Test", &ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected]);
-        		log_info("PreAuth ApprovalNo:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].ApprovalNo[0]);
-        		log_info("PreAuth CardNo:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].CardNo[0]);
-        		log_info("PreAuth VemData:%s",&ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].VemData[0]);
-
+                sleep(10);
 				//result = 1;
 				if (result > 0) {
-					sleep(10);
 					ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] = TRUE;
 					//pSysInfo->SystemPage = _PAGE_PLUGIN;
 					//strncpy((char *)pSysConfig->UserId,ShmDcCommonData->pCreditCard[pSysInfo->CurGunSelected].CardNo,20);

+ 18 - 41
EVSE/Projects/DD360Tcci/Apps/CSU/SelfTest.c

@@ -81,8 +81,8 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V2.02.00.0000.00"; // Phihong version
-char* DebugVersion = "v2.02.00";      // Software debug version
+char *fwVersion = "V2.01.00.0000.00"; // Phihong version
+char* DebugVersion = "v2.01.00";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -2480,7 +2480,7 @@ void CreateTimeoutFork(void)
             }
             //if (pSysInfo->SystemTimeoutFlag != 0)
             //log_info("Timeout ***********SystemTimeoutFlag = %d(%d) ********",pSysInfo->SystemTimeoutFlag,
-             //       GetClockTimeoutValue(pSysInfo->SystemTimeoutTimer) / uSEC_VAL);
+            //        GetClockTimeoutValue(pSysInfo->SystemTimeoutTimer) / uSEC_VAL);
 
             // 系統
             switch (pSysInfo->SystemTimeoutFlag) {
@@ -2609,23 +2609,8 @@ void CreateTimeoutFork(void)
             		pSysInfo->SystemPage = _PAGE_SELECT_GUN;
             	}
             	break;
-			case Timeout_Sensing:
-				if (GetClockTimeoutValue(pSysInfo->SystemTimeoutTimer) / uSEC_VAL >= TCC_SENSING_TIMEOUT) {
-					StopSystemTimeoutDet();
-					log_info("Sensing timeout");
-					pSysInfo->SystemPage = _PAGE_AUTHORIZE_FAIL;
-					ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
-				}
-				break;
-			case Timeout_KeepComplete:
-				if (GetClockTimeoutValue(pSysInfo->SystemTimeoutTimer) / uSEC_VAL >= TCC_KEEPCOMPLETE_TIMEOUT) {
-					StopSystemTimeoutDet();
-					ShmDcCommonData->KeepComplete[pSysInfo->CurGunSelected] = FALSE;
-				}
-				break;
             }
 
-
             // 各槍
             for (uint8_t gunIndex = 0; gunIndex < pSysConfig->TotalConnectorCount; gunIndex++) {
                 pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
@@ -4276,6 +4261,7 @@ CheckStatus:
                         if (pDcChargingInfo->ConnectorPlugIn == YES &&
                                 pDcChargingInfo->IsAvailable &&
                                 pDcChargingInfo->SystemStatus == S_AUTHORIZING &&
+								ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] == TRUE &&
                                 //waitSelectGunPlugIt(gunIndex)
                                 (waitRightGunPlugIt(gunIndex) == PASS ||
                                  waitLeftGunPlugIt(gunIndex) == PASS)
@@ -4504,11 +4490,8 @@ CheckStatus:
                         strcpy((char *)ShmOCPP16Data->StopTransaction[gunIndex].StopReason, "Local");
                     }
                     StopGunInfoTimeoutDet(gunIndex);
-                    //StartSystemTimeoutDet(Timeout_Terminating);
+                    StartSystemTimeoutDet(Timeout_Terminating);
                     pSysInfo->CurGunSelected = gunIndex;
-                    ShmDcCommonData->KeepComplete[gunIndex] = TRUE;
-                    ShmDcCommonData->StopCharge[pSysInfo->CurGunSelected] = TRUE;
-                	//StartGunInfoTimeoutDet(pSysInfo->CurGunSelected,Timeout_FinalCost);
                 }
                 // For Precharging timeout
 
@@ -4536,8 +4519,7 @@ CheckStatus:
                 if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
 					break;
                 }
-                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
-                		ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
                 	if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE)
                 		pSysInfo->SystemPage = _PAGE_COMPLETE;
                 	else
@@ -4554,31 +4536,28 @@ CheckStatus:
                     }
                     TheEndCharging(gunIndex);
                     StopSystemTimeoutDet();
-                    ShmDcCommonData->KeepComplete[gunIndex] = TRUE;
-
                 }
 
                 //if (pSysInfo->SystemPage == _LCM_ERROR) {
                 if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
                     break;
                 }
-                if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE &&
-                		ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE) {
                 	pSysInfo->SystemPage = _PAGE_EXIT;
                 	break;
                 }
-                if (pDcChargingInfo->ConnectorPlugIn == NO && ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pDcChargingInfo->ConnectorPlugIn == NO) {
                 	is_plugout[gunIndex] = TRUE;
                     StartGunInfoTimeoutDet(gunIndex, Timeout_PlugOutGun);
                     if (pSysInfo->CurGunSelected == gunIndex) {
+                        sleep(10);
                     	pSysInfo->SystemPage = _PAGE_EXIT;
                     	break;
                     }
                 }
 
-                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
-                		ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
-                	if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE )
+                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
+                	if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE)
 						pSysInfo->SystemPage = _PAGE_COMPLETE;
 					else
 						pSysInfo->SystemPage = _PAGE_PAYFAIL;
@@ -4602,11 +4581,11 @@ CheckStatus:
                 		ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
                 		ShmDcCommonData->PreAuth_Result = 0;
                     } else {
-	                    ShmDcCommonData->StopCharge[pSysInfo->CurGunSelected] = TRUE;
-	                	//StartGunInfoTimeoutDet(pSysInfo->CurGunSelected,Timeout_FinalCost);
+						if(ShmDcCommonData->PayFinish[gunIndex] == FALSE) {
+							pSysInfo->SystemPage = _PAGE_PAYING;
+						}
+						ShmDcCommonData->StopCharge[gunIndex] = TRUE;
                     }
-                    ShmDcCommonData->KeepComplete[gunIndex] = TRUE;
-
                 }
 
                 if (pSysWarning->Level == WARN_LV_ER) {
@@ -4614,12 +4593,11 @@ CheckStatus:
 
 					continue;
 				}
-                if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE &&
-                		ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE) {
                 	pSysInfo->SystemPage = _PAGE_EXIT;
                 	break;
                 }
-                if (pDcChargingInfo->ConnectorPlugIn == NO && ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pDcChargingInfo->ConnectorPlugIn == NO) {
                 	is_plugout[gunIndex] = TRUE;
 					if (pDcChargingInfo->Replug_flag == TRUE) {
 						pSysInfo->SystemPage = _PAGE_SELECT_GUN;
@@ -4634,8 +4612,7 @@ CheckStatus:
                 //if (pSysInfo->SystemPage == _PAGE_PAYING)
                 //	break;
 
-                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
-                		ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
+                if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
                 	if (pDcChargingInfo->Replug_flag == TRUE)
                 		pSysInfo->SystemPage = _PAGE_PLUGOUT;
                 	else {

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

@@ -52,8 +52,6 @@
 #define TCC_SELECTPAY_TIMEOUT					(180)
 #define TCC_FINALCOST_TIMEOUT					(30)
 #define TCC_SCANCARD_TIMEOUT					(60)
-#define TCC_SENSING_TIMEOUT						(60)
-#define TCC_KEEPCOMPLETE_TIMEOUT				(10)
 
 //#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)

+ 0 - 2
EVSE/Projects/DD360Tcci/Apps/Config.h

@@ -484,12 +484,10 @@ typedef struct StDcCommonInfo {
     unsigned int PayFinish[2];
     unsigned int StopCharge[2];
     unsigned int GetCardNo[2];
-    unsigned int TradeCancel;
     int reupload_deduct_status;		// 0:Not ReUpload 1:ReUpload 2:ReUpload finish
     RecordTransactionInfo TransactionInfo[2];
     RecordTransactionInfo UploadRedectInfo;
     RecordTransactionInfo ReAuthComplete;
-    unsigned int KeepComplete[2];
 } DcCommonInfo;
 
 #endif /* CONFIG_H_ */

+ 1 - 1
EVSE/Projects/DD360Tcci/Apps/DataBase/DataBase.c

@@ -1958,7 +1958,7 @@ static void checkAuthorProcess(int fd, uint8_t plugNum)
         ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance = 0.0;
     }
 #else
-    gunID = gDoCommGblData.ConnectorID[pSysInfo->CurGunSelected];
+    gunID = gDoCommGblData.ConnectorID[pSysInfo->CurGunSelected];;
 
     ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance = 0.0; //非Audi 不需要等待主櫃回報餘額
 #endif // DD360Audi

+ 15 - 53
EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.h

@@ -205,31 +205,21 @@ void CheckReturnPress()
 	//pDcChargingInfo->SystemStatus = S_IDLE;
 	StopSystemTimeoutDet();
 	if ( pDcChargingInfo->SystemStatus == S_AUTHORIZING ) {
-		if (pSysInfo->SystemPage == _PAGE_AUTHORIZE) {
+		if (pSysInfo->SystemPage == _PAGE_AUTHORIZE || pSysInfo->SystemPage == _PAGE_PLUGIN ) {
 			pSysInfo->SystemPage = _PAGE_SELECT_PAY;
-		} else if (pSysInfo->SystemPage == _PAGE_PLUGIN) {
-			pSysInfo->SystemPage = _PAGE_SENSING;
 		}
-		ShmDcCommonData->TradeCancel = TRUE;
-		if (ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] == TRUE) {
-			ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
-			ShmDcCommonData->PreAuth_Result = 0;
-			ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] = FALSE;
-			for(i=0;i<=30;i++) {
-				if(ShmDcCommonData->PreAuth_Result != 0)
-					break;
-				sleep(1);
-			}
-			pDcChargingInfo->SystemStatus = S_IDLE;
-			ShmDcCommonData->PreAuth_Result = 0;
-
-			strcpy((char *)pSysConfig->UserId, "");
-		}
-		return;
-	}
-	if (pDcChargingInfo->SystemStatus == S_IDLE && pSysInfo->SystemPage == _PAGE_AUTHORIZE_FAIL ) {
 		pDcChargingInfo->SystemStatus = S_IDLE;
+		ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
+		ShmDcCommonData->PreAuth_Result = 0;
+		for(i=0;i<=30;i++) {
+			if(ShmDcCommonData->PreAuth_Result != 0)
+				break;
+			sleep(1);
+		}
+		ShmDcCommonData->PreAuth_Result = 0;
+
 		strcpy((char *)pSysConfig->UserId, "");
+		return;
 	}
 	if ( pSysInfo->SystemPage == _PAGE_EXIT ) {
 		pDcChargingInfo->SystemStatus = S_IDLE;
@@ -298,7 +288,7 @@ void CheckPayCreditCard()
 		setSelGunWaitToAuthor(pSysInfo->CurGunSelected);
 		pSysInfo->SystemPage = _PAGE_AUTHORIZE;
 		//pDcChargingInfo->SystemStatus = S_AUTHORIZING;
-		StartSystemTimeoutDet(Timeout_Sensing);
+
 		//
 		AuthorizingStart();
 	}
@@ -369,6 +359,8 @@ void CheckTouchPress(short id)
 
             break;
         case _Touch_Return:
+        	if (pSysInfo->SystemPage == _PAGE_AUTHORIZE)
+        		pSysInfo->SystemPage = _PAGE_SELECT_PAY;
         	CheckReturnPress();
         	break;
         case _Touch_IDLE:
@@ -917,17 +909,7 @@ void ChangeChargingPowerValue(float pow)
     string2ByteArray(value, cmd);
     DisplayValueToLcm(_String_ChargePower, cmd, sizeof(cmd));
 }
-void ChangeChargingRateValue(int rate)
-{
-    uint8_t cmd[10];
-    uint8_t value[10];
-
-    memset(cmd, 0x00, sizeof(cmd));
 
-    sprintf((char *) value, "%d",rate);
-    string2ByteArray(value, cmd);
-    DisplayValueToLcm(_String_ChargeRate, cmd, sizeof(cmd));
-}
 
 void ChangeChargingFeeValue(float fee)
 {
@@ -1087,16 +1069,6 @@ void changeLocationValue(int _location)
 }
 int old_money = 0;
 int ClearQR_flag[2];
-void ShowTradeSensing(int _show)
-{
-	if (_show) {
-		ChangeDisplay2Value(_Icon_Location,(short)_TCC_PreAuth);
-	}
-}
-void ShowTradeCancel(int _show)
-{
-
-}
 void ProcessPageInfo()
 {
     // Show Gun Working and Type
@@ -1174,23 +1146,15 @@ void ProcessPageInfo()
 				}*/
             	//ChangeDisplay2Value(_Icon_Precharge,0);
             	//ChangeDisplay2Value(_Icon_Precharge,1);
-
             	if (ShmDcCommonData->GetCardNo[pSysInfo->CurGunSelected] == TRUE &&
             			ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] != TRUE) {
             		ShmDcCommonData->PreAuth_Config = _CREDITCARD_PREAUTH;
-            		StartSystemTimeoutDet(Timeout_Sensing);
             		ShmDcCommonData->PreAuth_Result = 0;
             		sleep(3);
             		pSysInfo->SystemPage = _PAGE_SENSING;
             	}
             	_Text_Running_Count = 1;
-            	ChangeChargingRateValue(ShmDcCommonData->ChargingRate);
                 break;
-            case _PAGE_SENSING:
-            	if (ShmDcCommonData->AuthPass_flag[pSysInfo->CurGunSelected] == TRUE) {
-
-            	}
-            	break;
             case _PAGE_PLUGIN:
             	_everyPageRollChange = 0;
 
@@ -1242,7 +1206,6 @@ void ProcessPageInfo()
                 } else {
                     ChangeChargingEnergyValue(0);
                 }
-
                 if ( ShmDcCommonData->finalcost[i] >= 0 && ShmDcCommonData->finalcost_flag[i] == TRUE) {
                 	StopGunInfoTimeoutDet(i);
 					ChangeChargingFeeValue(ShmDcCommonData->finalcost[i]);
@@ -1251,7 +1214,7 @@ void ProcessPageInfo()
                 ChangeCarBonValue(pDcChargingInfo->PresentChargedEnergy);
                 ChangeBattMapAndValue(pDcChargingInfo->EvBatterySoc);
                 //StartSystemTimeoutDet(Timeout_ReturnViewPage);
-                StartSystemTimeoutDet(Timeout_KeepComplete);
+				
                 break;
 
             case _PAGE_PLUGOUT:
@@ -1459,7 +1422,6 @@ void DefautLayOut()
 		if (i==0x28 || i ==0x2A)
 			continue;
 	}
-	ChangeDisplay2Value(0x1066,1);
 	ChangeDisplay2Value(_Icon_MobilePay,0);
 	ChangeDisplay2Value(_Icon_CardPay,0);
 	ChangeDisplay2Value(0x5000,1);

+ 229 - 5
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.h

@@ -49,6 +49,91 @@
 #define _CHANGE_PAYMENT_OK      0x06
 #define _CHANGE_PAYMENT_FAIL    0x07
 
+
+//#define NOODOE_QR_CODE_URL                    "https://ev-alpha-test.noodoe.com/station?id=" ////For Audi
+/*
+#define _StatuIcon				0x1000
+#define _ConfirmStopIcon		0x1002
+#define	_TccareIcon				0x1004
+#define _StartTouchIcon			0x1006
+#define _FurthureIcon			0x1010
+#define _WeatherIcon			0x1012
+#define	_WelcomeIcon			0x1014
+#define _QRCodeIcon				0x1016
+#define _ExclamIcon				0x1018
+#define _PluginIcon				0x101A
+#define _PlugoutIcon			0x101C
+#define _ReturnIcon				0x101E
+#define _PrechargeIcon			0x1020
+#define _MinuteIcon				0x1026
+#define _Rate13Icon				0x1028
+#define _CompleteIcon			0x102A
+#define _KgIcon					0x102C
+#define _Rate14Icon				0x102E
+#define _ExitIcon				0x1030
+#define _FarewellIcon			0x1032
+#define _ChargingIcon			0x1034
+// Circle Battery Setting Icon
+#define _Battery_Circle			0x1036
+// Energy Bar
+#define _EnergyBar				0x1038
+// Prepare Bar
+#define _PrepareBar				0x103A
+
+// QRCode
+#define _QRCode_Authorize		0x1040
+#define _QRCode_Replug			0x1050
+#define _QRCode_Complete		0x1060
+
+#define _LeftGun_status			0x1070
+#define _RightGun_status		0x1072
+// Warm
+#define _Icon_Warming_0			0x1074
+#define _Icon_Warming_1			0x1076
+#define _Icon_Warming_2			0x1078
+#define _Icon_Warming_3			0x107A
+#define _Icon_Warming_4			0x107C
+
+// Touch
+#define _Touch_LeftGun			0x1080
+#define _Touch_RightGun			0x1082
+#define _Touch_Return			0x1084
+#define _Touch_IDLE				0x1086
+#define _Touch_Stop				0x1088
+#define _Touch_Stop_Confirm		0x108A
+#define _Touch_Stop_Cancel		0x108C
+#define _Touch_ConfirmLeft		0x1208
+#define _Touch_ConfirmRight		0x120A
+
+// Text String
+#define _Text_Power				0x1090
+#define _Text_Time				0x10A0
+#define _Text_Energy			0x10B0
+#define _Text_Money				0x10C0
+#define _Text_BatterySoc		0x10D0
+#define _Text_Carbon			0x10E0
+// Warming Code
+#define _Text_Warming_0			0x10F0
+#define _Text_Warming_1			0x1100
+#define _Text_Warming_2			0x1110
+#define _Text_Warming_3			0x1120
+#define _Text_Warming_4			0x1130
+#define _Text_Date				0x1140
+#define _Text_Tempture			0x1150
+
+#define _WeekIcon				0x1200
+#define _WeatherIcon			0x1202
+#define _LocationIcon			0x1204
+#define _StopChargeBtn			0x1206
+
+#define _ErrorIcon				0x120C
+#define _PayIcon				0x120E
+#define _ProgreePayIcon			0x1210
+#define _ConfirmLeftIcon		0x1212
+#define _ConfirmRightIcon		0x1214
+#define _PayFailLeftIcon		0x1216
+#define _PayFailRightIcon		0x1218
+*/
 #define _Animation				0x1000
 #define _Icon_TouchStart		0x1002
 #define _Icon_Location			0x1004
@@ -95,11 +180,6 @@
 #define _Icon_Warming2			0x1058
 #define _Icon_Warming3			0x105A
 #define _Icon_Warming4			0x105C
-#define _Icon_TradeCancel		0x105E
-#define _Icon_CountDownBG		0x1060
-#define _Icon_CountDownTen		0x1062
-#define _Icon_CountDownDigital	0x1064
-#define _Icon_SecondSense		0x1066
 
 #define _String_Date			0x3000
 #define _String_Tempture		0x3010
@@ -137,7 +217,151 @@
 #define _Touch_Pay_LinePay		0x151C
 
 enum _TCC_ICON_LIST_ {
+	/*
+    _ICON_Empty 			= 0,
+	_ICON_StatusInit,
+	_ICON_StatusAuthorize,
+	_ICON_StatusCharge,
+	_ICON_StatusComplete,
+	_ICON_AllIdle,
+	_ICON_LeftGunSelect,
+	_ICON_RightGunSelect,
+	_ICON_AllSelect,
+	_ICON_TCCare,
+	_ICON_StartTouch,
+
+	_ICON_Furthure 			= 15,
+	_ICON_Weather,
+	_ICON_Welcome,
+	_ICON_QRCode,
+	_ICON_exclamation,
+	_ICON_plugin,
+	_ICON_Plugout,
+	_ICON_Return,
+	_ICON_PrepareCharge,
+
+	_ICON_min 				= 26,
+	_ICON_Rate_13,
+	_ICON_Complete,
+	_ICON_kg,
+	_ICON_Rate_14,
+	_ICON_Exit,
+	_ICON_HaveANiceDay,
+	_ICON_HaveANiceTrip,
+	_ICON_SaftDrive,
+	_ICON_Charging,
+
+	_ICON_Battery_0 		= 40,
+	_ICON_Battery_1,
+	_ICON_Battery_2,
+	_ICON_Battery_3,
+	_ICON_Battery_4,
+	_ICON_Battery_5,
+	_ICON_Battery_6,
+	_ICON_Battery_7,
+	_ICON_Battery_8,
+	_ICON_Battery_9,
+	_ICON_Battery_10,
+	_ICON_Battery_11,
+	_ICON_Battery_12,
+	_ICON_Battery_13,
+	_ICON_Battery_14,
+	_ICON_Battery_15,
+	_ICON_Battery_16,
+	_ICON_Battery_17,
+	_ICON_Battery_18,
+	_ICON_Battery_19,
+	_ICON_Battery_20,
+	_ICON_Battery_21,
+	_ICON_Battery_22,
+	_ICON_Battery_23,
+	_ICON_Battery_24,
+	_ICON_Battery_25,
+	_ICON_Battery_26,
+	_ICON_Battery_27,
+	_ICON_Battery_28,
+	_ICON_Battery_29,
+	_ICON_Battery_30,
+	_ICON_Battery_31,
+	_ICON_Battery_32,
+	_ICON_Battery_33,
+	_ICON_Battery_34,
+	_ICON_Battery_35,
+	_ICON_Battery_36,
+	_ICON_Weather_Sun,
+	_ICON_Weather_Cloudy,
+	_ICON_Weather_Rain,
+	_ICON_Weather_Thunder,
+	_ICON_Weather_Snow,
+	_ICON_Weather_Fog,
+
+	_ICON_PrePare_1   = 86,
+	_ICON_PrePare_2,
+	_ICON_PrePare_3,
+	_ICON_PrePare_4,
+	_ICON_PrePare_5,
+	_ICON_PrePare_6,
+	_ICON_PrePare_7,
+	_ICON_PrePare_8,
+	_ICON_PrePare_9,
+	_ICON_PrePare_10,
+	_ICON_PrePare_11,
+	_ICON_PrePare_12,
+	_ICON_PrePare_13,
+	_ICON_PrePare_14,
+	_ICON_Left_CCS1_Off,
+	_ICON_Left_CCS2_Off,
+	_ICON_Left_CHAdeMO_Off,
+	_ICON_Left_CCS1_ON,
+	_ICON_Left_CCS2_ON,
+	_ICON_Left_CHAdeMO_ON,
+	_ICON_Right_CCS1_Off,
+	_ICON_Right_CCS2_Off,
+	_ICON_Right_CHAdeMo_Off,
+	_ICON_Right_CCS1_ON,
+	_ICON_Right_CCS2_ON,
+	_ICON_Right_CHAdeMO_ON,
+	_ICON_WARMING,
+	_ICON_SELECT_TEXT,
+	_ICON_MONDAY,
+	_ICON_TUESDAY,
+	_ICON_WENSDAY,
+	_ICON_THRUDAY,
+	_ICON_FRIDAY,
+	_ICON_SATURDAY,
+	_ICON_SUNDAY,
+	_ICON_LOCATION_TAIPEI,
 
+	_ICON_PAYFAIL = 126,
+	_ICON_PROGREEPAY_1,
+	_ICON_PROGREEPAY_2,
+	_ICON_PROGREEPAY_3,
+	_ICON_PROGREEPAY_4,
+	_ICON_PROGREEPAY_5,
+	_ICON_PROGREEPAY_6,
+	_ICON_PROGREEPAY_7,
+	_ICON_PROGREEPAY_8,
+	_ICON_PROGREEPAY_9,
+	_ICON_PROGREEPAY_10,
+	_ICON_PROGREEPAY_11,
+	_ICON_PROGREEPAY_12,
+	_ICON_PROGREEPAY_13,
+	_ICON_PROGREEPAY_14,
+	_ICON_PROGREEPAY_15,
+	_ICON_STOPSERVICE,
+	_ICON_WELCOMELEFTCCS1,
+	_ICON_WELCOMELEFTCCS2,
+	_ICON_WELCOMELEFTCHADEMO,
+	_ICON_WELCOMERIGHTCCS1,
+	_ICON_WELCOMERIGHTCCS2,
+	_ICON_WELCOMERIGHTCHADEMO,
+	_ICON_PAYFAILLEFTCCS1,
+	_ICON_PAYFAILLEFTCCS2,
+	_ICON_PAYFAILLETCHADEMO,
+	_ICON_PAYFAILRIGHTCCS1,
+	_ICON_PAYFAILRIGHTCCS2,
+	_ICON_PAYFAILRIGHTCHADEMO,
+	*/
 	_ICON_Empty 			= 0,
 	_TCC_Week_Monday,
 	_TCC_Week_Tuesday,

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

@@ -60,8 +60,6 @@ enum Timeout_flag {
 	Timeout_SelectPayMode		   = 23,
 	Timeout_FinalCost			   = 24,
 	Timeout_ScanCard			   = 25,
-	Timeout_Sensing				   = 26,
-	Timeout_KeepComplete		   = 27,
 };
 
 //------------------------------------------------------------------------------

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


BIN
EVSE/Projects/DD360Tcci/output/FactoryConfig


BIN
EVSE/Projects/DD360Tcci/output/Module_ChkSysTask


BIN
EVSE/Projects/DD360Tcci/output/Module_DoComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EvComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EventLogging


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/main


BIN
EVSE/Projects/DD360Tcci/output/simulation