浏览代码

[Bug fix][modularization][Module_OcppBackend]

2020.10.22 / Folus Wen

Actions:
1. EVSE/Modularization/ocppfiles/MessageHandler.c handleChangeAvailabilityRequest() fix receive operactive request can not reactive on 360KW model.
2. EVSE/Modularization/ocppfiles/Module_OcppBackend.c improve queue message set out timing.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 年之前
父节点
当前提交
f7172a7218

+ 2 - 2
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -6619,7 +6619,7 @@ int handleChangeAvailabilityRequest(char *uuid, char *payload)
 
 					for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 					{
-						if ((gunType[i] == 'G')&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == i)&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_FAULT)) //S_FAULT  //(((gunIndex  == 0)|| ((gunIndex > 0)&&(gunType[gunIndex-1] == 'G')))&&(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus != SYS_MODE_FAULT)) //S_FAULT
+						if ((gunType[i] == 'O')&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.Index == i)&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus == SYS_MODE_FAULT)) //S_FAULT  //(((gunIndex  == 0)|| ((gunIndex > 0)&&(gunType[gunIndex-1] == 'O')))&&(ShmSysConfigAndInfo->SysInfo.GbChargingData[index].SystemStatus != SYS_MODE_FAULT)) //S_FAULT
 						{
 							//ShmOCPP16Data->CsMsg.bits[gunIndex - 1].ChangeAvailabilityReq = 1;
 							sprintf(comfirmstr, "%s", AvailabilityStatusStr[Rejected] );
@@ -6689,7 +6689,7 @@ int handleChangeAvailabilityRequest(char *uuid, char *payload)
 
 		for (int index = 0; index < GENERAL_GUN_QUANTITY; index++)
 		{
-			if (((gunIndex > 0)&&(gunType[gunIndex-1] == 'G'))&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus != SYS_MODE_FAULT)) //S_FAULT
+			if (((gunIndex > 0)&&(gunType[gunIndex-1] == 'O'))&&(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[index].GeneralChargingData.SystemStatus != SYS_MODE_FAULT)) //S_FAULT
 			{
 				sprintf(comfirmstr, "%s", AvailabilityStatusStr[Accepted] );
 				goto end;

+ 2 - 2
EVSE/Modularization/ocppfiles/Module_OcppBackend.c

@@ -1131,7 +1131,7 @@ void* processTransactionQueue(void* data)
 
 	while(1)
 	{
-		if(!req_SendQueue && ((((time((time_t*)NULL) - startTimeQueue) > (TransactionMessageRetryIntervalGet()>10?TransactionMessageRetryIntervalGet():10))) || (isWebsocketSendable && ((time((time_t*)NULL) - startTimeQueue) >= ((counterQueueSent>=10)?10:1)))))
+		if(!req_SendQueue && ((((time((time_t*)NULL) - startTimeQueue) > (TransactionMessageRetryIntervalGet()>10?TransactionMessageRetryIntervalGet():10))) || (isWebsocketSendable && ((time((time_t*)NULL) - startTimeQueue) >= ((counterQueueSent>=20)?5:0)))))
 		{
 			if(FirstHeartBeatResponse() == 1)
 			{
@@ -1203,7 +1203,7 @@ void* processTransactionQueue(void* data)
 			}
 		}
 
-		usleep(100000);
+		usleep(500000);
 	}
 
 	pthread_exit(NULL); //

二进制
EVSE/Projects/AW-CCS/Apps/CCS/QCA7000_Flash_001823078881.bin