|
@@ -82,8 +82,8 @@ uint8_t bd0_2_status = 0;
|
|
|
uint8_t bd1_1_status = 0;
|
|
|
uint8_t bd1_2_status = 0;
|
|
|
|
|
|
-char *fwVersion = "V2.12.00.0000.00"; // Phihong version
|
|
|
-char* DebugVersion = "V2.12.04"; // Software debug version
|
|
|
+char *fwVersion = "V2.13.00.0000.00"; // Phihong version
|
|
|
+char* DebugVersion = "V2.13.00"; // Software debug version
|
|
|
//sqlite3 *localDb;
|
|
|
bool isDb_ready;
|
|
|
|
|
@@ -292,7 +292,7 @@ static void GetFirmwareVersion(void)
|
|
|
{
|
|
|
// Get CSU root file system version
|
|
|
sprintf((char *)pSysInfo->CsuRootFsFwRev, fwVersion);
|
|
|
-
|
|
|
+ sprintf((char*)ShmDcCommonData->DebugVersion, DebugVersion);
|
|
|
uint8_t count = 0, chademo = 0, ccs = 0, gb = 0;
|
|
|
for (uint8_t idx = 0; idx < 3; idx++) {
|
|
|
if (pSysConfig->ModelName[7 + idx] == 'J') {
|
|
@@ -2766,18 +2766,11 @@ void CreateTimeoutFork(void)
|
|
|
if (ShmDcCommonData->finalcost_flag[gunIndex] == FALSE) {
|
|
|
if (ShmDcCommonData->is_AutoStart[gunIndex] || ShmDcCommonData->is_RemoteStart[gunIndex]) {
|
|
|
ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
|
|
|
} else {
|
|
|
log_info("Not Get Final Cost");
|
|
|
ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
|
|
|
pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
- /*
|
|
|
- ShmDcCommonData->TransactionInfo[gunIndex].Amount = pDcChargingInfo->PresentChargedEnergy * ShmDcCommonData->ChargingRate;
|
|
|
- if (ShmDcCommonData->TransactionInfo[gunIndex].Amount < 1)
|
|
|
- ShmDcCommonData->TransactionInfo[gunIndex].Amount = 1;
|
|
|
- ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
|
|
|
- */
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4407,7 +4400,7 @@ int main(void)
|
|
|
// 讀卡邏輯
|
|
|
if (!ShmDcCommonData->TradeCancel && pSysInfo->CurGunSelected == gunIndex)
|
|
|
ScannerCardProcess(gunIndex);
|
|
|
- if (pSysInfo->SystemPage == _PAGE_SELECT_GUN) {
|
|
|
+ if (pSysInfo->SystemPage == _PAGE_SELECT_GUN || pSysInfo->SystemPage == _PAGE_IDLE) {
|
|
|
//ShmDcCommonData->LineStatus[gunIndex] = 0;
|
|
|
StopGunInfoTimeoutDet(gunIndex);
|
|
|
}
|
|
@@ -4858,29 +4851,32 @@ int main(void)
|
|
|
StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
|
|
|
}
|
|
|
}
|
|
|
+ if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
|
|
|
+ pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
+ break;
|
|
|
+ }
|
|
|
// Remote start
|
|
|
if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
|
|
|
- if (pDcChargingInfo->Replug_flag == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
- else {
|
|
|
- if (ShmDcCommonData->finalcost_flag[gunIndex]) {
|
|
|
+
|
|
|
+ if (ShmDcCommonData->finalcost_flag[gunIndex]) {
|
|
|
+ if (ShmDcCommonData->PayPass_flag[gunIndex]) {
|
|
|
pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
+ //log_info("_PAGE_COMPLETE");
|
|
|
} else {
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYING;
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
+ //log_info("_PAGE_PAYFAIL");
|
|
|
}
|
|
|
+ } else {
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYING;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
if (pSysInfo->CurGunSelected == gunIndex &&
|
|
|
pSysInfo->SystemPage != _PAGE_PAYING && pSysInfo->SystemPage != _PAGE_SENSING) {
|
|
|
- if (pDcChargingInfo->Replug_flag == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
- else {
|
|
|
- if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
- else
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
- }
|
|
|
+ if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
|
|
|
+ pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
+ else
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -4934,28 +4930,27 @@ int main(void)
|
|
|
StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
|
|
|
}
|
|
|
}
|
|
|
+ if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
|
|
|
+ pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
+ break;
|
|
|
+ }
|
|
|
// Remote start
|
|
|
if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
|
|
|
- if (pDcChargingInfo->Replug_flag == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
- else {
|
|
|
- if (ShmDcCommonData->finalcost_flag[gunIndex]) {
|
|
|
+ if (ShmDcCommonData->finalcost_flag[gunIndex]) {
|
|
|
+ if (ShmDcCommonData->PayPass_flag[gunIndex])
|
|
|
pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
- } else {
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYING;
|
|
|
- }
|
|
|
+ else
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
+ } else {
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYING;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING ) {
|
|
|
- if (pDcChargingInfo->Replug_flag == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_PLUGOUT;
|
|
|
- else {
|
|
|
- if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
|
|
|
- pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
- else
|
|
|
- pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
- }
|
|
|
+ if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
|
|
|
+ pSysInfo->SystemPage = _PAGE_COMPLETE;
|
|
|
+ else
|
|
|
+ pSysInfo->SystemPage = _PAGE_PAYFAIL;
|
|
|
}
|
|
|
|
|
|
break;
|