|
@@ -577,7 +577,18 @@ uint8_t ocpp_get_reset_req()
|
|
|
}
|
|
|
else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
- result = ShmOCPP20Data->MsMsg.bits.ResetReq;
|
|
|
+ if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate") == 0)
|
|
|
+ {
|
|
|
+ result = ShmOCPP20Data->MsMsg.bits.ResetReq;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_TERMINATING)) &&
|
|
|
+ (AC_QUANTITY>1?((ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_TERMINATING)):TRUE))
|
|
|
+ {
|
|
|
+ result = ShmOCPP20Data->MsMsg.bits.ResetReq;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return result;
|
|
@@ -4775,12 +4786,9 @@ void checkStopReason(uint8_t gun_index)
|
|
|
{
|
|
|
sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "GroundFault");
|
|
|
}
|
|
|
- else if(ShmOCPP20Data->MsMsg.bits.ResetReq)
|
|
|
+ else if((ShmOCPP20Data->MsMsg.bits.ResetReq) && (strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0))
|
|
|
{
|
|
|
- if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0)
|
|
|
- sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
|
|
|
- else
|
|
|
- sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "OnIdle");
|
|
|
+ sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
|
|
|
}
|
|
|
else if(ShmCharger->gun_info[gun_index].rfidReq || ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop)
|
|
|
{
|