|
@@ -7062,16 +7062,22 @@ 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. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ 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)
|
|
|
{
|
|
|
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. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The socket e was unplugged under CHARGING. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -7331,16 +7337,22 @@ 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 TERMINATING. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ 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");
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The socket e was unplugged under TERMINATING. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
@@ -7519,7 +7531,11 @@ int main(void)
|
|
|
if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A))
|
|
|
{
|
|
|
setRequest(gun_index,OFF);
|
|
|
- ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The connector was unplugged under ALARM. [CHARGING_MODE_BS / CHARGING_MODE_HLC]. \n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else if(ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_SOCKETE)
|
|
@@ -7527,7 +7543,11 @@ int main(void)
|
|
|
if(ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn != ON)
|
|
|
{
|
|
|
setRequest(gun_index,OFF);
|
|
|
- ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ if(ShmCharger->gun_info[gun_index].isGunUnpluggedBefore != YES)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[gun_index].isGunUnpluggedBefore = YES;
|
|
|
+ DEBUG_INFO("The socket e was unplugged under ALARM. [CHARGING_MODE_SOCKETE]. \n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|