Browse Source

2022-01-17 / Simon Xue

Simon Xue 3 years ago
parent
commit
5c5f800434

+ 9 - 0
EVSE/Projects/DD360Tcci/Apps/CSU/main.c

@@ -424,6 +424,15 @@ static void checkGunOTPState(uint8_t gunIndex)
             //ResetChargerAlarmCode(gunIndex, "012229");
             ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = NO;
             ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail = YES;
+            if  ((gunIndex == 0) &&
+                    (strncmp((char *)&pSysConfig->ModelName[7], "J", 1) == 0)) {
+            	ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = NO;
+            	ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail = NO;
+            } else if ((gunIndex == 1) &&
+                    ((strncmp((char *)&pSysConfig->ModelName[9], "J", 1) == 0) )) {
+            	ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectOTP = NO;
+            	ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaConnectTempSensorFail = NO;
+            }
         }
         break;
 

+ 16 - 28
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -280,8 +280,9 @@ void CheckLCMPressed()
             ///*
             i++;
             if (i == 600 ) {
-                index >= 22 ? index = 1 : index++;
-                pSysInfo->SystemPage = 22;
+				index >= 8 ? index = 1 : index++;
+
+                pSysInfo->SystemPage = index;
                 i = 0;
                 /*
                 if (pSysInfo->SystemPage == _PAGE_PRECHARGE)
@@ -534,7 +535,6 @@ void ChangeCurPage()
     //log_info("cur = %d ,system = %d, lcm = %d ",_currentPage, pSysInfo->SystemPage, pSysInfo->PageIndex);
     struct ChargingInfoData *pDcChargingInfo_0 = (struct ChargingInfoData *)GetDcChargingInfoData(LEFT_GUN_NUM);
     struct ChargingInfoData *pDcChargingInfo_1 = (struct ChargingInfoData *)GetDcChargingInfoData(RIGHT_GUN_NUM);
-
     pSysInfo->PageIndex = pSysInfo->SystemPage;
     if (pSysInfo->CurGunSelected == RIGHT_GUN_NUM &&
             pSysInfo->SystemPage != _PAGE_IDLE &&
@@ -558,6 +558,7 @@ void ChangeCurPage()
             break;
         }
         _currentPage = pSysInfo->PageIndex;
+        log_info("Page:%d",pSysInfo->PageIndex);
         ChangeToOtherPage(pSysInfo->PageIndex);
     }
 }
@@ -870,7 +871,6 @@ void ProcessPageInfo()
             switch (pSysInfo->SystemPage) {
             case _PAGE_AUTHORIZE:
                 ShowHomePage();
-                log_info("Time:%d",GetTimeoutValue(returnIdleTimer) /uSEC_VAL);
                 if (GetTimeoutValue(returnIdleTimer) /uSEC_VAL >= RETURNIDLE_Timeout ) {
                     pSysInfo->SystemPage = _PAGE_IDLE;
                     gettimeofday(&returnIdleTimer, NULL);
@@ -1117,28 +1117,16 @@ void InformationShow()
 }
 void DefautLayOut()
 {
-    ChangeDisplay2Value(_CellPhone_Mode,_ICON_cellphone_mode);
-    ChangeDisplay2Value(_Screen_Mode,_ICON_screen_mode);
-    ChangeDisplay2Value(_PlugIn_String,_ICON_Plugin);
-    ChangeDisplay2Value(_Communication_Status,_ICON_Communication_on);
-    ChangeDisplay2Value(_SaftyDetect_Status,_ICON_SaftyDetect_off);
-    ChangeDisplay2Value(_PreCharge_Status,_ICON_PrepareCharge_off);
-    ChangeDisplay2Value(_Text_Voltage,_ICON_text_Voltage);
-    ChangeDisplay2Value(_Text_Current,_ICON_text_Current);
-    ChangeDisplay2Value(_Text_Power,_ICON_text_Power);
-    ChangeDisplay2Value(_Text_Rate,_ICON_text_Rate);
-    ChangeDisplay2Value(_Text_Time,_ICON_text_time);
-    ChangeDisplay2Value(_Battery_Progress_0,_ICON_battery_0);
-    ChangeDisplay2Value(_Symbol_V,_ICON_symbol_V);
-    ChangeDisplay2Value(_Symbol_A,_ICON_symbol_A);
-    ChangeDisplay2Value(_Symbol_KW,_ICON_symbol_KW);
-    ChangeDisplay2Value(_Symbol_Rate,_ICON_symbol_rate);
-    ChangeDisplay2Value(_Symbol_Percent,_ICON_symbol_percent);
-    ChangeDisplay2Value(_Text_ChargeRate,_ICON_text_ChargereRate);
-    ChangeDisplay2Value(_Text_ChargePay,_ICON_text_ChargePay);
-    ChangeDisplay2Value(_Battery_Progress_1,_ICON_text_battery_0);
-    ChangeDisplay2Value(_Symbol_Dollar,_ICON_text_dollor);
-    ChangeDisplay2Value(_Text_ChargeComplete,_ICON_text_ChargeComplete);
+	for (int i = 0 ; i <= 0x76 ; i+=2 ) {
+		if (i == 0x38)
+			ChangeDisplay2Value(0x1000+i,85);
+		else if (i == 0x36)
+			ChangeDisplay2Value(0x1000+i,75);
+		else if (i == 0x3A)
+			ChangeDisplay2Value(0x1000+i,99);
+		ChangeDisplay2Value(0x1000+i,1);
+	}
+	ChangeDisplay2Value(0x5000,1);
 }
 int main(void)
 {
@@ -1186,7 +1174,7 @@ int main(void)
 
         } else {
             UpdateLcmFunction(ShmDcCommonData,_port);
-
+            /*
             // Warning 處理
             if (curWarningCount != pSysWarning->WarningCount) {
                 changeWarningPriority = 0;
@@ -1235,7 +1223,7 @@ int main(void)
             usleep(10000); //*/
 
             ///*
-            ProcessPageInfo();
+            //ProcessPageInfo();
             GetCurrentPage();
             ChangeCurPage();
             usleep(10000);

+ 1 - 1
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.h

@@ -6,7 +6,7 @@
 
 //------------------------------------------------------------------------------
 
-#define RETURNIDLE_Timeout					10
+#define RETURNIDLE_Timeout					30
 #define DEFAULT_AC_INDEX                        (2)
 
 #define TIME_MAX_SEC                            (2592000) // 一個月,秒數