|
@@ -4044,7 +4044,7 @@ bool CheckBackendChargingTimeout(byte gunIndex)
|
|
|
{
|
|
|
if (ShmSysConfigAndInfo->SysConfig.MaxChargingDuration > 0)
|
|
|
{
|
|
|
- if (chargingInfo[gunIndex]->RemainChargingDuration > (ShmSysConfigAndInfo->SysConfig.MaxChargingDuration * 60))
|
|
|
+ if (chargingInfo[gunIndex]->PresentChargedDuration > (ShmSysConfigAndInfo->SysConfig.MaxChargingDuration * 60))
|
|
|
result = true;
|
|
|
}
|
|
|
}
|
|
@@ -4053,7 +4053,7 @@ bool CheckBackendChargingTimeout(byte gunIndex)
|
|
|
// 隨插即充電的要看 offline
|
|
|
if (ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration > 0)
|
|
|
{
|
|
|
- if (chargingInfo[gunIndex]->RemainChargingDuration > (ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration * 60))
|
|
|
+ if (chargingInfo[gunIndex]->PresentChargedDuration > (ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration * 60))
|
|
|
result = true;
|
|
|
}
|
|
|
}
|
|
@@ -4455,7 +4455,9 @@ int main(void)
|
|
|
{
|
|
|
PRINTF_FUNC("S_IDLE================================== %x \n", gun_index);
|
|
|
chargingInfo[gun_index]->RemainChargingDuration = 0;
|
|
|
+ chargingInfo[gun_index]->PresentChargedDuration = 0;
|
|
|
chargingInfo[gun_index]->PresentChargedEnergy = 0;
|
|
|
+ chargingInfo[gun_index]->EvBatterySoc = 0;
|
|
|
strcpy((char *)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "");
|
|
|
}
|
|
|
else if (chargingInfo[gun_index]->SystemStatus == S_RESERVATION &&
|
|
@@ -4885,7 +4887,7 @@ int main(void)
|
|
|
OcppStartTransation(gun_index);
|
|
|
}
|
|
|
ftime(&endChargingTime[gun_index]);
|
|
|
- chargingInfo[gun_index]->RemainChargingDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+ chargingInfo[gun_index]->PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
|
|
|
if (chargingInfo[gun_index]->Type == _Type_Chademo)
|
|
|
{
|
|
@@ -4895,7 +4897,7 @@ int main(void)
|
|
|
RecordAlarmCode(gun_index, "012234");
|
|
|
}
|
|
|
else if ((chargingInfo[gun_index]->EvBatterytargetVoltage > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->RemainChargingDuration >= 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");
|
|
@@ -4918,7 +4920,7 @@ int main(void)
|
|
|
}
|
|
|
else if (isPrechargeStatus_gb(gun_index) == 10 &&
|
|
|
((chargingInfo[gun_index]->EvBatterytargetVoltage > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->RemainChargingDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
+ (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL)))
|
|
|
{
|
|
|
// UVP
|
|
|
RecordAlarmCode(gun_index, "012290");
|
|
@@ -4940,7 +4942,7 @@ int main(void)
|
|
|
RecordAlarmCode(gun_index, "012235");
|
|
|
}
|
|
|
else if ((chargingInfo[gun_index]->EvBatterytargetVoltage > 0 && chargingInfo[gun_index]->EvBatterytargetVoltage < SYSTEM_MIN_VOL) ||
|
|
|
- (chargingInfo[gun_index]->RemainChargingDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
+ (chargingInfo[gun_index]->PresentChargedDuration >= 10 && chargingInfo[gun_index]->PresentChargingVoltage < SYSTEM_MIN_VOL))
|
|
|
{
|
|
|
// UVP
|
|
|
RecordAlarmCode(gun_index, "012288");
|
|
@@ -5032,8 +5034,8 @@ int main(void)
|
|
|
PRINTF_FUNC ("complete......................... %x \n", gun_index);
|
|
|
OcppStopTransation(gun_index);
|
|
|
ftime(&endChargingTime[gun_index]);
|
|
|
- if (chargingInfo[gun_index]->RemainChargingDuration != 0)
|
|
|
- chargingInfo[gun_index]->RemainChargingDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+ if (chargingInfo[gun_index]->PresentChargedDuration != 0)
|
|
|
+ chargingInfo[gun_index]->PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
|
|
|
StopGunInfoTimeoutDet(gun_index);
|
|
|
StartGunInfoTimeoutDet(gun_index, Timeout_EvseCompleteDet);
|