Browse Source

2022-03-15/Jerry Wang
Action:
1. Modify clear StatusNotificationReq flag timing.

File:
1. EVSE/Modularization/ocppfiles/MessageHandler.c
--> Action 1
2. EVSE/Modularization/ocppph/MessageHandler.c
--> Action 1

Jerry Wang 3 years ago
parent
commit
9eb151fb40

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

@@ -6445,6 +6445,8 @@ S_FAULT                 =12
 
 	if((server_sign == TRUE) && isStateChanged)
 	{
+		cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
+		cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
 		LWS_Send(message);
 
 		sprintf(tempdata, "StatusNotification,%d", (gun_index));
@@ -15727,8 +15729,8 @@ void handleStatusNotificationResponse(char *payload, int gun_index)
 	mtrace();
 	DEBUG_INFO("handleStatusNotificationResponse...\n");
 
-	cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
-	cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
+	//cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
+	//cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
 	cpinitateMsg.bits[gun_index].StatusNotificationConf = 1;
 
 }

+ 4 - 2
EVSE/Modularization/ocppph/MessageHandler.c

@@ -5978,6 +5978,8 @@ S_FAULT                 =12
 
 	if((server_sign == TRUE) && isStateChanged)
 	{
+		cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
+		cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
 		LWS_Send(message);
 
 		sprintf(tempdata, "StatusNotification,%d", (gun_index));
@@ -15229,8 +15231,8 @@ void handleStatusNotificationResponse(char *payload, int gun_index)
 	mtrace();
 	DEBUG_INFO("handleStatusNotificationResponse...\n");
 
-	cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
-	cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
+	//cpinitateMsg.bits[gun_index].TriggerStatusNotificationReq = 0;
+	//cpinitateMsg.bits[gun_index].StatusNotificationReq = 0;
 	cpinitateMsg.bits[gun_index].StatusNotificationConf = 1;
 
 }