Jelajahi Sumber

[Improve][AW-Regular][main.c]
2022-07-20 / EASON YANG
Action:
1. Improve: checkConnectionTimeout() function. For OCPP 2.0 logic.

File:
1. main.c
Action 1

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

8009 2 tahun lalu
induk
melakukan
3ee92c5e55

+ 12 - 21
EVSE/Projects/AW-Regular/Apps/main.c

@@ -3473,28 +3473,19 @@ void checkConnectionTimeout()
 	}
 	else
 	{
-		if(strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData,"") != 0)
-		{
-			ShmCharger->timeoutSpec.Setting_Timeout_Spec = atoi((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
-			if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
-			{
-				ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
-				//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
-			}
-			else
-			{
-				ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
-				//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
-			}
-			//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
+		ShmCharger->timeoutSpec.Setting_Timeout_Spec = ocpp_get_connection_timeout();
+        if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
+        {
+            ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
+            //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
+        }
+        else
+        {
+            ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
+            //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
+        }
+        //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
 
-		}
-		else
-		{
-			ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
-			//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Table is blank...\n.");
-		}
-		//DEBUG_INFO("Present timeout spec : %d \n", ShmCharger->timeoutSpec.Present_Timeout_Spec);
 	}
 }
 

+ 1 - 0
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.byteswap.cmd

@@ -0,0 +1 @@
+cmd_MLO.byteswap := ./tools/mkimage -T omapimage -n byteswap -a 0x402F0400 -d spl/u-boot-spl.bin MLO.byteswap  >/dev/null

+ 1 - 0
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.cmd

@@ -0,0 +1 @@
+cmd_MLO := ./tools/mkimage -T omapimage -a 0x402F0400 -d spl/u-boot-spl.bin MLO  >/dev/null