Browse Source

[Improve][AW-CCS][main.c]
2022-10-21 / EASON YANG
Action:
1. Improve: checkStopReason() function. For EVDisconnected logic, waring: pointer targets in passing argumnet added (char*).

File:
1. main.c
Action 1

FIRMWARE VERSION: B0.63.XX.XXXX.PX

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

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

@@ -5039,7 +5039,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)) && (strstr(ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemData, "TRUE") != NULL))
+		else if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A) || (ShmCharger->gun_info[gun_index].isGunUnpluggedBefore == YES)) && (strstr((char*)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));