|
@@ -109,6 +109,7 @@ void gpio_set_value(unsigned int gpio, unsigned int value);
|
|
|
void PRINTF_FUNC(char *string, ...);
|
|
|
void ChangeGunSelectByIndex(byte sel);
|
|
|
void ChargingAlarmProcess(byte gunIndex);
|
|
|
+void CheckSystemErrorFunction(byte index);
|
|
|
|
|
|
int opcc_chk_reserve_expired(byte gunIndex);
|
|
|
void ocpp_process_start();
|
|
@@ -174,8 +175,11 @@ struct DcCommonInformation *ShmDcCommonData;
|
|
|
|
|
|
struct ChargingInfoData *chargingInfo[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
struct ChargingInfoData *ac_chargingInfo[AC_QUANTITY];
|
|
|
+
|
|
|
struct timeb startChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
struct timeb endChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
+int _presentChargingTimeBuf[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
+
|
|
|
struct timeval _startTransation_time[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
|
|
|
|
float gunOutputVol [CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
|
|
@@ -758,9 +762,20 @@ void ChangeLcmByIndex(byte page_index)
|
|
|
if (ShmSysConfigAndInfo->SysWarningInfo.Level != 2 ||
|
|
|
page_index == _LCM_COMPLETE || page_index == _LCM_FIX || page_index == _LCM_EMC)
|
|
|
{
|
|
|
- if (page_index == _LCM_FIX || page_index == _LCM_EMC)
|
|
|
+ if (ShmSysConfigAndInfo->SysConfig.TotalConnectorCount > 0 &&
|
|
|
+ (page_index == _LCM_FIX || page_index == _LCM_EMC))
|
|
|
{
|
|
|
- if (chargingInfo[page_index]->SystemStatus != S_RESERVATION &&
|
|
|
+ bool isUpdate = false;
|
|
|
+ for (byte _index = 0; _index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; _index++)
|
|
|
+ {
|
|
|
+ if (chargingInfo[_index]->SystemStatus != S_RESERVATION &&
|
|
|
+ chargingInfo[_index]->SystemStatus != S_MAINTAIN)
|
|
|
+ {
|
|
|
+ isUpdate = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isUpdate &&
|
|
|
ShmDcCommonData->LcmFwVersion > 0 &&
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip == YES)
|
|
|
ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_EMC;
|
|
@@ -1458,6 +1473,13 @@ void GetFirmwareVersion()
|
|
|
ShmSysConfigAndInfo->SysInfo.ChargerType = _CHARGER_TYPE_IEC;
|
|
|
else if (strcmp(_buf, "WU") == EQUAL)
|
|
|
ShmSysConfigAndInfo->SysInfo.ChargerType = _CHARGER_TYPE_UL;
|
|
|
+
|
|
|
+ memcpy(_buf, &ShmSysConfigAndInfo->SysConfig.ModelName[12], 2);
|
|
|
+
|
|
|
+ if (strcmp(_buf, "PH") == EQUAL)
|
|
|
+ ShmDcCommonData->ShowLogoFlag = YES;
|
|
|
+ else
|
|
|
+ ShmDcCommonData->ShowLogoFlag = NO;
|
|
|
}
|
|
|
|
|
|
void InitialGunIndexToUnUse()
|
|
@@ -1576,7 +1598,6 @@ void InitialShareMemoryInfo()
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuNoResource = NO;
|
|
|
InitialGunIndexToUnUse();
|
|
|
|
|
|
- ShmSysConfigAndInfo->SysConfig.SwitchDebugFlag = NO;
|
|
|
ShmSysConfigAndInfo->SysConfig.AlwaysGfdFlag = NO;
|
|
|
|
|
|
ShmDcCommonData->CcsVersion = _CCS_VERSION_CHECK_TAG_V015S0;
|
|
@@ -1585,6 +1606,8 @@ void InitialShareMemoryInfo()
|
|
|
ShmDcCommonData->ConnectErrList[0].GunErrMessage = 0;
|
|
|
ShmDcCommonData->ConnectErrList[1].GunErrMessage = 0;
|
|
|
ShmDcCommonData->LcmFwVersion = 0;
|
|
|
+
|
|
|
+ ShmSysConfigAndInfo->SysConfig.SwitchDebugFlag = NO;
|
|
|
}
|
|
|
|
|
|
int Initialization()
|
|
@@ -1597,7 +1620,7 @@ int Initialization()
|
|
|
// UART 2 for Rfid
|
|
|
rfidFd = InitialRfidPort();
|
|
|
|
|
|
- int pinOut[2] = { 116, 115 };
|
|
|
+ int pinOut[2] = { 116, 115 }; //D13(Cha)、C13(CCS)
|
|
|
for (byte count = 0; count < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; count++)
|
|
|
{
|
|
|
chargingInfo[count]->RemoteStartFlag = NO;
|
|
@@ -2185,7 +2208,7 @@ void _SelfTestTimeout()
|
|
|
|
|
|
void _AuthorizedTimeout()
|
|
|
{
|
|
|
- if(IsAuthorizingMode())
|
|
|
+ //if(IsAuthorizingMode())
|
|
|
{
|
|
|
PRINTF_FUNC("*********** _AuthorizedTimeout *********** \n");
|
|
|
isCardScan = false;
|
|
@@ -2353,6 +2376,15 @@ void ResetChargerAlarmCode(byte gunIndex, char *code)
|
|
|
void ReleaseSysAlarmCode(byte gunIndex)
|
|
|
{
|
|
|
// 回 idle 後主要清除 GFD Trip、UVP、OVP、GFD Warning
|
|
|
+ if (strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "", 6) != EQUAL)
|
|
|
+ {
|
|
|
+ if (strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "012251", 6) == EQUAL ||
|
|
|
+ strncmp((char *)chargingInfo[gunIndex]->ConnectorAlarmCode, "012252", 6) == EQUAL)
|
|
|
+ {
|
|
|
+ memcpy(chargingInfo[gunIndex]->ConnectorAlarmCode, "", 6);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (chargingInfo[gunIndex]->Type == _Type_Chademo)
|
|
|
{
|
|
|
ShmDcCommonData->ConnectErrList[gunIndex].GunBits.ChaGfdTrip = NO;
|
|
@@ -2411,6 +2443,11 @@ void ReleaseSysAlarmCode(byte gunIndex)
|
|
|
ocpp_clear_errorCode_cmd(gunIndex);
|
|
|
}
|
|
|
|
|
|
+void NormalStop(byte gunIndex)
|
|
|
+{
|
|
|
+ PRINTF_FUNC("NormalStop (%d) \n", gunIndex);
|
|
|
+}
|
|
|
+
|
|
|
//===============================================
|
|
|
// EmergencyStop and Charging Stop
|
|
|
//===============================================
|
|
@@ -2421,6 +2458,7 @@ void ChargingTerminalProcess(byte gunIndex)
|
|
|
|
|
|
void ChargingAlarmProcess(byte gunIndex)
|
|
|
{
|
|
|
+ CheckSystemErrorFunction(gunIndex);
|
|
|
ocpp_set_errCode_cmd(gunIndex);
|
|
|
setChargerMode(gunIndex, MODE_ALARM);
|
|
|
}
|
|
@@ -2533,9 +2571,7 @@ void ChkPrimaryStatus()
|
|
|
ReleaseEmsOccureByString(0, "012238");
|
|
|
|
|
|
if (ShmPrimaryMcuData->InputDet.bits.SpdDetec == ABNORMAL)
|
|
|
- {
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SpdTrip = YES;
|
|
|
- }
|
|
|
else
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SpdTrip = NO;
|
|
|
|
|
@@ -2547,6 +2583,13 @@ void ChkPrimaryStatus()
|
|
|
else
|
|
|
ReleaseEmsOccureByString(0, "012252");
|
|
|
|
|
|
+ if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuFailureAlarm)
|
|
|
+ {
|
|
|
+ EmcOccureThenStopCharging();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ ReleaseEmsOccureByString(0, "012267");
|
|
|
+
|
|
|
if (ShmPrimaryMcuData->InputDet.bits.Button1 == BTN_PRESS &&
|
|
|
ShmPrimaryMcuData->InputDet.bits.Button2 == BTN_PRESS)
|
|
|
ShmSysConfigAndInfo->SysConfig.ShowInformation = YES;
|
|
@@ -2627,10 +2670,12 @@ void ChkPrimaryStatus()
|
|
|
break;
|
|
|
case S_CHARGING:
|
|
|
{
|
|
|
- if (ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE &&
|
|
|
- chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->isRemoteStart == NO)
|
|
|
+ if (ShmSysConfigAndInfo->SysConfig.StopChargingByButton == YES ||
|
|
|
+ (ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE &&
|
|
|
+ chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->isRemoteStart == NO))
|
|
|
{
|
|
|
// 按鈕 - 停止充電
|
|
|
+ NormalStop(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
}
|
|
|
}
|
|
@@ -2718,6 +2763,9 @@ void CheckSystemErrorFunction(byte index)
|
|
|
if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.DoorOpen)
|
|
|
RecordAlarmCode(index, "012252");
|
|
|
|
|
|
+ if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuFailureAlarm)
|
|
|
+ RecordAlarmCode(index, "012267");
|
|
|
+
|
|
|
if (ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy == YES)
|
|
|
{
|
|
|
if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP == YES ||
|
|
@@ -3031,6 +3079,7 @@ void UserScanFunction()
|
|
|
// 同一張卡直接停掉
|
|
|
if (strcmp((char *)ShmSysConfigAndInfo->SysConfig.UserId, value) == EQUAL)
|
|
|
{
|
|
|
+ NormalStop(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
|
|
|
strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
|
|
|
}
|
|
@@ -3596,6 +3645,7 @@ int CheckUpdateProcess(void)
|
|
|
fd = open(new_str, O_RDONLY);
|
|
|
if (fd < 0)
|
|
|
{
|
|
|
+ close(fd);
|
|
|
result = FAIL;
|
|
|
sleep(1);
|
|
|
continue;
|
|
@@ -3608,6 +3658,7 @@ int CheckUpdateProcess(void)
|
|
|
ImageLen = read(fd, ptr, MaxLen);
|
|
|
bool isModelNameFail = false;
|
|
|
|
|
|
+ // DS-----J0E-2PH
|
|
|
if((ShmSysConfigAndInfo->SysConfig.ModelName[0] != ptr[0]) ||
|
|
|
(ShmSysConfigAndInfo->SysConfig.ModelName[1] != ptr[1]) ||
|
|
|
(ShmSysConfigAndInfo->SysConfig.ModelName[7] != ptr[7]) ||
|
|
@@ -3622,7 +3673,10 @@ int CheckUpdateProcess(void)
|
|
|
}
|
|
|
|
|
|
if (isModelNameFail)
|
|
|
+ {
|
|
|
+ close(fd);
|
|
|
continue;
|
|
|
+ }
|
|
|
|
|
|
PRINTF_FUNC("model name check pass. \n");
|
|
|
if (ImageLen > 20) {
|
|
@@ -3765,6 +3819,7 @@ int CheckUpdateProcess(void)
|
|
|
}
|
|
|
}
|
|
|
free(ptr);
|
|
|
+ close(fd);
|
|
|
}
|
|
|
}
|
|
|
free(dir);
|
|
@@ -3954,83 +4009,103 @@ void CreateTimeoutFork()
|
|
|
gettimeofday(&_cmdSubPriority_time, NULL);
|
|
|
CheckConnectionTimeout();
|
|
|
|
|
|
+ unsigned long _timebuf = 0;
|
|
|
+
|
|
|
while(true)
|
|
|
{
|
|
|
- if ((GetTimeoutValue(_cmdSubPriority_time) / 1000) > 5000)
|
|
|
+ _timebuf = GetTimeoutValue(_cmdSubPriority_time);
|
|
|
+ if (_timebuf < 0)
|
|
|
{
|
|
|
- CheckConnectionTimeout();
|
|
|
-
|
|
|
gettimeofday(&_cmdSubPriority_time, NULL);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if ((_timebuf / 1000) > 5000)
|
|
|
+ {
|
|
|
+ CheckConnectionTimeout();
|
|
|
+ gettimeofday(&_cmdSubPriority_time, NULL);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//printf("Timeout ***********SystemTimeoutFlag = %d, ********\n", ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag);
|
|
|
// 系統
|
|
|
- switch(ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag)
|
|
|
+ _timebuf = GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer);
|
|
|
+ if (_timebuf < 0)
|
|
|
{
|
|
|
- case Timeout_SelftestChk:
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= SELFTEST_TIMEOUT)
|
|
|
- {
|
|
|
- _SelfTestTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_Authorizing:
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= AUTHORIZE_TIMEOUT)
|
|
|
- {
|
|
|
- _AuthorizedTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_VerifyFail:
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= AUTHORIZE_FAIL_TIMEOUT)
|
|
|
- {
|
|
|
- _AutoReturnTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_VerifyComp:
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= AUTHORIZE_COMP_TIMEOUT)
|
|
|
- {
|
|
|
- _AutoReturnTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_WaitPlug:
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= _connectionTimeout)
|
|
|
- {
|
|
|
- _DetectPlugInTimeout();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_ReturnToChargingGunDet:
|
|
|
- {
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= RETURN_TO_CHARGING_PAGE)
|
|
|
- {
|
|
|
- DisplayChargingInfo();
|
|
|
- StopSystemTimeoutDet();
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case Timeout_AuthorizingForStop:
|
|
|
+ gettimeofday(&ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer, NULL);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ switch(ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag)
|
|
|
{
|
|
|
- if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) / uSEC_VAL >= AUTHORIZE_STOP_TIMEOUT)
|
|
|
+ case Timeout_SelftestChk:
|
|
|
+ if (_timebuf / uSEC_VAL >= SELFTEST_TIMEOUT)
|
|
|
+ {
|
|
|
+ _SelfTestTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Timeout_Authorizing:
|
|
|
+ if (_timebuf / uSEC_VAL >= AUTHORIZE_TIMEOUT)
|
|
|
+ {
|
|
|
+ _AuthorizedTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Timeout_VerifyFail:
|
|
|
+ if (_timebuf / uSEC_VAL >= AUTHORIZE_FAIL_TIMEOUT)
|
|
|
+ {
|
|
|
+ _AutoReturnTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Timeout_VerifyComp:
|
|
|
+ if (_timebuf / uSEC_VAL >= AUTHORIZE_COMP_TIMEOUT)
|
|
|
+ {
|
|
|
+ _AutoReturnTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Timeout_WaitPlug:
|
|
|
+ if (_timebuf / uSEC_VAL >= _connectionTimeout)
|
|
|
+ {
|
|
|
+ _DetectPlugInTimeout();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case Timeout_ReturnToChargingGunDet:
|
|
|
{
|
|
|
- strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
|
|
|
- ClearAuthorizedFlag();
|
|
|
- StopSystemTimeoutDet();
|
|
|
+ if (_timebuf / uSEC_VAL >= RETURN_TO_CHARGING_PAGE)
|
|
|
+ {
|
|
|
+ DisplayChargingInfo();
|
|
|
+ StopSystemTimeoutDet();
|
|
|
+ }
|
|
|
}
|
|
|
+ break;
|
|
|
+// case Timeout_AuthorizingForStop:
|
|
|
+// {
|
|
|
+// if (_timebuf / uSEC_VAL >= AUTHORIZE_STOP_TIMEOUT)
|
|
|
+// {
|
|
|
+// strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
|
|
|
+// ClearAuthorizedFlag();
|
|
|
+// StopSystemTimeoutDet();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
+
|
|
|
// 各槍
|
|
|
for (byte gun_index = 0; gun_index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; gun_index++)
|
|
|
{
|
|
|
+ _timebuf = GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer);
|
|
|
+
|
|
|
//printf("Timeout ***********TimeoutFlag = %d, ********\n", chargingInfo[gun_index]->TimeoutFlag);
|
|
|
switch(chargingInfo[gun_index]->TimeoutFlag)
|
|
|
{
|
|
|
case Timeout_Preparing:
|
|
|
{
|
|
|
- if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) / uSEC_VAL >= GUN_PREPARE_TIMEOUT)
|
|
|
+ if (_timebuf / uSEC_VAL >= GUN_PREPARE_TIMEOUT)
|
|
|
{
|
|
|
_PrepareTimeout(gun_index);
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
@@ -4039,7 +4114,7 @@ void CreateTimeoutFork()
|
|
|
break;
|
|
|
case Timeout_EvChargingDet:
|
|
|
{
|
|
|
- if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) / uSEC_VAL >= GUN_EV_WAIT_TIMEOUT)
|
|
|
+ if (_timebuf / uSEC_VAL >= GUN_EV_WAIT_TIMEOUT)
|
|
|
{
|
|
|
_DetectEvChargingEnableTimeout(gun_index);
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
@@ -4048,7 +4123,7 @@ void CreateTimeoutFork()
|
|
|
break;
|
|
|
case Timeout_EvseChargingDet:
|
|
|
{
|
|
|
- if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) / uSEC_VAL >= GUN_EVSE_WAIT_TIMEOUT)
|
|
|
+ if (_timebuf / uSEC_VAL >= GUN_EVSE_WAIT_TIMEOUT)
|
|
|
{
|
|
|
_DetectEvseChargingEnableTimeout(gun_index);
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
@@ -4057,7 +4132,7 @@ void CreateTimeoutFork()
|
|
|
break;
|
|
|
case Timeout_EvseCompleteDet:
|
|
|
{
|
|
|
- if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) / uSEC_VAL >= GUN_COMP_WAIT_TIMEOUT)
|
|
|
+ if (_timebuf / uSEC_VAL >= GUN_COMP_WAIT_TIMEOUT)
|
|
|
{
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
|
}
|
|
@@ -4065,7 +4140,7 @@ void CreateTimeoutFork()
|
|
|
break;
|
|
|
case Timeout_ForCcsPrechargeDet:
|
|
|
{
|
|
|
- if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) / uSEC_VAL >= GUN_PRECHARGING_TIMEOUT)
|
|
|
+ if (_timebuf / uSEC_VAL >= GUN_PRECHARGING_TIMEOUT)
|
|
|
{
|
|
|
_CcsPrechargeTimeout(gun_index);
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
@@ -4329,7 +4404,6 @@ void ocpp_sub_run_reset(bool canReset)
|
|
|
sprintf((char*)ShmOCPP16Data->Reset.ResponseStatus, "Accepted");
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetReq = NO;
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetConf = YES;
|
|
|
- ChangeLcmByIndex(_LCM_FIX);
|
|
|
sleep(3);
|
|
|
system("reboot -f");
|
|
|
}
|
|
@@ -4339,7 +4413,6 @@ void ocpp_sub_run_reset(bool canReset)
|
|
|
sprintf((char*)ShmOCPP16Data->Reset.ResponseStatus, "Accepted");
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetReq = NO;
|
|
|
ShmOCPP16Data->MsMsg.bits.ResetConf = YES;
|
|
|
- ChangeLcmByIndex(_LCM_FIX);
|
|
|
sleep(3);
|
|
|
KillAllTask();
|
|
|
system("/usr/bin/run_evse_restart.sh");
|
|
@@ -4353,7 +4426,6 @@ void ocpp_sub_run_reset(bool canReset)
|
|
|
sprintf((char*)ShmOCPP20Data->Reset.Response_status, "Accepted");
|
|
|
ShmOCPP20Data->MsMsg.bits.ResetReq = NO;
|
|
|
ShmOCPP20Data->MsMsg.bits.ResetConf = YES;
|
|
|
- ChangeLcmByIndex(_LCM_FIX);
|
|
|
sleep(3);
|
|
|
system("reboot -f");
|
|
|
}
|
|
@@ -4363,7 +4435,6 @@ void ocpp_sub_run_reset(bool canReset)
|
|
|
sprintf((char*)ShmOCPP20Data->Reset.Response_status, "Accepted");
|
|
|
ShmOCPP20Data->MsMsg.bits.ResetReq = NO;
|
|
|
ShmOCPP20Data->MsMsg.bits.ResetConf = YES;
|
|
|
- ChangeLcmByIndex(_LCM_FIX);
|
|
|
sleep(3);
|
|
|
KillAllTask();
|
|
|
system("/usr/bin/run_evse_restart.sh");
|
|
@@ -4396,6 +4467,16 @@ void ocpp_chk_reset_cmd()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (canReset)
|
|
|
+ {
|
|
|
+ // Reset -> change status to maintain.
|
|
|
+ for (byte _index = 0; _index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; _index++)
|
|
|
+ {
|
|
|
+ setChargerMode(_index, MODE_MAINTAIN);
|
|
|
+ }
|
|
|
+ ChangeLcmByIndex(_LCM_FIX);
|
|
|
+ }
|
|
|
+
|
|
|
ocpp_sub_run_reset(canReset);
|
|
|
}
|
|
|
}
|
|
@@ -4738,6 +4819,7 @@ void ocpp_chk_update_cmd()
|
|
|
if (strcmp((char *)ShmOCPP16Data->FirmwareStatusNotification.Status, "Downloaded") == EQUAL)
|
|
|
{
|
|
|
DEBUG_INFO_MSG("Backend : update start. \n");
|
|
|
+ sleep(2);
|
|
|
strcpy((char *)ShmOCPP16Data->FirmwareStatusNotification.Status, "");
|
|
|
strcpy((char *)ShmOCPP16Data->FirmwareStatusNotification.Status, "Installing");
|
|
|
ShmOCPP16Data->SpMsg.bits.FirmwareStatusNotificationReq = YES;
|
|
@@ -4791,6 +4873,7 @@ void ocpp_chk_update_cmd()
|
|
|
if (strcmp((char *)ShmOCPP20Data->FirmwareStatusNotification.status, "Downloaded") == EQUAL)
|
|
|
{
|
|
|
DEBUG_INFO_MSG("Backend : update start. \n");
|
|
|
+ sleep(2);
|
|
|
strcpy((char *)ShmOCPP20Data->FirmwareStatusNotification.status, "");
|
|
|
strcpy((char *)ShmOCPP20Data->FirmwareStatusNotification.status, "Installing");
|
|
|
ShmOCPP20Data->SpMsg.bits.FirmwareStatusNotificationReq = YES;
|
|
@@ -5121,6 +5204,23 @@ bool ocpp_get_authorize_conf()
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+bool ocpp_get_startTransation_req(byte gunIndex)
|
|
|
+{
|
|
|
+ bool result = false;
|
|
|
+
|
|
|
+ // 如果有 AC 槍,而現在是 DC 第二把槍進入充電
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ {
|
|
|
+ result = ShmOCPP16Data->CpMsg.bits[gunIndex].StartTransactionReq;
|
|
|
+ }
|
|
|
+ else if (ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ {
|
|
|
+ result = ShmOCPP20Data->CpMsg.bits[gunIndex].TransactionEventReq;
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+}
|
|
|
+
|
|
|
void ocpp_chargingProfile_process(byte _index)
|
|
|
{
|
|
|
int _time = 0;
|
|
@@ -5473,7 +5573,7 @@ void DB_Update_PowerConsumption(sqlite3 *db, uint8_t gun_index, float value)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- PRINTF_FUNC("update connector-%d power_consumption item consumption to %f \r\n", gun_index, value);
|
|
|
+ //PRINTF_FUNC("update connector-%d power_consumption item consumption to %f \r\n", gun_index, value);
|
|
|
}
|
|
|
|
|
|
sqlite3_close(db);
|
|
@@ -5729,6 +5829,7 @@ void StopProcessingLoop()
|
|
|
{
|
|
|
CheckFactoryConfigFunction();
|
|
|
CheckFwUpdateFunction();
|
|
|
+ ocpp_chk_reset_cmd();
|
|
|
if (ShmSysConfigAndInfo->SysWarningInfo.Level == 2)
|
|
|
{
|
|
|
ChkPrimaryStatus();
|
|
@@ -5986,9 +6087,19 @@ bool GetStartChargingByAlterMode(byte _gun)
|
|
|
|
|
|
void TheEndCharging(byte gun_index)
|
|
|
{
|
|
|
+ int _diffTime = 0;
|
|
|
+
|
|
|
ftime(&endChargingTime[gun_index]);
|
|
|
- if (chargingInfo[gun_index]->PresentChargedDuration != 0)
|
|
|
- chargingInfo[gun_index]->PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+ _diffTime = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+
|
|
|
+ // below 0 or over 5 sec is abnormal
|
|
|
+ if (_diffTime < 0 ||
|
|
|
+ _diffTime > chargingInfo[gun_index]->PresentChargedDuration + 5)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("TimeZone changed End (%d) \n", gun_index);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ chargingInfo[gun_index]->PresentChargedDuration = _presentChargingTimeBuf[gun_index] + _diffTime;
|
|
|
|
|
|
chargingInfo[gun_index]->isRemoteStart = NO;
|
|
|
|
|
@@ -6050,7 +6161,8 @@ void ReviewCriticalAlarm()
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip ||
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MainPowerBreakerTrip ||
|
|
|
ShmStatusCodeData->AlarmCode.AlarmEvents.bits.DoorOpen ||
|
|
|
- ShmSysConfigAndInfo->SysWarningInfo.ExtraErrProcess != _EXTRA_ERR_PROCESS_NONE)
|
|
|
+ ShmSysConfigAndInfo->SysWarningInfo.ExtraErrProcess != _EXTRA_ERR_PROCESS_NONE ||
|
|
|
+ ShmStatusCodeData->AlarmCode.AlarmEvents.bits.PsuFailureAlarm)
|
|
|
{
|
|
|
ShmSysConfigAndInfo->SysWarningInfo.Level = 2;
|
|
|
}
|
|
@@ -6326,6 +6438,25 @@ void AlarmCheck(byte type)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void SavePresentChargedDuration(byte gun_index)
|
|
|
+{
|
|
|
+ int _diffTime = 0;
|
|
|
+
|
|
|
+ ftime(&endChargingTime[gun_index]);
|
|
|
+ _diffTime = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+
|
|
|
+ // below 0 or over 5 sec is abnormal
|
|
|
+ if (_diffTime < 0 ||
|
|
|
+ _diffTime > chargingInfo[gun_index]->PresentChargedDuration + 5)
|
|
|
+ {
|
|
|
+ _presentChargingTimeBuf[gun_index] = chargingInfo[gun_index]->PresentChargedDuration;
|
|
|
+ ftime(&startChargingTime[gun_index]);
|
|
|
+ PRINTF_FUNC("TimeZone changed (%d) \n", gun_index);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ chargingInfo[gun_index]->PresentChargedDuration = _presentChargingTimeBuf[gun_index] + _diffTime;
|
|
|
+}
|
|
|
+
|
|
|
int main(void)
|
|
|
{
|
|
|
if(CreateShareMemory() == 0)
|
|
@@ -6384,32 +6515,33 @@ int main(void)
|
|
|
CreateTimeoutFork();
|
|
|
SelfTestRun();
|
|
|
StopSystemTimeoutDet();
|
|
|
+
|
|
|
if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_FAIL ||
|
|
|
ShmPsuData->Work_Step == _NO_WORKING ||
|
|
|
- ShmStatusCodeData->InfoCode.InfoEvents.bits.CcsSeccTimeoutQCA7000Comm == YES)
|
|
|
+ ShmStatusCodeData->InfoCode.InfoEvents.bits.CcsSeccTimeoutQCA7000Comm == YES ||
|
|
|
+ strcmp((char *)ShmSysConfigAndInfo->SysInfo.LcmHwRev, " ") == EQUAL)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysWarningInfo.Level != 2)
|
|
|
{
|
|
|
- if (!DisplaySelfTestFailReason())
|
|
|
+ if (!DisplaySelfTestFailReason() &&
|
|
|
+ ShmDcCommonData->rebootCount < 1)
|
|
|
{
|
|
|
- PRINTF_FUNC("Soft reboot for retry self-tets. \n");
|
|
|
+ printf("Soft reboot for retry self-tets. \n");
|
|
|
+ SetupRebootCount(1);
|
|
|
sleep(3);
|
|
|
KillAllTask();
|
|
|
system("/usr/bin/run_evse_restart.sh");
|
|
|
}
|
|
|
- else
|
|
|
+ else if (ShmDcCommonData->rebootCount < 1)
|
|
|
{
|
|
|
- if (ShmDcCommonData->rebootCount <= 1)
|
|
|
- {
|
|
|
- PRINTF_FUNC("Soft reboot for retry self-tets (Nomal). \n");
|
|
|
- SetupRebootCount(1);
|
|
|
- sleep(3);
|
|
|
- KillAllTask();
|
|
|
- system("/usr/bin/run_evse_restart.sh");
|
|
|
- }
|
|
|
- else
|
|
|
- SetupRebootCount(0);
|
|
|
+ printf("Soft reboot for retry self-tets (Nomal). \n");
|
|
|
+ SetupRebootCount(1);
|
|
|
+ sleep(3);
|
|
|
+ KillAllTask();
|
|
|
+ system("/usr/bin/run_evse_restart.sh");
|
|
|
}
|
|
|
+ else
|
|
|
+ SetupRebootCount(0);
|
|
|
}
|
|
|
|
|
|
for (byte gun_index = 0; gun_index < ShmSysConfigAndInfo->SysConfig.TotalConnectorCount; gun_index++)
|
|
@@ -6479,6 +6611,8 @@ int main(void)
|
|
|
system ("pkill OcppBackend");
|
|
|
}
|
|
|
|
|
|
+ unsigned long _mainTimebuf = 0;
|
|
|
+
|
|
|
for (;;)
|
|
|
{
|
|
|
ocpp_auto_response_BootNotification();
|
|
@@ -6493,6 +6627,12 @@ int main(void)
|
|
|
CheckFwUpdateFunction();
|
|
|
}
|
|
|
|
|
|
+ if (ShmSysConfigAndInfo->SysConfig.TotalConnectorCount == 0)
|
|
|
+ {
|
|
|
+ sleep(1);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
// OCPP 邏輯
|
|
|
ocpp_chk_remoteStart_cmd();
|
|
|
// 讀卡邏輯
|
|
@@ -6507,6 +6647,11 @@ int main(void)
|
|
|
ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_WAIT_FOR_PLUG;
|
|
|
}
|
|
|
|
|
|
+ _mainTimebuf = GetTimeoutValue(_cmdMainPriority_time);
|
|
|
+
|
|
|
+ if (_mainTimebuf < 0)
|
|
|
+ gettimeofday(&_cmdMainPriority_time, NULL);
|
|
|
+
|
|
|
if ((GetTimeoutValue(_cmdMainPriority_time) / 1000) > 5000)
|
|
|
{
|
|
|
CheckTask();
|
|
@@ -6541,20 +6686,20 @@ int main(void)
|
|
|
// OTP
|
|
|
if (chargingInfo[_index]->Type == _Type_Chademo)
|
|
|
{
|
|
|
- if (chargingInfo[_index]->ConnectorTemp != UNDEFINED_TEMP)
|
|
|
- {
|
|
|
- if (chargingInfo[_index]->ConnectorTemp >= GUN_OTP_VALUE)
|
|
|
- RecordAlarmCode(_index, "012229");
|
|
|
- else if (chargingInfo[_index]->ConnectorTemp != 0 &&
|
|
|
- chargingInfo[_index]->ConnectorTemp < GUN_OTP_RECOVERY)
|
|
|
- ResetChargerAlarmCode(_index, "012229");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // 沒接上 Sensor or 異常
|
|
|
- //RecordAlarmCode(_index, "011018");
|
|
|
- ResetChargerAlarmCode(_index, "012229");
|
|
|
- }
|
|
|
+// if (chargingInfo[_index]->ConnectorTemp != UNDEFINED_TEMP)
|
|
|
+// {
|
|
|
+// if (chargingInfo[_index]->ConnectorTemp >= GUN_OTP_VALUE)
|
|
|
+// RecordAlarmCode(_index, "012229");
|
|
|
+// else if (chargingInfo[_index]->ConnectorTemp != 0 &&
|
|
|
+// chargingInfo[_index]->ConnectorTemp < GUN_OTP_RECOVERY)
|
|
|
+// ResetChargerAlarmCode(_index, "012229");
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// // 沒接上 Sensor or 異常
|
|
|
+// //RecordAlarmCode(_index, "011018");
|
|
|
+// ResetChargerAlarmCode(_index, "012229");
|
|
|
+// }
|
|
|
}
|
|
|
else if (chargingInfo[_index]->Type == _Type_CCS_2)
|
|
|
{
|
|
@@ -6578,20 +6723,20 @@ int main(void)
|
|
|
}
|
|
|
else if (chargingInfo[_index]->Type == _Type_GB)
|
|
|
{
|
|
|
- if (chargingInfo[_index]->ConnectorTemp != UNDEFINED_TEMP)
|
|
|
- {
|
|
|
- if(chargingInfo[_index]->ConnectorTemp >= GUN_OTP_VALUE)
|
|
|
- RecordAlarmCode(_index, "012231");
|
|
|
- else if (chargingInfo[_index]->ConnectorTemp != 0 &&
|
|
|
- chargingInfo[_index]->ConnectorTemp < GUN_OTP_RECOVERY)
|
|
|
- ResetChargerAlarmCode(_index, "012231");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // 沒接上 Sensor or 異常
|
|
|
- RecordAlarmCode(_index, "011020");
|
|
|
- ResetChargerAlarmCode(_index, "012231");
|
|
|
- }
|
|
|
+// if (chargingInfo[_index]->ConnectorTemp != UNDEFINED_TEMP)
|
|
|
+// {
|
|
|
+// if(chargingInfo[_index]->ConnectorTemp >= GUN_OTP_VALUE)
|
|
|
+// RecordAlarmCode(_index, "012231");
|
|
|
+// else if (chargingInfo[_index]->ConnectorTemp != 0 &&
|
|
|
+// chargingInfo[_index]->ConnectorTemp < GUN_OTP_RECOVERY)
|
|
|
+// ResetChargerAlarmCode(_index, "012231");
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// // 沒接上 Sensor or 異常
|
|
|
+// RecordAlarmCode(_index, "011020");
|
|
|
+// ResetChargerAlarmCode(_index, "012231");
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -7009,6 +7154,7 @@ int main(void)
|
|
|
if (isModeChange(gun_index))
|
|
|
{
|
|
|
PRINTF_FUNC("================== S_PREPARING_FOR_EV (%x) ================ \n", gun_index);
|
|
|
+ _presentChargingTimeBuf[gun_index] = 0;
|
|
|
//strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
|
StartGunInfoTimeoutDet(gun_index, Timeout_EvChargingDet);
|
|
@@ -7030,6 +7176,7 @@ int main(void)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysConfig.OfflinePolicy == _OFFLINE_POLICY_FREE_CHARGING ||
|
|
|
ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE ||
|
|
|
+ !ocpp_get_startTransation_req(gun_index) ||
|
|
|
_isAllowChargingOnDisconnect)
|
|
|
{
|
|
|
ShmDcCommonData->startTransationFlag[gun_index] = START_TRANSATION_STATUS_PASS;
|
|
@@ -7081,6 +7228,11 @@ int main(void)
|
|
|
{
|
|
|
// 後臺要求停止
|
|
|
ChargingTerminalProcess(gun_index);
|
|
|
+ if (ShmDcCommonData->startTransationFlag[gun_index] == START_TRANSATION_STATUS_FAIL ||
|
|
|
+ ShmDcCommonData->startTransationFlag[gun_index] == START_TRANSATION_STATUS_WAIT)
|
|
|
+ {
|
|
|
+ PRINTF_FUNC("StartTransaction req fail. (%d) \n", gun_index);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// LCM => Pre-charging
|
|
@@ -7198,8 +7350,7 @@ int main(void)
|
|
|
ChangeStartOrStopDateTime(YES, gun_index);
|
|
|
}
|
|
|
|
|
|
- ftime(&endChargingTime[gun_index]);
|
|
|
- chargingInfo[gun_index]->PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+ SavePresentChargedDuration(gun_index);
|
|
|
|
|
|
if (chargingInfo[gun_index]->Type == _Type_Chademo)
|
|
|
{
|
|
@@ -7208,13 +7359,6 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
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))
|
|
|
-// {
|
|
|
-// // UVP
|
|
|
-// RecordAlarmCode(gun_index, "012289");
|
|
|
-// ChargingTerminalProcess(gun_index);
|
|
|
-// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -7228,14 +7372,6 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
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)))
|
|
|
-// {
|
|
|
-// // UVP
|
|
|
-// RecordAlarmCode(gun_index, "012290");
|
|
|
-// ChargingTerminalProcess(gun_index);
|
|
|
-// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -7249,13 +7385,6 @@ int main(void)
|
|
|
// GFD 錯誤停止
|
|
|
RecordAlarmCode(gun_index, "012235");
|
|
|
}
|
|
|
-// 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))
|
|
|
-// {
|
|
|
-// // UVP
|
|
|
-// RecordAlarmCode(gun_index, "012288");
|
|
|
-// ChargingTerminalProcess(gun_index);
|
|
|
-// }
|
|
|
else if (chargingInfo[gun_index]->GroundFaultStatus == GFD_WARNING)
|
|
|
{
|
|
|
// GFD 警告
|
|
@@ -7313,7 +7442,10 @@ int main(void)
|
|
|
TheEndCharging(gun_index);
|
|
|
}
|
|
|
else
|
|
|
+ {
|
|
|
+ ocpp_set_errCode_cmd(gun_index);
|
|
|
PRINTF_FUNC("================== S_TERMINATING (%x) ================ \n", gun_index);
|
|
|
+ }
|
|
|
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
|
}
|
|
@@ -7363,6 +7495,7 @@ int main(void)
|
|
|
{
|
|
|
if(chargingInfo[gun_index]->ConnectorPlugIn == NO &&
|
|
|
GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 10000000)
|
|
|
+ //if(GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 10000000)
|
|
|
{
|
|
|
setChargerMode(gun_index, MODE_IDLE);
|
|
|
}
|
|
@@ -7418,6 +7551,7 @@ int main(void)
|
|
|
|
|
|
if(chargingInfo[gun_index]->ConnectorPlugIn == NO &&
|
|
|
GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 10000000)
|
|
|
+ //if(GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 10000000)
|
|
|
{
|
|
|
setChargerMode(gun_index, MODE_IDLE);
|
|
|
}
|