Browse Source

[Improve][AW-Regular][main.c]
2022-09-22 / EASON YANG
Action:
1. Improve: checkStopReason() function. Copy StartUserId into StopTransaction[gun_index].IdTag when RemoteStopTransactionReq is ON.

File:
1. main.c
Action 1

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

8009 2 years ago
parent
commit
a8cc7e3e94
1 changed files with 2 additions and 0 deletions
  1. 2 0
      EVSE/Projects/AW-Regular/Apps/main.c

+ 2 - 0
EVSE/Projects/AW-Regular/Apps/main.c

@@ -4088,6 +4088,7 @@ void checkStopReason(uint8_t gun_index)
 		else if(ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStopTransactionReq)
 		{
 			sprintf((char*)ShmOCPP16Data->StopTransaction[gun_index].StopReason, "Remote");
+			memcpy((char*)ShmOCPP16Data->StopTransaction[gun_index].IdTag, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmOCPP16Data->StopTransaction[gun_index].IdTag));
 		}
 		else if(ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor == ON)
 		{
@@ -4148,6 +4149,7 @@ void checkStopReason(uint8_t gun_index)
 		else if(ShmOCPP20Data->CsMsg.bits[gun_index].RequestStopTransactionReq)
 		{
 			sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "Remote");
+			memcpy((char*)ShmOCPP20Data->TransactionEvent[gun_index].idToken.idToken, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId));
 		}
 		else if(ShmCharger->gun_info[ShmOCPP20Data->UnlockConnector[gun_index].connectorId-1].isUnlockerConnetor == ON)
 		{