|
@@ -1589,7 +1589,6 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
|
|
|
DEBUG_ERROR_MSG("write /dev/mtdblock10 NG\r\n");
|
|
|
result = FAIL;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1747,11 +1746,11 @@ void DisplayChargingInfo()
|
|
|
{
|
|
|
if (chargingInfo[i]->SystemStatus != S_IDLE &&
|
|
|
chargingInfo[i]->SystemStatus != S_RESERVATION)
|
|
|
- {
|
|
|
- ChangeGunSelectByIndex(i);
|
|
|
+ {
|
|
|
+ ChangeGunSelectByIndex(i);
|
|
|
return;
|
|
|
- }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
if (ShmSysConfigAndInfo->SysConfig.AcConnectorCount > 0 &&
|
|
|
ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc == NO_DEFINE &&
|
|
@@ -1956,7 +1955,7 @@ void ReleaseAlarmCode(byte gunIndex)
|
|
|
isCleanCheck = true;
|
|
|
}
|
|
|
else if (strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "012289", 6) == EQUAL &&
|
|
|
- ShmStatusCodeData->AlarmCode.AlarmEvents.bits.ChademoOutputUVPFail == YES)
|
|
|
+ ShmStatusCodeData->AlarmCode.AlarmEvents.bits.ChademoOutputUVPFail == YES)
|
|
|
{
|
|
|
memcpy(code, "012289", 6);
|
|
|
memcpy(chargingInfo[gunIndex]->ConnectorAlarmCode, "", 6);
|
|
@@ -1977,7 +1976,7 @@ void ReleaseAlarmCode(byte gunIndex)
|
|
|
isCleanCheck = true;
|
|
|
}
|
|
|
else if (strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "012290", 6) == EQUAL &&
|
|
|
- ShmStatusCodeData->AlarmCode.AlarmEvents.bits.GbtOutputUVPFail == YES)
|
|
|
+ ShmStatusCodeData->AlarmCode.AlarmEvents.bits.GbtOutputUVPFail == YES)
|
|
|
{
|
|
|
memcpy(code, "012290", 6);
|
|
|
memcpy(chargingInfo[gunIndex]->ConnectorAlarmCode, "", 6);
|
|
@@ -1998,7 +1997,7 @@ void ReleaseAlarmCode(byte gunIndex)
|
|
|
isCleanCheck = true;
|
|
|
}
|
|
|
else if (strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "012288", 6) == EQUAL &&
|
|
|
- ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CcsOutputUVPFail == YES)
|
|
|
+ ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CcsOutputUVPFail == YES)
|
|
|
{
|
|
|
memcpy(code, "012288", 6);
|
|
|
memcpy(chargingInfo[gunIndex]->ConnectorAlarmCode, "", 6);
|
|
@@ -2237,39 +2236,39 @@ void ChkPrimaryStatus()
|
|
|
{
|
|
|
switch(ac_chargingInfo[0]->SystemStatus)
|
|
|
{
|
|
|
- case S_IDLE:
|
|
|
- {
|
|
|
- if(isDetectPlugin())
|
|
|
+ case S_IDLE:
|
|
|
{
|
|
|
- _DetectPlugInTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
+ if(isDetectPlugin())
|
|
|
+ {
|
|
|
+ _DetectPlugInTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- break;
|
|
|
- case S_REASSIGN_CHECK:
|
|
|
- case S_REASSIGN:
|
|
|
- case S_PREPARNING:
|
|
|
- case S_PREPARING_FOR_EV:
|
|
|
- case S_PREPARING_FOR_EVSE:
|
|
|
- case S_CCS_PRECHARGE_ST0:
|
|
|
- case S_CCS_PRECHARGE_ST1:
|
|
|
- {
|
|
|
- // 取消充電
|
|
|
- AcChargingTerminalProcess();
|
|
|
- }
|
|
|
- break;
|
|
|
- case S_CHARGING:
|
|
|
- {
|
|
|
- if (ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE)
|
|
|
+ break;
|
|
|
+ case S_REASSIGN_CHECK:
|
|
|
+ case S_REASSIGN:
|
|
|
+ case S_PREPARNING:
|
|
|
+ case S_PREPARING_FOR_EV:
|
|
|
+ case S_PREPARING_FOR_EVSE:
|
|
|
+ case S_CCS_PRECHARGE_ST0:
|
|
|
+ case S_CCS_PRECHARGE_ST1:
|
|
|
{
|
|
|
- // 停止充電
|
|
|
+ // 取消充電
|
|
|
AcChargingTerminalProcess();
|
|
|
}
|
|
|
- }
|
|
|
- break;
|
|
|
- case S_COMPLETE:
|
|
|
- {}
|
|
|
- break;
|
|
|
+ break;
|
|
|
+ case S_CHARGING:
|
|
|
+ {
|
|
|
+ if (ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE)
|
|
|
+ {
|
|
|
+ // 停止充電
|
|
|
+ AcChargingTerminalProcess();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case S_COMPLETE:
|
|
|
+ {}
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2296,7 +2295,7 @@ void ChkPrimaryStatus()
|
|
|
if (ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc != NO_DEFINE)
|
|
|
AcChargingTerminalProcess();
|
|
|
else
|
|
|
- ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
+ ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
}
|
|
|
break;
|
|
|
case S_CHARGING:
|
|
@@ -2347,8 +2346,8 @@ void ChkPrimaryStatus()
|
|
|
for (byte _index = 0; _index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; _index++)
|
|
|
{
|
|
|
if (chargingInfo[_index]->SystemStatus != S_BOOTING &&
|
|
|
- chargingInfo[_index]->SystemStatus != S_IDLE &&
|
|
|
- chargingInfo[_index]->SystemStatus != S_RESERVATION)
|
|
|
+ chargingInfo[_index]->SystemStatus != S_IDLE &&
|
|
|
+ chargingInfo[_index]->SystemStatus != S_RESERVATION)
|
|
|
{
|
|
|
ShmSysConfigAndInfo->SysInfo.CurGunSelected = _index;
|
|
|
ChangeGunSelectByIndex(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
@@ -2523,7 +2522,7 @@ void CheckGunTypeFromHw()
|
|
|
bd1_2_status = gpioValue;
|
|
|
break;
|
|
|
case 44:
|
|
|
- bd0_1_status = gpioValue;
|
|
|
+ bd0_1_status = gpioValue;
|
|
|
break;
|
|
|
case 45:
|
|
|
bd0_2_status = gpioValue;
|
|
@@ -2684,9 +2683,9 @@ void UserScanFunction()
|
|
|
|
|
|
PRINTF_FUNC("ac stop charging \n");
|
|
|
PRINTF_FUNC("index = %d, card number = %s, UserId = %s \n", ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc,
|
|
|
- ac_chargingInfo[0]->StartUserId, ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
+ ac_chargingInfo[0]->StartUserId, ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
memcpy(value, (unsigned char *)ac_chargingInfo[0]->StartUserId,
|
|
|
- ARRAY_SIZE(ac_chargingInfo[0]->StartUserId));
|
|
|
+ ARRAY_SIZE(ac_chargingInfo[0]->StartUserId));
|
|
|
if (strcmp((char *)ShmSysConfigAndInfo->SysConfig.UserId, value) == EQUAL)
|
|
|
{
|
|
|
AcChargingTerminalProcess();
|
|
@@ -2694,16 +2693,16 @@ void UserScanFunction()
|
|
|
strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
|
|
|
}
|
|
|
else if (stopReq < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount &&
|
|
|
- chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus == S_CHARGING &&
|
|
|
- (_acgunIndex <= 0 || (_acgunIndex > 0 && ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc == NO_DEFINE)))
|
|
|
+ chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus == S_CHARGING &&
|
|
|
+ (_acgunIndex <= 0 || (_acgunIndex > 0 && ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc == NO_DEFINE)))
|
|
|
{
|
|
|
char value[32];
|
|
|
|
|
|
PRINTF_FUNC("stop charging \n");
|
|
|
PRINTF_FUNC("index = %d, card number = %s, UserId = %s \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected,
|
|
|
- chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->StartUserId, ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
+ chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->StartUserId, ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
memcpy(value, (unsigned char *)chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->StartUserId,
|
|
|
- ARRAY_SIZE(chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->StartUserId));
|
|
|
+ ARRAY_SIZE(chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->StartUserId));
|
|
|
|
|
|
// 同一張卡直接停掉
|
|
|
if (strcmp((char *)ShmSysConfigAndInfo->SysConfig.UserId, value) == EQUAL)
|
|
@@ -2831,7 +2830,7 @@ unsigned char isModeChange(unsigned char gun_index)
|
|
|
void ScannerCardProcess()
|
|
|
{
|
|
|
if (!isDetectPlugin() && !isCardScan && ShmSysConfigAndInfo->SysWarningInfo.Level != 2 &&
|
|
|
- ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_ENABLE)
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_ENABLE)
|
|
|
{
|
|
|
isCardScan = true;
|
|
|
// 處理刷卡及驗證卡號的動作
|
|
@@ -3002,7 +3001,7 @@ bool CheckConnectorTypeStatus()
|
|
|
bool result = true;
|
|
|
|
|
|
PRINTF_FUNC("bd0_1_status = %d, bd0_2_status = %d, bd1_1_status = %d, bd1_2_status = %d \n",
|
|
|
- bd0_1_status, bd0_2_status, bd1_1_status, bd1_2_status);
|
|
|
+ bd0_1_status, bd0_2_status, bd1_1_status, bd1_2_status);
|
|
|
if (strlen((char *) ShmSysConfigAndInfo->SysConfig.ModelName) >= 9)
|
|
|
{
|
|
|
byte slots = 1;
|
|
@@ -3028,8 +3027,8 @@ bool CheckConnectorTypeStatus()
|
|
|
ShmSysConfigAndInfo->SysConfig.TotalConnectorCount = _gunIndex;
|
|
|
ShmSysConfigAndInfo->SysConfig.AcConnectorCount = _acgunIndex;
|
|
|
PRINTF_FUNC("DC _gunCount = %d, AC _gunCount = %d \n",
|
|
|
- ShmSysConfigAndInfo->SysConfig.TotalConnectorCount,
|
|
|
- ShmSysConfigAndInfo->SysConfig.AcConnectorCount);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.TotalConnectorCount,
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AcConnectorCount);
|
|
|
|
|
|
if (ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 0)
|
|
|
{
|
|
@@ -3650,8 +3649,8 @@ void GetSystemTime()
|
|
|
ftime(&csuTime);
|
|
|
tmCSU = localtime(&csuTime.time);
|
|
|
PRINTF_FUNC("Time : %04d-%02d-%02d %02d:%02d:%02d \n", tmCSU->tm_year + 1900,
|
|
|
- tmCSU->tm_mon + 1, tmCSU->tm_mday, tmCSU->tm_hour, tmCSU->tm_min,
|
|
|
- tmCSU->tm_sec);
|
|
|
+ tmCSU->tm_mon + 1, tmCSU->tm_mday, tmCSU->tm_hour, tmCSU->tm_min,
|
|
|
+ tmCSU->tm_sec);
|
|
|
|
|
|
// byte date[14];
|
|
|
//
|
|
@@ -3811,26 +3810,26 @@ void CheckOcppStatus()
|
|
|
|
|
|
if (canReset)
|
|
|
{
|
|
|
- ShmOCPP16Data->MsMsg.bits.ResetReq = NO;
|
|
|
+ ShmOCPP16Data->MsMsg.bits.ResetReq = NO;
|
|
|
sprintf((char*)ShmOCPP16Data->Reset.ResponseStatus, "Accepted");
|
|
|
- if(strcmp((char *)ShmOCPP16Data->Reset.Type, "Hard") == EQUAL)
|
|
|
- {
|
|
|
- DEBUG_ERROR_MSG("****** Hard Reboot ****** \n");
|
|
|
+ if(strcmp((char *)ShmOCPP16Data->Reset.Type, "Hard") == EQUAL)
|
|
|
+ {
|
|
|
+ DEBUG_ERROR_MSG("****** Hard Reboot ****** \n");
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetConf = YES;
|
|
|
- sleep(3);
|
|
|
- system("reboot -f");
|
|
|
- }
|
|
|
- else if (strcmp((char *)ShmOCPP16Data->Reset.Type, "Soft") == EQUAL)
|
|
|
- {
|
|
|
- DEBUG_ERROR_MSG("****** Soft Reboot ****** \n");
|
|
|
+ sleep(3);
|
|
|
+ system("reboot -f");
|
|
|
+ }
|
|
|
+ else if (strcmp((char *)ShmOCPP16Data->Reset.Type, "Soft") == EQUAL)
|
|
|
+ {
|
|
|
+ DEBUG_ERROR_MSG("****** Soft Reboot ****** \n");
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetConf = YES;
|
|
|
- sleep(3);
|
|
|
+ sleep(3);
|
|
|
system("killall OcppBackend &");
|
|
|
- KillTask();
|
|
|
- system("/usr/bin/run_evse_restart.sh");
|
|
|
+ KillTask();
|
|
|
+ system("/usr/bin/run_evse_restart.sh");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
void OcppStartTransation(byte gunIndex)
|
|
@@ -3882,7 +3881,7 @@ void OcppRemoteStartChk()
|
|
|
for (byte ac_index = 0; ac_index < ShmSysConfigAndInfo->SysConfig.AcConnectorCount; ac_index++)
|
|
|
{
|
|
|
if ((ac_chargingInfo[ac_index]->SystemStatus == S_IDLE || ac_chargingInfo[ac_index]->SystemStatus == S_RESERVATION)&&
|
|
|
- ShmOCPP16Data->CsMsg.bits[acDirIndex].RemoteStartTransactionReq == YES)
|
|
|
+ ShmOCPP16Data->CsMsg.bits[acDirIndex].RemoteStartTransactionReq == YES)
|
|
|
{
|
|
|
ShmOCPP16Data->CsMsg.bits[acDirIndex].RemoteStartTransactionReq = NO;
|
|
|
ShmSysConfigAndInfo->SysInfo.OrderCharging = DEFAULT_AC_INDEX;
|
|
@@ -4424,7 +4423,7 @@ void CheckTask()
|
|
|
}
|
|
|
|
|
|
if(strcmp((char *)ShmSysConfigAndInfo->SysConfig.OcppServerURL, "") != EQUAL &&
|
|
|
- strcmp((char *)ShmSysConfigAndInfo->SysConfig.ChargeBoxId, "") != EQUAL)
|
|
|
+ strcmp((char *)ShmSysConfigAndInfo->SysConfig.ChargeBoxId, "") != EQUAL)
|
|
|
{
|
|
|
if(system("pidof -s OcppBackend > /dev/null") != 0)
|
|
|
{
|
|
@@ -4483,7 +4482,7 @@ void CheckSmartChargeProfile(byte _index)
|
|
|
{
|
|
|
// 預設最小輸出電流 (MIN_OUTPUT_CUR) A
|
|
|
if (_time >= ShmOCPP16Data->SmartChargingProfile[_index].ChargingSchedule.ChargingSchedulePeriod[_count].StartPeriod &&
|
|
|
- ShmOCPP16Data->SmartChargingProfile[_index].ChargingSchedule.ChargingSchedulePeriod[_count].Limit > MIN_OUTPUT_CUR)
|
|
|
+ ShmOCPP16Data->SmartChargingProfile[_index].ChargingSchedule.ChargingSchedulePeriod[_count].Limit > MIN_OUTPUT_CUR)
|
|
|
{
|
|
|
_startCount = _count;
|
|
|
}
|
|
@@ -4534,7 +4533,7 @@ void CheckReturnToChargingConn()
|
|
|
if (count != ShmSysConfigAndInfo->SysInfo.CurGunSelected)
|
|
|
{
|
|
|
if ((chargingInfo[count]->SystemStatus >= S_REASSIGN_CHECK && chargingInfo[count]->SystemStatus <= S_COMPLETE) ||
|
|
|
- (chargingInfo[count]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[count]->SystemStatus <= S_CCS_PRECHARGE_ST1))
|
|
|
+ (chargingInfo[count]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[count]->SystemStatus <= S_CCS_PRECHARGE_ST1))
|
|
|
{
|
|
|
isReturnTimeout = true;
|
|
|
StartSystemTimeoutDet(Timeout_ReturnToChargingGunDet);
|
|
@@ -4547,23 +4546,23 @@ void CheckReturnToChargingConn()
|
|
|
{
|
|
|
// 沒有選中 AC,且 AC 在充電中
|
|
|
if (ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc == NO_DEFINE &&
|
|
|
- (ac_chargingInfo[0]->SystemStatus >= S_PREPARNING && ac_chargingInfo[0]->SystemStatus <= S_COMPLETE))
|
|
|
+ (ac_chargingInfo[0]->SystemStatus >= S_PREPARNING && ac_chargingInfo[0]->SystemStatus <= S_COMPLETE))
|
|
|
{
|
|
|
// 當前 DC 充電槍在 idle 狀態
|
|
|
if (chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus == S_IDLE ||
|
|
|
- chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus == S_RESERVATION)
|
|
|
+ chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus == S_RESERVATION)
|
|
|
{
|
|
|
isReturnTimeout = true;
|
|
|
StartSystemTimeoutDet(Timeout_ReturnToChargingGunDet);
|
|
|
}
|
|
|
}
|
|
|
else if (ShmSysConfigAndInfo->SysInfo.CurGunSelectedByAc == DEFAULT_AC_INDEX &&
|
|
|
- ((chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus >= S_REASSIGN_CHECK && chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus <= S_COMPLETE) ||
|
|
|
- (chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus <= S_CCS_PRECHARGE_ST1)))
|
|
|
+ ((chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus >= S_REASSIGN_CHECK && chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus <= S_COMPLETE) ||
|
|
|
+ (chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus <= S_CCS_PRECHARGE_ST1)))
|
|
|
{
|
|
|
// 當前 DC 充電槍在 idle 狀態
|
|
|
if (ac_chargingInfo[0]->SystemStatus == S_IDLE ||
|
|
|
- ac_chargingInfo[0]->SystemStatus == S_RESERVATION)
|
|
|
+ ac_chargingInfo[0]->SystemStatus == S_RESERVATION)
|
|
|
{
|
|
|
isReturnTimeout = true;
|
|
|
StartSystemTimeoutDet(Timeout_ReturnToChargingGunDet);
|
|
@@ -4581,14 +4580,14 @@ bool GetStartChargingByAlterMode(byte _gun)
|
|
|
bool result = true;
|
|
|
|
|
|
if (ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 2 &&
|
|
|
- ShmSysConfigAndInfo->SysInfo.IsAlternatvieConf == YES)
|
|
|
+ ShmSysConfigAndInfo->SysInfo.IsAlternatvieConf == YES)
|
|
|
{
|
|
|
for (byte _select = 0; _select < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; _select++)
|
|
|
{
|
|
|
if (_select != _gun)
|
|
|
{
|
|
|
if (chargingInfo[_select]->SystemStatus != S_IDLE &&
|
|
|
- chargingInfo[_select]->SystemStatus != S_RESERVATION)
|
|
|
+ chargingInfo[_select]->SystemStatus != S_RESERVATION)
|
|
|
{
|
|
|
result = false;
|
|
|
break;
|
|
@@ -4619,7 +4618,7 @@ int main(void)
|
|
|
}
|
|
|
|
|
|
PRINTF_FUNC("Chademo = %d, CCS = %d, GB = %d, AC = %d \n",
|
|
|
- CHAdeMO_QUANTITY, CCS_QUANTITY, GB_QUANTITY, AC_QUANTITY);
|
|
|
+ CHAdeMO_QUANTITY, CCS_QUANTITY, GB_QUANTITY, AC_QUANTITY);
|
|
|
PRINTF_FUNC("\n"); PRINTF_FUNC("Initial SystemConfig and Info.......\n");
|
|
|
if (!InitialSystemDefaultConfig())
|
|
|
{
|
|
@@ -4663,7 +4662,7 @@ int main(void)
|
|
|
ShmPsuData->Work_Step == _NO_WORKING)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysWarningInfo.Level != 2)
|
|
|
- DisplaySelfTestFailReason();
|
|
|
+ DisplaySelfTestFailReason();
|
|
|
|
|
|
for (byte gun_index = 0; gun_index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; gun_index++)
|
|
|
{
|
|
@@ -4903,7 +4902,7 @@ int main(void)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
|
|
|
ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_IDLE;
|
|
|
- }
|
|
|
+ }
|
|
|
} // Idle 正常程序終點
|
|
|
}
|
|
|
|
|
@@ -4986,12 +4985,12 @@ int main(void)
|
|
|
ShmSysConfigAndInfo->SysInfo.MainChargingMode == _MAIN_CHARGING_MODE_AVER)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysInfo.CanAverageCharging)
|
|
|
- setChargerMode(gun_index, MODE_PRECHARGE);
|
|
|
+ setChargerMode(gun_index, MODE_PRECHARGE);
|
|
|
else
|
|
|
setChargerMode(gun_index, MODE_IDLE);
|
|
|
}
|
|
|
else if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_RELAY_M_TO_A &&
|
|
|
- ShmSysConfigAndInfo->SysInfo.BridgeRelayStatus == NO)
|
|
|
+ ShmSysConfigAndInfo->SysInfo.BridgeRelayStatus == NO)
|
|
|
{
|
|
|
PRINTF_FUNC("=============Smart Charging : _REASSIGNED_COMP============= Step 6 \n");
|
|
|
ShmSysConfigAndInfo->SysInfo.MainChargingMode = _MAIN_CHARGING_MODE_AVER;
|
|
@@ -5178,7 +5177,7 @@ int main(void)
|
|
|
RecordAlarmCode(gun_index, "012234");
|
|
|
}
|
|
|
else if (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
+ (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
{
|
|
|
// UVP
|
|
|
RecordAlarmCode(gun_index, "012289");
|
|
@@ -5200,8 +5199,8 @@ int main(void)
|
|
|
RecordAlarmCode(gun_index, "012236");
|
|
|
}
|
|
|
else if (isPrechargeStatus_gb(gun_index) == 10 &&
|
|
|
- (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
+ (((chargingInfo[gun_index]->EvBatterytargetVoltage * 10) > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
+ (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
{
|
|
|
// UVP
|
|
|
RecordAlarmCode(gun_index, "012290");
|
|
@@ -5303,7 +5302,6 @@ int main(void)
|
|
|
strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Local");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
|
|
|
ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_COMPLETE;
|
|
|
}
|
|
@@ -5421,7 +5419,7 @@ int main(void)
|
|
|
else if (ac_chargingInfo[0]->SystemStatus == S_CHARGING)
|
|
|
ChangeLcmByIndex(_LCM_CHARGING);
|
|
|
else if (ac_chargingInfo[0]->SystemStatus == S_TERMINATING ||
|
|
|
- ac_chargingInfo[0]->SystemStatus == S_COMPLETE)
|
|
|
+ ac_chargingInfo[0]->SystemStatus == S_COMPLETE)
|
|
|
ChangeLcmByIndex(_LCM_COMPLETE);
|
|
|
else
|
|
|
dcPageRun = true;
|