|
@@ -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.01.00.0000.00"; // Phihong version
|
|
|
-char* DebugVersion = "v2.01.00"; // Software debug version
|
|
|
+char *fwVersion = "V2.02.00.0000.00"; // Phihong version
|
|
|
+char* DebugVersion = "v2.02.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) {
|
|
@@ -2617,6 +2617,12 @@ void CreateTimeoutFork(void)
|
|
|
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;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -4270,7 +4276,6 @@ 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)
|
|
@@ -4499,8 +4504,11 @@ 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
|
|
|
|
|
@@ -4528,7 +4536,8 @@ CheckStatus:
|
|
|
if (pSysInfo->SystemPage == _PAGE_MAINTAIN) {
|
|
|
break;
|
|
|
}
|
|
|
- if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
|
|
|
+ if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE)
|
|
|
pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
else
|
|
@@ -4545,17 +4554,20 @@ 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) {
|
|
|
+ if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE &&
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
pSysInfo->SystemPage = _PAGE_EXIT;
|
|
|
break;
|
|
|
}
|
|
|
- if (pDcChargingInfo->ConnectorPlugIn == NO) {
|
|
|
+ if (pDcChargingInfo->ConnectorPlugIn == NO && ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
is_plugout[gunIndex] = TRUE;
|
|
|
StartGunInfoTimeoutDet(gunIndex, Timeout_PlugOutGun);
|
|
|
if (pSysInfo->CurGunSelected == gunIndex) {
|
|
@@ -4564,8 +4576,9 @@ CheckStatus:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
|
|
|
- if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE)
|
|
|
+ if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
+ if (ShmDcCommonData->PayPass_flag[pSysInfo->CurGunSelected] == TRUE )
|
|
|
pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
else
|
|
|
pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
@@ -4589,11 +4602,11 @@ CheckStatus:
|
|
|
ShmDcCommonData->PreAuth_Config = _CREDITCARD_CANCEL;
|
|
|
ShmDcCommonData->PreAuth_Result = 0;
|
|
|
} else {
|
|
|
- if(ShmDcCommonData->PayFinish[gunIndex] == FALSE) {
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYING;
|
|
|
- }
|
|
|
- ShmDcCommonData->StopCharge[gunIndex] = TRUE;
|
|
|
+ ShmDcCommonData->StopCharge[pSysInfo->CurGunSelected] = TRUE;
|
|
|
+ //StartGunInfoTimeoutDet(pSysInfo->CurGunSelected,Timeout_FinalCost);
|
|
|
}
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] = TRUE;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (pSysWarning->Level == WARN_LV_ER) {
|
|
@@ -4601,11 +4614,12 @@ CheckStatus:
|
|
|
|
|
|
continue;
|
|
|
}
|
|
|
- if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE) {
|
|
|
+ if (pSysInfo->CurGunSelected == gunIndex && is_plugout[gunIndex] == TRUE &&
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
pSysInfo->SystemPage = _PAGE_EXIT;
|
|
|
break;
|
|
|
}
|
|
|
- if (pDcChargingInfo->ConnectorPlugIn == NO) {
|
|
|
+ if (pDcChargingInfo->ConnectorPlugIn == NO && ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
is_plugout[gunIndex] = TRUE;
|
|
|
if (pDcChargingInfo->Replug_flag == TRUE) {
|
|
|
pSysInfo->SystemPage = _PAGE_SELECT_GUN;
|
|
@@ -4620,7 +4634,8 @@ CheckStatus:
|
|
|
//if (pSysInfo->SystemPage == _PAGE_PAYING)
|
|
|
// break;
|
|
|
|
|
|
- if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING) {
|
|
|
+ if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING &&
|
|
|
+ ShmDcCommonData->KeepComplete[gunIndex] == FALSE) {
|
|
|
if (pDcChargingInfo->Replug_flag == TRUE)
|
|
|
pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
else {
|