|
@@ -7063,7 +7063,7 @@ int main(void)
|
|
|
if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A))
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
- DEBUG_INFO("The connector was unplugged under charging mode. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
+ DEBUG_INFO("The connector was unplugged under CHARGING. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
}
|
|
|
}
|
|
|
else if(ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_SOCKETE)
|
|
@@ -7071,7 +7071,7 @@ int main(void)
|
|
|
if(ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn != ON)
|
|
|
{
|
|
|
ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
- DEBUG_INFO("The socket e was unplugged under charging mode. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ DEBUG_INFO("The socket e was unplugged under CHARGING. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -7326,6 +7326,26 @@ int main(void)
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedDuration = getDiffSecBetween(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
//}
|
|
|
|
|
|
+ // If unplug the connector during a session, the system must stop charging and stop session.
|
|
|
+ if((ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_BS) || (ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_HLC))
|
|
|
+ {
|
|
|
+ if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A))
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The connector was unplugged under TERMINATING. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_SOCKETE)
|
|
|
+ {
|
|
|
+ if(ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn != ON)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The socket e was unplugged under TERMINATING. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {}
|
|
|
+
|
|
|
// End authorize pass
|
|
|
if(((ShmCharger->gun_info[gun_index].rfidReq == ON) && isMatchStartUser(gun_index)) ||
|
|
|
((ShmCharger->gun_info[gun_index].rfidReq == ON) && ocpp_get_auth_result(YES, gun_index)) ||
|