Prechádzať zdrojové kódy

Merge branch 'Noodoe'

FolusWen 4 rokov pred
rodič
commit
a8a33695a7

+ 16 - 3
EVSE/Projects/Noodoe/Apps/main.c

@@ -28,7 +28,7 @@
 #define TMR_IDX_9 						9
 
 #define TIMEOUT_SPEC_HANDSHAKING		180000
-#define TIMEOUT_SPEC_AUTH				15000
+#define TIMEOUT_SPEC_AUTH				60000
 #define TIMEOUT_SPEC_HANDSHAKING_LED	185000
 #define TIMEOUT_SPEC_LOGPPRINTOUT		30000
 #define TIMEOUT_SPEC_PROFILE_PREPARE	5000
@@ -998,6 +998,19 @@ void InitEthernet()
 					sprintf(tmpbuf, "/sbin/udhcpc -i eth0 -x hostname:CSU3_%s -s /root/dhcp_script/eth0.script > /dev/null &", ShmSysConfigAndInfo->SysConfig.SystemId);
 					system(tmpbuf);
 				}
+				else
+				{
+					system("pgrep -f \"udhcpc -i eth0\" | xargs kill");
+					memset(tmpbuf,0,256);
+				        sprintf(tmpbuf,"/sbin/ifconfig eth0 %s netmask %s up &",
+					        ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,
+					        ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
+					system(tmpbuf);
+					memset(tmpbuf,0,256);
+					sprintf(tmpbuf,"route add default gw %s eth0 &",
+					ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
+					system(tmpbuf);
+				}
 			}
 
 			if(isReachableInternet() == PASS)
@@ -1275,7 +1288,7 @@ void get_firmware_version(unsigned char gun_index)
 	strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
 
 	// Get CSU root file system version
-	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "V0.49.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "V0.50.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -1760,7 +1773,7 @@ int isReachableInternet()
 	}
 	pclose(fp);
 	memset(buf, 0x00, sizeof(buf));
-	
+
 	// Get gateway
 	fp = popen("ip route", "r");
 	if(fp == NULL)

BIN
EVSE/Projects/Noodoe/Images/ramdisk.gz


BIN
EVSE/rootfs/root/OcppBackend20