浏览代码

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 年之前
父节点
当前提交
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_1_status = 0;
 uint8_t bd1_2_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;
 //sqlite3 *localDb;
 bool isDb_ready;
 bool isDb_ready;
 
 
@@ -3468,7 +3468,7 @@ static void autoStartCharging(uint8_t gunIndex)
 {
 {
     pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(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) {
         pDcChargingInfo->isEVCCIDVerify && strcmp( (char *)pSysConfig->UserId , "" ) != EQUAL) {
             return;
             return;
     }
     }
@@ -3477,6 +3477,7 @@ static void autoStartCharging(uint8_t gunIndex)
             (pDcChargingInfo->SystemStatus == S_IDLE ) 
             (pDcChargingInfo->SystemStatus == S_IDLE ) 
        ) {
        ) {
         if(!pSysConfig->AuthorisationMode) {
         if(!pSysConfig->AuthorisationMode) {
+            /*
             if (pSysConfig->isAuthrizeByEVCCID && !pDcChargingInfo->isEVCCIDVerify &&
             if (pSysConfig->isAuthrizeByEVCCID && !pDcChargingInfo->isEVCCIDVerify &&
                     pDcChargingInfo->Type == _Type_CCS_2)  {
                     pDcChargingInfo->Type == _Type_CCS_2)  {
                 // LCM show linking pic. & timeout 2 min
                 // LCM show linking pic. & timeout 2 min
@@ -3499,6 +3500,7 @@ static void autoStartCharging(uint8_t gunIndex)
                 }
                 }
             } else
             } else
                 return;
                 return;
+                */
         } else {
         } else {
             strcpy((char *)&pSysConfig->UserId, "AutoStartCharging");
             strcpy((char *)&pSysConfig->UserId, "AutoStartCharging");
             ChangeGunSelectByIndex(gunIndex);
             ChangeGunSelectByIndex(gunIndex);
@@ -4193,7 +4195,7 @@ int main(void)
 
 
                 	if(pSysInfo->SystemPage ==_PAGE_BILL) {
                 	if(pSysInfo->SystemPage ==_PAGE_BILL) {
                 		StartSystemTimeoutDet(Timeout_AddLine);
                 		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;
                             pSysInfo->SystemPage = _PAGE_ADD_FRIEND;
                             log_info("Change to Add Line Friend Page");
                             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 RoutineSettlement;
     int RoutineReupload;
     int RoutineReupload;
     int TZOffset;
     int TZOffset;
+    int ClearServiceQR;
 } DcCommonInfo;
 } DcCommonInfo;
 
 
 #endif /* CONFIG_H_ */
 #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 ||
     if (strncmp(string, "000000", 6) == EQUAL ||
             strncmp(string, "012219", 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);
 		log_info("NOTIFICATION_EV_STOP : EvCode = %s\n", string);
         return false;
         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 = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
 	//pDcChargingInfo->SystemStatus = S_IDLE;
 	//pDcChargingInfo->SystemStatus = S_IDLE;
     if (pSysInfo->SystemPage >= _PAGE_BILL && pSysInfo->SystemPage <= _PAGE_PLUGIN) {
     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");
         log_info("Operate return to IDLE");
     }
     }
 	if ( pDcChargingInfo->SystemStatus == S_AUTHORIZING ) {
 	if ( pDcChargingInfo->SystemStatus == S_AUTHORIZING ) {
@@ -795,6 +796,9 @@ void ChangeCurPage()
             break;
             break;
         case _PAGE_COMPLETE:
         case _PAGE_COMPLETE:
             break;
             break;
+        case _PAGE_MAINTAIN:
+            ShmDcCommonData->ClearServiceQR = FALSE;
+            break;
         }
         }
         _currentPage = pSysInfo->PageIndex;
         _currentPage = pSysInfo->PageIndex;
         //log_info("Chagne Page:%d",pSysInfo->PageIndex);
         //log_info("Chagne Page:%d",pSysInfo->PageIndex);
@@ -869,7 +873,7 @@ void showGunWorkingType()
         }
         }
     }
     }
 }
 }
-void ClearQrCode()
+void ClearQrCode_Idle()
 {
 {
     char cmd[200];
     char cmd[200];
     memset(cmd,0,200);
     memset(cmd,0,200);
@@ -887,7 +891,22 @@ void ChangeQrCode_Idle(char *input)
     if (pSysInfo->SystemPage == _PAGE_BILL)
     if (pSysInfo->SystemPage == _PAGE_BILL)
     	DisplayValueToLcm(_QRCode_AddLine, cmd, len+1);
     	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)
 void ChangeRemainTime(int sec)
 {
 {
@@ -1207,6 +1226,7 @@ void ProcessPageInfo()
     	return;
     	return;
     }
     }
     if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
     if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
+
         pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(LEFT_GUN_NUM);
         pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(LEFT_GUN_NUM);
         if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
         if (pDcChargingInfo->CCSGunType == _TYPE_CCS1_Liquid ||
                 pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
                 pDcChargingInfo->CCSGunType == _TYPE_CCS1_Natural) {
@@ -1231,6 +1251,13 @@ void ProcessPageInfo()
         } else if (pDcChargingInfo->Type == _Type_Chademo) {
         } else if (pDcChargingInfo->Type == _Type_Chademo) {
             ChangeDisplay2Value(_Icon_ShowRight,_TCC_ShowRight_CHAdeMo_Off);
             ChangeDisplay2Value(_Icon_ShowRight,_TCC_ShowRight_CHAdeMo_Off);
         }
         }
+        /*
+        if (ShmDcCommonData->ClearServiceQR == FALSE) {
+            ShmDcCommonData->ClearServiceQR = TRUE;
+            ClearQrCode_Error();
+            ChangeQrCode_Error();
+        }
+        */
     	return;
     	return;
     }
     }
     showGunWorkingType();
     showGunWorkingType();
@@ -1256,7 +1283,7 @@ void ProcessPageInfo()
 				break;
 				break;
             case _PAGE_BILL:
             case _PAGE_BILL:
             	if(ClearQR_flag[i] == FALSE) {
             	if(ClearQR_flag[i] == FALSE) {
-            		ClearQrCode();
+                    ClearQrCode_Idle();
             		ClearQR_flag[i] = TRUE;
             		ClearQR_flag[i] = TRUE;
             	}
             	}
             	ChangeQrCode_Idle((char *)pSysConfig->SystemId);
             	ChangeQrCode_Idle((char *)pSysConfig->SystemId);
@@ -1346,7 +1373,7 @@ void ProcessPageInfo()
                 } else {
                 } else {
                     ChangeChargingEnergyValue(0);
                     ChangeChargingEnergyValue(0);
                 }
                 }
-                if ( ShmDcCommonData->finalcost[i] >= 0 && ShmDcCommonData->finalcost_flag[i] == TRUE) {
+                if ( ShmDcCommonData->finalcost[i] > 0 && ShmDcCommonData->finalcost_flag[i] == TRUE) {
                 	StopGunInfoTimeoutDet(i);
                 	StopGunInfoTimeoutDet(i);
 					ChangeChargingFeeValue(ShmDcCommonData->finalcost[i]);
 					ChangeChargingFeeValue(ShmDcCommonData->finalcost[i]);
 					//ShmDcCommonData->finalcost_flag[i] = FALSE;
 					//ShmDcCommonData->finalcost_flag[i] = FALSE;
@@ -1373,6 +1400,10 @@ void ProcessPageInfo()
             case _PAGE_PAYING:
             case _PAGE_PAYING:
 
 
             	break;
             	break;
+                /*
+            case _PAGE_MAINTAIN:
+                ChangeQrCode_Error();
+                break;*/
             }
             }
         }
         }
     }
     }
@@ -1565,7 +1596,7 @@ void DefautLayOut()
 	ChangeDisplay2Value(_Icon_MobilePay,0);
 	ChangeDisplay2Value(_Icon_MobilePay,0);
 	ChangeDisplay2Value(_Icon_CardPay,0);
 	ChangeDisplay2Value(_Icon_CardPay,0);
 	ChangeDisplay2Value(0x5000,1);
 	ChangeDisplay2Value(0x5000,1);
-
+    ChangeDisplay2Value(_QRCode_Service, 1);
 	ShowSelectGun();
 	ShowSelectGun();
 }
 }
 /*
 /*
@@ -1646,7 +1677,7 @@ int main(void)
             sleep(1);
             sleep(1);
 
 
             ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LcmModuleCommFail = true;
             ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LcmModuleCommFail = true;
-
+            ShmDcCommonData->ClearServiceQR = FALSE;
         } else {
         } else {
             UpdateLcmFunction(ShmDcCommonData,_port);
             UpdateLcmFunction(ShmDcCommonData,_port);
 
 

二进制
EVSE/Projects/DD360Tcci/Images/ramdisk.gz


二进制
EVSE/Projects/DD360Tcci/output/FactoryConfig


二进制
EVSE/Projects/DD360Tcci/output/Module_ChkSysTask


二进制
EVSE/Projects/DD360Tcci/output/Module_DoComm


二进制
EVSE/Projects/DD360Tcci/output/Module_EvComm


二进制
EVSE/Projects/DD360Tcci/output/Module_EventLogging


二进制
EVSE/Projects/DD360Tcci/output/Module_InternalComm


二进制
EVSE/Projects/DD360Tcci/output/Module_LcmControl


二进制
EVSE/Projects/DD360Tcci/output/Module_PrimaryComm


二进制
EVSE/Projects/DD360Tcci/output/Module_UpdateFW


二进制
EVSE/Projects/DD360Tcci/output/ReadCmdline


二进制
EVSE/Projects/DD360Tcci/output/main


二进制
EVSE/Projects/DD360Tcci/output/simulation