|
@@ -27,21 +27,20 @@
|
|
#include <ctype.h>
|
|
#include <ctype.h>
|
|
#include <ifaddrs.h>
|
|
#include <ifaddrs.h>
|
|
#include <math.h>
|
|
#include <math.h>
|
|
-#include "./Define/define.h"
|
|
|
|
#include <stdbool.h>
|
|
#include <stdbool.h>
|
|
#include <dirent.h>
|
|
#include <dirent.h>
|
|
|
|
|
|
-#include "Config.h"
|
|
|
|
|
|
+#include "../Config.h"
|
|
#include "main.h"
|
|
#include "main.h"
|
|
-#include "common.h"
|
|
|
|
-#include "timeout.h"
|
|
|
|
|
|
+#include "../common.h"
|
|
|
|
+#include "../timeout.h"
|
|
|
|
|
|
-#include "./Log/log.h"
|
|
|
|
-#include "./Define/define.h"
|
|
|
|
-#include "./ShareMemory/shmMem.h"
|
|
|
|
|
|
+#include "../Log/log.h"
|
|
|
|
+#include "../Define/define.h"
|
|
|
|
+#include "../ShareMemory/shmMem.h"
|
|
|
|
|
|
#if defined DD360 ||defined DD360Audi || defined DD360ComBox
|
|
#if defined DD360 ||defined DD360Audi || defined DD360ComBox
|
|
-#include "./SelectGun/SelectGun.h"
|
|
|
|
|
|
+#include "../SelectGun/SelectGun.h"
|
|
#endif //defined DD360Audi
|
|
#endif //defined DD360Audi
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
//------------------------------------------------------------------------------
|
|
@@ -81,7 +80,7 @@ struct timeb startChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
struct timeb endChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
struct timeb endChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
|
|
|
#if defined DD360 ||defined DD360Audi || defined DD360ComBox
|
|
#if defined DD360 ||defined DD360Audi || defined DD360ComBox
|
|
-static SelectGunInfo *gAudiCustInfo = NULL; //Jerry add
|
|
|
|
|
|
+static SelectGunInfo *ShmSelectGunInfo = NULL; //Jerry add
|
|
#endif //defined DD360Audi
|
|
#endif //defined DD360Audi
|
|
static EvBoardErrMsg gEvBoardErr = {0};
|
|
static EvBoardErrMsg gEvBoardErr = {0};
|
|
|
|
|
|
@@ -198,14 +197,14 @@ void destroySelGun(uint8_t curGun)
|
|
|
|
|
|
//for status timeout
|
|
//for status timeout
|
|
if (curGun == DESTROY_ALL_SEL) {
|
|
if (curGun == DESTROY_ALL_SEL) {
|
|
- gAudiCustInfo->SelGunInfo.RightGun = SEL_GUN_RELEASE;
|
|
|
|
- gAudiCustInfo->SelGunInfo.LeftGun = SEL_GUN_RELEASE;
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun = SEL_GUN_RELEASE;
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun = SEL_GUN_RELEASE;
|
|
log_info("destroy all gun = %d, %d\r\n",
|
|
log_info("destroy all gun = %d, %d\r\n",
|
|
- gAudiCustInfo->SelGunInfo.LeftGun,
|
|
|
|
- gAudiCustInfo->SelGunInfo.RightGun);
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun,
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun);
|
|
for (i = 0; i < totalGun; i++) {
|
|
for (i = 0; i < totalGun; i++) {
|
|
StopGunInfoTimeoutDet(i);
|
|
StopGunInfoTimeoutDet(i);
|
|
- memset(&gAudiCustInfo->PricesInfo[i], 0, sizeof(PricesInfo));
|
|
|
|
|
|
+ memset(&ShmSelectGunInfo->PricesInfo[i], 0, sizeof(PricesInfo));
|
|
}
|
|
}
|
|
pSysInfo->CurGunSelected = 0;
|
|
pSysInfo->CurGunSelected = 0;
|
|
strcpy((char *)pSysConfig->UserId, "");
|
|
strcpy((char *)pSysConfig->UserId, "");
|
|
@@ -214,12 +213,12 @@ void destroySelGun(uint8_t curGun)
|
|
}
|
|
}
|
|
|
|
|
|
//for charging timeout or complete
|
|
//for charging timeout or complete
|
|
- if ((curGun == LEFT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.LeftGun != SEL_GUN_RELEASE)) {
|
|
|
|
- if (gAudiCustInfo->SelGunInfo.LeftGun == SEL_GUN_CONFIRM ||
|
|
|
|
- gAudiCustInfo->SelGunInfo.LeftGun == SEL_GUN_ATHOR) {
|
|
|
|
|
|
+ if ((curGun == LEFT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.LeftGun != SEL_GUN_RELEASE)) {
|
|
|
|
+ if (ShmSelectGunInfo->SelGunInfo.LeftGun == SEL_GUN_CONFIRM ||
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun == SEL_GUN_ATHOR) {
|
|
changeLcmPage(_LCM_SELECT_GUN);
|
|
changeLcmPage(_LCM_SELECT_GUN);
|
|
}
|
|
}
|
|
- gAudiCustInfo->SelGunInfo.LeftGun = SEL_GUN_RELEASE;
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun = SEL_GUN_RELEASE;
|
|
StopGunInfoTimeoutDet(LEFT_GUN_NUM);
|
|
StopGunInfoTimeoutDet(LEFT_GUN_NUM);
|
|
if (ShmOCPP16Data->SpMsg.bits.AuthorizeConf != NO) {
|
|
if (ShmOCPP16Data->SpMsg.bits.AuthorizeConf != NO) {
|
|
ClearAuthorizedFlag();
|
|
ClearAuthorizedFlag();
|
|
@@ -228,17 +227,17 @@ void destroySelGun(uint8_t curGun)
|
|
log_info("destroy left gun, cur page = %d\r\n", getCurLcmPage());
|
|
log_info("destroy left gun, cur page = %d\r\n", getCurLcmPage());
|
|
if (getCurLcmPage() == pSysInfo->SystemPage) {
|
|
if (getCurLcmPage() == pSysInfo->SystemPage) {
|
|
log_info("clear left balance\r\n");
|
|
log_info("clear left balance\r\n");
|
|
- memset(&gAudiCustInfo->PricesInfo[curGun], 0, sizeof(PricesInfo));
|
|
|
|
- gAudiCustInfo->PricesInfo[curGun].Balance = FAIL_BALANCE_PRICES;
|
|
|
|
|
|
+ memset(&ShmSelectGunInfo->PricesInfo[curGun], 0, sizeof(PricesInfo));
|
|
|
|
+ ShmSelectGunInfo->PricesInfo[curGun].Balance = FAIL_BALANCE_PRICES;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if ((curGun == RIGHT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.RightGun != SEL_GUN_RELEASE)) {
|
|
|
|
- if (gAudiCustInfo->SelGunInfo.RightGun == SEL_GUN_CONFIRM ||
|
|
|
|
- gAudiCustInfo->SelGunInfo.RightGun == SEL_GUN_ATHOR) {
|
|
|
|
|
|
+ if ((curGun == RIGHT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.RightGun != SEL_GUN_RELEASE)) {
|
|
|
|
+ if (ShmSelectGunInfo->SelGunInfo.RightGun == SEL_GUN_CONFIRM ||
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun == SEL_GUN_ATHOR) {
|
|
changeLcmPage(_LCM_SELECT_GUN);
|
|
changeLcmPage(_LCM_SELECT_GUN);
|
|
}
|
|
}
|
|
- gAudiCustInfo->SelGunInfo.RightGun = SEL_GUN_RELEASE;
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun = SEL_GUN_RELEASE;
|
|
StopGunInfoTimeoutDet(RIGHT_GUN_NUM);
|
|
StopGunInfoTimeoutDet(RIGHT_GUN_NUM);
|
|
if (ShmOCPP16Data->SpMsg.bits.AuthorizeConf != NO) {
|
|
if (ShmOCPP16Data->SpMsg.bits.AuthorizeConf != NO) {
|
|
ClearAuthorizedFlag();
|
|
ClearAuthorizedFlag();
|
|
@@ -247,8 +246,8 @@ void destroySelGun(uint8_t curGun)
|
|
log_info("destroy right gun, cur page = %d\r\n", getCurLcmPage());
|
|
log_info("destroy right gun, cur page = %d\r\n", getCurLcmPage());
|
|
if (getCurLcmPage() == pSysInfo->SystemPage) {
|
|
if (getCurLcmPage() == pSysInfo->SystemPage) {
|
|
log_info("clear right balance\r\n");
|
|
log_info("clear right balance\r\n");
|
|
- memset(&gAudiCustInfo->PricesInfo[curGun], 0, sizeof(PricesInfo));
|
|
|
|
- gAudiCustInfo->PricesInfo[curGun].Balance = FAIL_BALANCE_PRICES;
|
|
|
|
|
|
+ memset(&ShmSelectGunInfo->PricesInfo[curGun], 0, sizeof(PricesInfo));
|
|
|
|
+ ShmSelectGunInfo->PricesInfo[curGun].Balance = FAIL_BALANCE_PRICES;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -259,7 +258,7 @@ static int waitRightGunPlugIt(uint8_t curGun)
|
|
return;
|
|
return;
|
|
#endif //!defined DD360Audi
|
|
#endif //!defined DD360Audi
|
|
|
|
|
|
- if ((curGun == RIGHT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.RightGun == SEL_GUN_ATHOR)) {
|
|
|
|
|
|
+ if ((curGun == RIGHT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.RightGun == SEL_GUN_ATHOR)) {
|
|
return PASS;
|
|
return PASS;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -272,7 +271,7 @@ static int waitLeftGunPlugIt(uint8_t curGun)
|
|
return;
|
|
return;
|
|
#endif //!defined DD360Audi
|
|
#endif //!defined DD360Audi
|
|
|
|
|
|
- if ((curGun == LEFT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.LeftGun == SEL_GUN_ATHOR)) {
|
|
|
|
|
|
+ if ((curGun == LEFT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.LeftGun == SEL_GUN_ATHOR)) {
|
|
return PASS;
|
|
return PASS;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -285,12 +284,12 @@ void setSelGunWaitToAuthor(uint8_t curSel)
|
|
return;
|
|
return;
|
|
#endif //!defined DD360Audi
|
|
#endif //!defined DD360Audi
|
|
|
|
|
|
- if (curSel == LEFT_GUN_NUM && gAudiCustInfo->SelGunInfo.LeftGun == SEL_GUN_CONFIRM) {
|
|
|
|
- gAudiCustInfo->SelGunInfo.LeftGun = SEL_GUN_ATHOR;
|
|
|
|
|
|
+ if (curSel == LEFT_GUN_NUM && ShmSelectGunInfo->SelGunInfo.LeftGun == SEL_GUN_CONFIRM) {
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun = SEL_GUN_ATHOR;
|
|
//printf("setSelGunWaitToAuthor left\r\n");
|
|
//printf("setSelGunWaitToAuthor left\r\n");
|
|
StopGunInfoTimeoutDet(curSel);
|
|
StopGunInfoTimeoutDet(curSel);
|
|
- } else if (curSel == RIGHT_GUN_NUM && gAudiCustInfo->SelGunInfo.RightGun == SEL_GUN_CONFIRM) {
|
|
|
|
- gAudiCustInfo->SelGunInfo.RightGun = SEL_GUN_ATHOR;
|
|
|
|
|
|
+ } else if (curSel == RIGHT_GUN_NUM && ShmSelectGunInfo->SelGunInfo.RightGun == SEL_GUN_CONFIRM) {
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun = SEL_GUN_ATHOR;
|
|
//printf("setSelGunWaitToAuthor right\r\n");
|
|
//printf("setSelGunWaitToAuthor right\r\n");
|
|
StopGunInfoTimeoutDet(curSel);
|
|
StopGunInfoTimeoutDet(curSel);
|
|
}
|
|
}
|
|
@@ -302,8 +301,8 @@ int getConfirmSelectedGun(uint8_t curSel)
|
|
return;
|
|
return;
|
|
#endif //!defined DD360Audi
|
|
#endif //!defined DD360Audi
|
|
|
|
|
|
- if (((curSel == LEFT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.LeftGun >= SEL_GUN_CONFIRM)) ||
|
|
|
|
- ((curSel == RIGHT_GUN_NUM) && (gAudiCustInfo->SelGunInfo.RightGun >= SEL_GUN_CONFIRM))) {
|
|
|
|
|
|
+ if (((curSel == LEFT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.LeftGun >= SEL_GUN_CONFIRM)) ||
|
|
|
|
+ ((curSel == RIGHT_GUN_NUM) && (ShmSelectGunInfo->SelGunInfo.RightGun >= SEL_GUN_CONFIRM))) {
|
|
return PASS;
|
|
return PASS;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -317,11 +316,11 @@ void confirmSelGun(uint8_t selGun)
|
|
#endif //!defined DD360Audi
|
|
#endif //!defined DD360Audi
|
|
|
|
|
|
if (selGun == LEFT_GUN_NUM) {
|
|
if (selGun == LEFT_GUN_NUM) {
|
|
- gAudiCustInfo->SelGunInfo.LeftGun = SEL_GUN_CONFIRM;
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.LeftGun = SEL_GUN_CONFIRM;
|
|
StopGunInfoTimeoutDet(selGun);
|
|
StopGunInfoTimeoutDet(selGun);
|
|
//printf("confirmSelGun left\r\n");
|
|
//printf("confirmSelGun left\r\n");
|
|
} else if (selGun == RIGHT_GUN_NUM) {
|
|
} else if (selGun == RIGHT_GUN_NUM) {
|
|
- gAudiCustInfo->SelGunInfo.RightGun = SEL_GUN_CONFIRM;
|
|
|
|
|
|
+ ShmSelectGunInfo->SelGunInfo.RightGun = SEL_GUN_CONFIRM;
|
|
StopGunInfoTimeoutDet(selGun);
|
|
StopGunInfoTimeoutDet(selGun);
|
|
//printf("confirmSelGun right\r\n");
|
|
//printf("confirmSelGun right\r\n");
|
|
}
|
|
}
|
|
@@ -2555,7 +2554,7 @@ void _AuthorizedTimeout()
|
|
//isCardScan = false;
|
|
//isCardScan = false;
|
|
SetIsCardScan(false);
|
|
SetIsCardScan(false);
|
|
|
|
|
|
- //gAudiCustInfo->PricesInfo[pSysInfo->CurGunSelected].Balance = 0.0; //Jerry add
|
|
|
|
|
|
+ //ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance = 0.0; //Jerry add
|
|
pSysInfo->SystemPage = _LCM_AUTHORIZ_FAIL;
|
|
pSysInfo->SystemPage = _LCM_AUTHORIZ_FAIL;
|
|
//ChangeLcmByIndex(_LCM_AUTHORIZ_FAIL);
|
|
//ChangeLcmByIndex(_LCM_AUTHORIZ_FAIL);
|
|
strcpy((char *)pSysConfig->UserId, "");
|
|
strcpy((char *)pSysConfig->UserId, "");
|
|
@@ -3879,7 +3878,7 @@ void ScannerCardProcess()
|
|
#if !defined DD360 && !defined DD360Audi && !defined DD360ComBox
|
|
#if !defined DD360 && !defined DD360Audi && !defined DD360ComBox
|
|
|| pSysConfig->OfflinePolicy == _OFFLINE_POLICY_FREE_CHARGING
|
|
|| pSysConfig->OfflinePolicy == _OFFLINE_POLICY_FREE_CHARGING
|
|
#else
|
|
#else
|
|
- && gAudiCustInfo->PricesInfo[pSysInfo->CurGunSelected].Balance != FAIL_BALANCE_PRICES
|
|
|
|
|
|
+ && ShmSelectGunInfo->PricesInfo[pSysInfo->CurGunSelected].Balance != FAIL_BALANCE_PRICES
|
|
#endif //!defined DD360 && !defined DD360Audi
|
|
#endif //!defined DD360 && !defined DD360Audi
|
|
) {
|
|
) {
|
|
StopSystemTimeoutDet();
|
|
StopSystemTimeoutDet();
|
|
@@ -4691,8 +4690,8 @@ void StopGunInfoTimeoutDet(uint8_t gunIndex)
|
|
void CheckConnectionTimeout(void)
|
|
void CheckConnectionTimeout(void)
|
|
{
|
|
{
|
|
#if defined DD360 || defined DD360Audi || defined DD360ComBox
|
|
#if defined DD360 || defined DD360Audi || defined DD360ComBox
|
|
- if (gAudiCustInfo->RemoteSetup.ConnectionTimeout != 0) { //Jerry add
|
|
|
|
- _connectionTimeout = gAudiCustInfo->RemoteSetup.ConnectionTimeout;
|
|
|
|
|
|
+ if (ShmSelectGunInfo->RemoteSetup.ConnectionTimeout != 0) { //Jerry add
|
|
|
|
+ _connectionTimeout = ShmSelectGunInfo->RemoteSetup.ConnectionTimeout;
|
|
} else {
|
|
} else {
|
|
_connectionTimeout = CONN_PLUG_TIME_OUT;
|
|
_connectionTimeout = CONN_PLUG_TIME_OUT;
|
|
}
|
|
}
|
|
@@ -4746,8 +4745,8 @@ void CreateTimeoutFork()
|
|
_AuthorizedTimeout();
|
|
_AuthorizedTimeout();
|
|
StopSystemTimeoutDet();
|
|
StopSystemTimeoutDet();
|
|
destroySelGun(pSysInfo->CurGunSelected);
|
|
destroySelGun(pSysInfo->CurGunSelected);
|
|
- if (gAudiCustInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] == YES) { //DoComm no ask cabinet balance
|
|
|
|
- gAudiCustInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] = NO;
|
|
|
|
|
|
+ if (ShmSelectGunInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] == YES) { //DoComm no ask cabinet balance
|
|
|
|
+ ShmSelectGunInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] = NO;
|
|
pAlarmCode->AlarmEvents.bits.DisconnectedFromDo = ABNORMAL;
|
|
pAlarmCode->AlarmEvents.bits.DisconnectedFromDo = ABNORMAL;
|
|
log_error("Author timeout restart DoComm\r\n");
|
|
log_error("Author timeout restart DoComm\r\n");
|
|
system("killall Module_DoComm");
|
|
system("killall Module_DoComm");
|
|
@@ -4762,8 +4761,8 @@ void CreateTimeoutFork()
|
|
_AutoReturnTimeout();
|
|
_AutoReturnTimeout();
|
|
StopSystemTimeoutDet();
|
|
StopSystemTimeoutDet();
|
|
destroySelGun(pSysInfo->CurGunSelected);
|
|
destroySelGun(pSysInfo->CurGunSelected);
|
|
- if (gAudiCustInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] == YES) { //DoComm no ask cabinet balance
|
|
|
|
- gAudiCustInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] = NO;
|
|
|
|
|
|
+ if (ShmSelectGunInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] == YES) { //DoComm no ask cabinet balance
|
|
|
|
+ ShmSelectGunInfo->AuthorStateFromCabinet[pSysInfo->CurGunSelected] = NO;
|
|
pAlarmCode->AlarmEvents.bits.DisconnectedFromDo = ABNORMAL;
|
|
pAlarmCode->AlarmEvents.bits.DisconnectedFromDo = ABNORMAL;
|
|
log_error("Author timeout restart DoComm\r\n");
|
|
log_error("Author timeout restart DoComm\r\n");
|
|
system("killall Module_DoComm");
|
|
system("killall Module_DoComm");
|
|
@@ -5159,9 +5158,9 @@ bool WifiScheduleStop(uint8_t gunIndex)
|
|
|
|
|
|
void OcppRemoteStartChk()
|
|
void OcppRemoteStartChk()
|
|
{
|
|
{
|
|
- if (pSysConfig->OfflinePolicy == _OFFLINE_POLICY_NO_CHARGING)
|
|
|
|
- {}
|
|
|
|
- else if (!isDetectPlugin()) {
|
|
|
|
|
|
+ if (pSysConfig->OfflinePolicy == _OFFLINE_POLICY_NO_CHARGING) {
|
|
|
|
+
|
|
|
|
+ } else if (!isDetectPlugin()) {
|
|
// 如果有 AC 槍,則固定是第 2 把槍,所以索引固定為 1
|
|
// 如果有 AC 槍,則固定是第 2 把槍,所以索引固定為 1
|
|
uint8_t acDirIndex = pSysConfig->AcConnectorCount;
|
|
uint8_t acDirIndex = pSysConfig->AcConnectorCount;
|
|
|
|
|
|
@@ -5856,6 +5855,7 @@ void CheckTask()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
void InitialDHCP()
|
|
void InitialDHCP()
|
|
{
|
|
{
|
|
char tmpbuf[256] = {0};
|
|
char tmpbuf[256] = {0};
|
|
@@ -5865,6 +5865,7 @@ void InitialDHCP()
|
|
pSysConfig->SystemId);
|
|
pSysConfig->SystemId);
|
|
system(tmpbuf);
|
|
system(tmpbuf);
|
|
}
|
|
}
|
|
|
|
+*/
|
|
|
|
|
|
//==========================================
|
|
//==========================================
|
|
// Check Smart Charging Profile
|
|
// Check Smart Charging Profile
|
|
@@ -5981,14 +5982,20 @@ void CheckReturnToChargingConn()
|
|
|
|
|
|
// 如果選的 DC 槍在充電~ 則 DC 槍不改變
|
|
// 如果選的 DC 槍在充電~ 則 DC 槍不改變
|
|
if (count == pSysInfo->CurGunSelected) {
|
|
if (count == pSysInfo->CurGunSelected) {
|
|
- if ((pDcChargingInfo->SystemStatus >= S_REASSIGN_CHECK && pDcChargingInfo->SystemStatus <= S_COMPLETE) ||
|
|
|
|
- (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 && pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)) {
|
|
|
|
|
|
+ if ((pDcChargingInfo->SystemStatus >= S_REASSIGN_CHECK &&
|
|
|
|
+ pDcChargingInfo->SystemStatus <= S_COMPLETE) ||
|
|
|
|
+ (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
|
|
+ pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)
|
|
|
|
+ ) {
|
|
isReturnTimeout = false;
|
|
isReturnTimeout = false;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
} else if (count != pSysInfo->CurGunSelected) {
|
|
} else if (count != pSysInfo->CurGunSelected) {
|
|
- if ((pDcChargingInfo->SystemStatus >= S_REASSIGN_CHECK && pDcChargingInfo->SystemStatus <= S_COMPLETE) ||
|
|
|
|
- (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 && pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)) {
|
|
|
|
|
|
+ if ((pDcChargingInfo->SystemStatus >= S_REASSIGN_CHECK &&
|
|
|
|
+ pDcChargingInfo->SystemStatus <= S_COMPLETE) ||
|
|
|
|
+ (pDcChargingInfo->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
|
|
|
|
+ pDcChargingInfo->SystemStatus <= S_CCS_PRECHARGE_ST1)
|
|
|
|
+ ) {
|
|
isReturnTimeout = true;
|
|
isReturnTimeout = true;
|
|
StartSystemTimeoutDet(Timeout_ReturnToChargingGunDet);
|
|
StartSystemTimeoutDet(Timeout_ReturnToChargingGunDet);
|
|
}
|
|
}
|
|
@@ -6099,15 +6106,15 @@ void AdjustChargerCurrent()
|
|
pSysConfig->MaxChargingCurrent = 0;
|
|
pSysConfig->MaxChargingCurrent = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- log_info ("PSU : MaxChargingPower = %d, MaxChargingCurrent = %d",
|
|
|
|
- ShmPsuData->SystemAvailablePower / 10,
|
|
|
|
- ShmPsuData->SystemAvailableCurrent / 10
|
|
|
|
- );
|
|
|
|
|
|
+ log_info("PSU : MaxChargingPower = %d, MaxChargingCurrent = %d",
|
|
|
|
+ ShmPsuData->SystemAvailablePower / 10,
|
|
|
|
+ ShmPsuData->SystemAvailableCurrent / 10
|
|
|
|
+ );
|
|
|
|
|
|
- log_info ("Config : ChargingPower = %d, ChargingCurrent = %d",
|
|
|
|
- pSysConfig->MaxChargingPower,
|
|
|
|
- pSysConfig->MaxChargingCurrent
|
|
|
|
- );
|
|
|
|
|
|
+ log_info("Config : ChargingPower = %d, ChargingCurrent = %d",
|
|
|
|
+ pSysConfig->MaxChargingPower,
|
|
|
|
+ pSysConfig->MaxChargingCurrent
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
void ResetDetAlarmStatus(uint8_t gun)
|
|
void ResetDetAlarmStatus(uint8_t gun)
|
|
@@ -6299,7 +6306,7 @@ int main(void)
|
|
ShmLedModuleData = (struct LedModuleData *)GetShmLedModuleData();
|
|
ShmLedModuleData = (struct LedModuleData *)GetShmLedModuleData();
|
|
ShmOCPP16Data = (struct OCPP16Data *)GetShmOCPP16Data();
|
|
ShmOCPP16Data = (struct OCPP16Data *)GetShmOCPP16Data();
|
|
ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
|
|
ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
|
|
- gAudiCustInfo = (SelectGunInfo *)GetShmSelectGunInfo();
|
|
|
|
|
|
+ ShmSelectGunInfo = (SelectGunInfo *)GetShmSelectGunInfo();
|
|
|
|
|
|
log_info(" **************** FileSystem Boot up ***************\n");
|
|
log_info(" **************** FileSystem Boot up ***************\n");
|
|
if (!InitialSystemDefaultConfig()) {
|
|
if (!InitialSystemDefaultConfig()) {
|
|
@@ -6506,12 +6513,12 @@ int main(void)
|
|
strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "");
|
|
strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "");
|
|
|
|
|
|
//Jerry add
|
|
//Jerry add
|
|
- memset(&gAudiCustInfo->PricesInfo[gun_index], 0, sizeof(PricesInfo));
|
|
|
|
- gAudiCustInfo->PricesInfo[gun_index].Balance = FAIL_BALANCE_PRICES;
|
|
|
|
|
|
+ memset(&ShmSelectGunInfo->PricesInfo[gun_index], 0, sizeof(PricesInfo));
|
|
|
|
+ ShmSelectGunInfo->PricesInfo[gun_index].Balance = FAIL_BALANCE_PRICES;
|
|
destroySelGun(gun_index);
|
|
destroySelGun(gun_index);
|
|
ResetDetAlarmStatus(gun_index); //recovery OVP status code
|
|
ResetDetAlarmStatus(gun_index); //recovery OVP status code
|
|
- if (gAudiCustInfo->AuthorStateFromCabinet[gun_index] == YES) {
|
|
|
|
- gAudiCustInfo->AuthorStateFromCabinet[gun_index] = NO;
|
|
|
|
|
|
+ if (ShmSelectGunInfo->AuthorStateFromCabinet[gun_index] == YES) {
|
|
|
|
+ ShmSelectGunInfo->AuthorStateFromCabinet[gun_index] = NO;
|
|
}
|
|
}
|
|
//strcpy((char *)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode, "");
|
|
//strcpy((char *)ShmOCPP16Data->StatusNotification[gun_index].VendorErrorCode, "");
|
|
}
|
|
}
|