Эх сурвалжийг харах

[Improve][AW-Regular][main.c]
2022-10-13 / EASON YANG
Action:
1. Improve: ocpp_get_auth_result() function. A card start and B card stop needs to check Authorize.ResponseIdTagInfo.ParentIdTag string length must bigger than 0.

File:
1. main.c
Action 1

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

8009 2 жил өмнө
parent
commit
adb72e154c

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

@@ -802,7 +802,8 @@ uint8_t ocpp_get_auth_result(uint8_t gun_index)
 			if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
 			{
 				if((strcmp((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status, "Accepted")==0) &&
-				   (strcmp((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ParentIdTag, (char*)ShmOCPP16Data->StartTransaction[gun_index].ResponseIdTagInfo.ParentIdTag)==0))
+				   (strcmp((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ParentIdTag, (char*)ShmOCPP16Data->StartTransaction[gun_index].ResponseIdTagInfo.ParentIdTag)==0) &&
+				   (strlen((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ParentIdTag)>0))
 					result = PASS;
 
 				DEBUG_INFO("==== [SYS_MODE_CHARGING/SYS_MODE_TERMINATING] ====\n");