Selaa lähdekoodia

[Improve][AW-Regular][main.c]
2022-10-14 / EASON YANG
Action:
1. Improve: checkStopReason() function. EVDisconnected needs to check StopTransactionOnEVSideDisconnect key.

File:
1. main.c
Action 1

FIRMWARE VERSION: V0.72.XX.XXXX.PX

8009 2 vuotta sitten
vanhempi
commit
b37f1be0ef
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      EVSE/Projects/AW-Regular/Apps/main.c

+ 1 - 1
EVSE/Projects/AW-Regular/Apps/main.c

@@ -4144,7 +4144,7 @@ void checkStopReason(uint8_t gun_index)
 			sprintf((char*)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EmergencyStop");
 			memcpy((char*)ShmOCPP16Data->StopTransaction[gun_index].IdTag, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmOCPP16Data->StopTransaction[gun_index].IdTag));
 		}
-		else if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A) || (ShmCharger->gun_info[gun_index].isGunUnpluggedBefore == YES))
+		else if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A) || (ShmCharger->gun_info[gun_index].isGunUnpluggedBefore == YES)) && (strstr(ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemData, "TRUE") != NULL))
 		{
 			sprintf((char*)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "EVDisconnected");
 			memcpy((char*)ShmOCPP16Data->StopTransaction[gun_index].IdTag, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmOCPP16Data->StopTransaction[gun_index].IdTag));