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

2022-02-23 / Simon Xue

Action
1. Fix Authorize return will cancel line status problem.
2. Add Service QR Code problem.
3. Fix status code 023983.

Files
As the commit history files

Image Version: V2.06.XX.XXXX.XX
Simon Xue 3 жил өмнө
parent
commit
905a5b3aef

+ 6 - 4
EVSE/Projects/DD360Tcci/Apps/CSU/main.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.05.00.0000.00"; // Phihong version
-char* DebugVersion = "v2.05.01";      // Software debug version
+char *fwVersion = "V2.06.00.0000.00"; // Phihong version
+char* DebugVersion = "v2.06.01";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -3468,7 +3468,7 @@ static void autoStartCharging(uint8_t gunIndex)
 {
     pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
 
-    if ( (pSysInfo->SystemPage >= _LCM_START_AUTHORIZING && pSysInfo->SystemPage <= _LCM_LINK_ERROR) ||
+    if ( (pSysInfo->SystemPage >= _PAGE_AUTHORIZE && pSysInfo->SystemPage <= _PAGE_SENSING) ||
         pDcChargingInfo->isEVCCIDVerify && strcmp( (char *)pSysConfig->UserId , "" ) != EQUAL) {
             return;
     }
@@ -3477,6 +3477,7 @@ static void autoStartCharging(uint8_t gunIndex)
             (pDcChargingInfo->SystemStatus == S_IDLE ) 
        ) {
         if(!pSysConfig->AuthorisationMode) {
+            /*
             if (pSysConfig->isAuthrizeByEVCCID && !pDcChargingInfo->isEVCCIDVerify &&
                     pDcChargingInfo->Type == _Type_CCS_2)  {
                 // LCM show linking pic. & timeout 2 min
@@ -3499,6 +3500,7 @@ static void autoStartCharging(uint8_t gunIndex)
                 }
             } else
                 return;
+                */
         } else {
             strcpy((char *)&pSysConfig->UserId, "AutoStartCharging");
             ChangeGunSelectByIndex(gunIndex);
@@ -4193,7 +4195,7 @@ int main(void)
 
                 	if(pSysInfo->SystemPage ==_PAGE_BILL) {
                 		StartSystemTimeoutDet(Timeout_AddLine);
-                        if (ShmDcCommonData->LineStatus[gunIndex] == 1 || ShmDcCommonData->LineStatus[gunIndex] == 2) {
+                        if (/*ShmDcCommonData->LineStatus[gunIndex] == 1 ||*/ ShmDcCommonData->LineStatus[gunIndex] == 2) {
                             pSysInfo->SystemPage = _PAGE_ADD_FRIEND;
                             log_info("Change to Add Line Friend Page");
                         }

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

@@ -495,6 +495,7 @@ typedef struct StDcCommonInfo {
     int RoutineSettlement;
     int RoutineReupload;
     int TZOffset;
+    int ClearServiceQR;
 } DcCommonInfo;
 
 #endif /* CONFIG_H_ */

+ 2 - 1
EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/AbnormalState.c

@@ -28,7 +28,8 @@ bool AbnormalStopAnalysis(uint8_t gun_index, uint8_t *errCode)
 
     if (strncmp(string, "000000", 6) == EQUAL ||
             strncmp(string, "012219", 6) == EQUAL ||
-            strncmp(string, "023979", 6) == EQUAL )
+            strncmp(string, "023979", 6) == EQUAL || 
+            strncmp(string, "023983", 6) == EQUAL)
     {
 		log_info("NOTIFICATION_EV_STOP : EvCode = %s\n", string);
         return false;

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

@@ -226,7 +226,8 @@ void CheckReturnPress()
 	pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
 	//pDcChargingInfo->SystemStatus = S_IDLE;
     if (pSysInfo->SystemPage >= _PAGE_BILL && pSysInfo->SystemPage <= _PAGE_PLUGIN) {
-        ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
+        if (pSysInfo->SystemPage != _PAGE_AUTHORIZE)
+            ShmDcCommonData->OperateIDLE[pSysInfo->CurGunSelected] = 1;
         log_info("Operate return to IDLE");
     }
 	if ( pDcChargingInfo->SystemStatus == S_AUTHORIZING ) {
@@ -795,6 +796,9 @@ void ChangeCurPage()
             break;
         case _PAGE_COMPLETE:
             break;
+        case _PAGE_MAINTAIN:
+            ShmDcCommonData->ClearServiceQR = FALSE;
+            break;
         }
         _currentPage = pSysInfo->PageIndex;
         //log_info("Chagne Page:%d",pSysInfo->PageIndex);
@@ -869,7 +873,7 @@ void showGunWorkingType()
         }
     }
 }
-void ClearQrCode()
+void ClearQrCode_Idle()
 {
     char cmd[200];
     memset(cmd,0,200);
@@ -887,7 +891,22 @@ void ChangeQrCode_Idle(char *input)
     if (pSysInfo->SystemPage == _PAGE_BILL)
     	DisplayValueToLcm(_QRCode_AddLine, cmd, len+1);
 }
+void ClearQrCode_Error()
+{
+    char cmd[200];
+    memset(cmd, 0, 200);
+    DisplayValueToLcm(_QRCode_Service, cmd, 200);
+}
+void ChangeQrCode_Error()
+{
+    char cmd[200];
+    memset(cmd, 0, 200);
+    int len = sprintf(cmd, "https://line.me/R/ti/p/@217tcevc");
+
+    //log_info("QR Code:URL:%s",cmd);
 
+    DisplayValueToLcm(_QRCode_Service, cmd, 200);
+}
 /*
 void ChangeRemainTime(int sec)
 {
@@ -1207,6 +1226,7 @@ void ProcessPageInfo()
     	return;
     }
     if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
+
         pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(LEFT_GUN_NUM);
         if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
                 pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
@@ -1231,6 +1251,13 @@ void ProcessPageInfo()
         } else if (pDcChargingInfo->Type == _Type_Chademo) {
             ChangeDisplay2Value(_Icon_ShowRight,_TCC_ShowRight_CHAdeMo_Off);
         }
+        /*
+        if (ShmDcCommonData->ClearServiceQR == FALSE) {
+            ShmDcCommonData->ClearServiceQR = TRUE;
+            ClearQrCode_Error();
+            ChangeQrCode_Error();
+        }
+        */
     	return;
     }
     showGunWorkingType();
@@ -1256,7 +1283,7 @@ void ProcessPageInfo()
 				break;
             case _PAGE_BILL:
             	if(ClearQR_flag[i] == FALSE) {
-            		ClearQrCode();
+                    ClearQrCode_Idle();
             		ClearQR_flag[i] = TRUE;
             	}
             	ChangeQrCode_Idle((char *)pSysConfig->SystemId);
@@ -1346,7 +1373,7 @@ void ProcessPageInfo()
                 } else {
                     ChangeChargingEnergyValue(0);
                 }
-                if ( ShmDcCommonData->finalcost[i] >= 0 && ShmDcCommonData->finalcost_flag[i] == TRUE) {
+                if ( ShmDcCommonData->finalcost[i] > 0 && ShmDcCommonData->finalcost_flag[i] == TRUE) {
                 	StopGunInfoTimeoutDet(i);
 					ChangeChargingFeeValue(ShmDcCommonData->finalcost[i]);
 					//ShmDcCommonData->finalcost_flag[i] = FALSE;
@@ -1373,6 +1400,10 @@ void ProcessPageInfo()
             case _PAGE_PAYING:
 
             	break;
+                /*
+            case _PAGE_MAINTAIN:
+                ChangeQrCode_Error();
+                break;*/
             }
         }
     }
@@ -1565,7 +1596,7 @@ void DefautLayOut()
 	ChangeDisplay2Value(_Icon_MobilePay,0);
 	ChangeDisplay2Value(_Icon_CardPay,0);
 	ChangeDisplay2Value(0x5000,1);
-
+    ChangeDisplay2Value(_QRCode_Service, 1);
 	ShowSelectGun();
 }
 /*
@@ -1646,7 +1677,7 @@ int main(void)
             sleep(1);
 
             ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LcmModuleCommFail = true;
-
+            ShmDcCommonData->ClearServiceQR = FALSE;
         } else {
             UpdateLcmFunction(ShmDcCommonData,_port);
 

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