|
@@ -45,6 +45,9 @@ bool is_show = false;
|
|
|
uint8_t _everyPageRollChange;
|
|
|
uint8_t _btn_press = 0;
|
|
|
short _btn_press_id = 0;
|
|
|
+struct timeval returnIdleTimer;
|
|
|
+int _Text_Running_Count = 0;
|
|
|
+int Battery_Test = 0;
|
|
|
extern void UpdateLcmFunction(DcCommonInfo *ShmDcCommonData,int _lcmport);
|
|
|
//==========================================
|
|
|
// Open and Close RS232 and R/W
|
|
@@ -157,6 +160,7 @@ void CheckTouchPress(short id)
|
|
|
pSysInfo->SystemPage != _PAGE_PAY_MPAY_SUCCESS) ) {
|
|
|
log_info("Reset LCM to IDLE");
|
|
|
pSysInfo->SystemPage = _PAGE_AUTHORIZE;
|
|
|
+ gettimeofday(&returnIdleTimer, NULL);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -174,6 +178,7 @@ void CheckTouchPress(short id)
|
|
|
pSysInfo->SystemPage != _PAGE_PAY_MPAY_SUCCESS) ) {
|
|
|
log_info("Reset LCM to IDLE");
|
|
|
pSysInfo->SystemPage = _PAGE_AUTHORIZE;
|
|
|
+ gettimeofday(&returnIdleTimer, NULL);
|
|
|
}
|
|
|
}
|
|
|
pSysInfo->CurGunSelected = RIGHT_GUN_NUM;
|
|
@@ -247,10 +252,12 @@ void CheckLCMPressed()
|
|
|
// ********************** Test *******************
|
|
|
///*
|
|
|
case _PAGE_PRECHARGE:
|
|
|
+ /*
|
|
|
if ((i/100) %2 == 0)
|
|
|
- ChangeDisplay2Value(0x1080,i%100);
|
|
|
+ ChangeDisplay2Value(0x109A,i%100);
|
|
|
else
|
|
|
- ChangeDisplay2Value(0x1080,100-(i%100));
|
|
|
+ ChangeDisplay2Value(0x109A,100-(i%100));
|
|
|
+ */
|
|
|
break;
|
|
|
case _PAGE_CHARGING:
|
|
|
pDcChargingInfo->PresentChargingVoltage = i;
|
|
@@ -273,15 +280,14 @@ void CheckLCMPressed()
|
|
|
///*
|
|
|
i++;
|
|
|
if (i == 600 ) {
|
|
|
- index >= 6 ? index = 1 : index++;
|
|
|
- pSysInfo->SystemPage = index;
|
|
|
+ index >= 22 ? index = 1 : index++;
|
|
|
+ pSysInfo->SystemPage = 22;
|
|
|
i = 0;
|
|
|
+ /*
|
|
|
if (pSysInfo->SystemPage == _PAGE_PRECHARGE)
|
|
|
gettimeofday(&pDcChargingInfo->PreChargeTimer, NULL);
|
|
|
- pSysWarning->WarningCount = 3;
|
|
|
- memcpy(&pSysWarning->WarningCode[0][0],"111111",7);
|
|
|
- memcpy(&pSysWarning->WarningCode[1][0],"222222",7);
|
|
|
- memcpy(&pSysWarning->WarningCode[2][0],"333333",7);
|
|
|
+ */
|
|
|
+
|
|
|
|
|
|
}//*/
|
|
|
|
|
@@ -540,6 +546,7 @@ void ChangeCurPage()
|
|
|
if (_currentPage != pSysInfo->PageIndex) {
|
|
|
switch (pSysInfo->SystemPage) {
|
|
|
case _PAGE_AUTHORIZE:
|
|
|
+ gettimeofday(&returnIdleTimer, NULL);
|
|
|
break;
|
|
|
case _PAGE_PLUGIN:
|
|
|
break;
|
|
@@ -551,7 +558,6 @@ void ChangeCurPage()
|
|
|
break;
|
|
|
}
|
|
|
_currentPage = pSysInfo->PageIndex;
|
|
|
-
|
|
|
ChangeToOtherPage(pSysInfo->PageIndex);
|
|
|
}
|
|
|
}
|
|
@@ -864,58 +870,21 @@ 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);
|
|
|
+ }
|
|
|
break;
|
|
|
case _PAGE_PLUGIN:
|
|
|
+ _Text_Running_Count = 0;
|
|
|
break;
|
|
|
case _PAGE_PRECHARGE:
|
|
|
- precharg_time = (GetPreChargeTimeoutValue(pDcChargingInfo->PreChargeTimer)/1) / uSEC_VAL;
|
|
|
- if (precharg_time > PRECHARGING_TTIMEOUT)
|
|
|
- precharg_time = PRECHARGING_TTIMEOUT;
|
|
|
- ChangeTimeValue(PRECHARGING_TTIMEOUT- precharg_time);
|
|
|
-
|
|
|
- if (pDcChargingInfo->SystemStatus >= S_REASSIGN_CHECK &&
|
|
|
- pDcChargingInfo->SystemStatus <= S_PREPARING_FOR_EV) {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_on);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_off);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_off);
|
|
|
- } else if (pDcChargingInfo->SystemStatus == S_PREPARING_FOR_EVSE) {
|
|
|
- // Detect GFD finish and into precharge mode
|
|
|
- if (pDcChargingInfo->Type == _Type_Chademo || pDcChargingInfo->Type == _Type_GB) {
|
|
|
- if (pDcChargingInfo->_SaftyDetect == FALSE ) {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_off);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_on);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_off);
|
|
|
- if (pDcChargingInfo->EvBatterytargetVoltage == 0)
|
|
|
- pDcChargingInfo->_SaftyDetect = TRUE;
|
|
|
- } else {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_off);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_off);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_on);
|
|
|
- }
|
|
|
- } else {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_off);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_on);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_off);
|
|
|
- }
|
|
|
- } else if (pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST0 ||
|
|
|
- pDcChargingInfo->SystemStatus == S_CCS_PRECHARGE_ST1) {
|
|
|
- if (pDcChargingInfo->_SaftyDetect == FALSE ) {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_off);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_on);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_off);
|
|
|
- if (pDcChargingInfo->EvBatterytargetVoltage == 0)
|
|
|
- pDcChargingInfo->_SaftyDetect = TRUE;
|
|
|
- } else {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Communication_off);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_SaftyDetect_off);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_PrepareCharge_on);
|
|
|
- }
|
|
|
- } else {
|
|
|
- ChangeDisplay2Value(_Communication_Status, _ICON_Empty);
|
|
|
- ChangeDisplay2Value(_SaftyDetect_Status, _ICON_Empty);
|
|
|
- ChangeDisplay2Value(_PreCharge_Status, _ICON_Empty);
|
|
|
- }
|
|
|
-
|
|
|
+ if ((_Text_Running_Count/100) %2 == 0)
|
|
|
+ ChangeDisplay2Value(_Text_PrepareToCharge,_Text_Running_Count%100);
|
|
|
+ else
|
|
|
+ ChangeDisplay2Value(_Text_PrepareToCharge,100-(_Text_Running_Count%100));
|
|
|
+ _Text_Running_Count >= 200 ? _Text_Running_Count = 0 : _Text_Running_Count++;
|
|
|
break;
|
|
|
case _PAGE_CHARGING:
|
|
|
if (pDcChargingInfo->PresentChargingVoltage >= 0 &&
|
|
@@ -964,6 +933,10 @@ void ProcessPageInfo()
|
|
|
break;
|
|
|
case _PAGE_REFUND_SENSEING:
|
|
|
break;
|
|
|
+ case _PAGE_PLUGOUT:
|
|
|
+ ChangeDisplay2Value(0x20B0, Battery_Test);
|
|
|
+ Battery_Test >= 100 ? Battery_Test = 0 : Battery_Test++;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -979,7 +952,7 @@ void ChangeWarningFunc()
|
|
|
//log_info("WarningCount = %d ", pSysWarning->WarningCount);
|
|
|
//#if !defined DD360 && !defined DD360Audi && !defined DD360ComBox
|
|
|
for (i = 0; (i + pSysWarning->PageIndex * 5) < pSysWarning->WarningCount; i++) {
|
|
|
- log_info("Warming Code[%d]:%s",i,&pSysWarning->WarningCode[i][0]);
|
|
|
+ //log_info("Warming Code[%d]:%s",i,&pSysWarning->WarningCode[i][0]);
|
|
|
memset(cmd, 0x00, sizeof(cmd));
|
|
|
if ((i) >= 5) {
|
|
|
break;
|