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

[Improve][Moduralization][Module_OcppBackend / Module_Wifi / Module_Upgrade / WebPage]

2020.10.26 / Folus Wen

Actions:
1. Debug log output file naming align.
2. EVSE/rootfs/var/www/upgrade_iso_action.php delete all file at /mnt before upload image file.
3. EVSE/Modularization/Module_Wifi.c kill udhcpd command add specific wifi interface.
4. EVSE/Modularization/ocppfiles/MessageHandler.c improve meterValue sent out timing.
5. EVSE/Modularization/ocppfiles/MessageHandler.c stopTransaction add start SOC info.

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 жил өмнө
parent
commit
5ae0aecd18

+ 1 - 1
EVSE/Modularization/Module_Upgrade.c

@@ -42,7 +42,7 @@ int storeLogMsg(const char *fmt, ...)
     tm=localtime(&CurrentTime);
     gettimeofday(&tv, NULL); // get microseconds, 10^-6
 
-    sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_Upgrade",
+    sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_UpgradeLog",
             tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec,
             buffer,
             tm->tm_year+1900,tm->tm_mon+1);

+ 3 - 3
EVSE/Modularization/Module_Wifi.c

@@ -758,7 +758,7 @@ int setWPAconf()
 	sprintf(cmdBuf, "pgrep -f \"udhcpc -i %s\" | xargs kill", Wifi.currentInterface);
 	system(cmdBuf);
 
-	sprintf(cmdBuf, "pgrep -f \"udhcpd\" | xargs kill");
+	sprintf(cmdBuf, "pgrep -f \"udhcpd /etc/udhcpd.conf\" | xargs kill");
 	system(cmdBuf);
 
 	// Clear wifi configuration file
@@ -865,7 +865,7 @@ int setWPAconf()
 			sprintf(cmdBuf, "pgrep -f \"udhcpc -i %s\" | xargs kill", Wifi.currentInterface);
 			system(cmdBuf);
 				
-			sprintf(cmdBuf, "pgrep -f \"udhcpd\" | xargs kill");
+			sprintf(cmdBuf, "pgrep -f \"udhcpd /etc/udhcpd.conf\" | xargs kill");
 			system(cmdBuf);
 				
 			// Restart wpa_supplicant
@@ -4655,7 +4655,7 @@ void proc_killConnection()
 	sprintf(cmdBuf, "pgrep -f \"udhcpc -i %s\" | xargs kill", Wifi.currentInterface);
 	system(cmdBuf);
 	
-	sprintf(cmdBuf, "pgrep -f \"udhcpd\" | xargs kill");
+	sprintf(cmdBuf, "pgrep -f \"udhcpd /etc/udhcpd.conf\" | xargs kill");
 	system(cmdBuf);
 	
 	// Restart wpa_supplicant

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 544 - 574
EVSE/Modularization/ocppfiles/MessageHandler.c


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

@@ -1304,7 +1304,7 @@ int queue_operation(int type, char *frontUUID, char *frontData)
 			IsUsing = FALSE;
 			break;
 		}
-		usleep(500000);
+		usleep(100000);
 	}
 
 	return result;

+ 1 - 1
EVSE/Modularization/ocppfiles/SystemLogMessage.c

@@ -51,7 +51,7 @@ int StoreOcppMsg(const char *fmt, ...)
 	tm=localtime(&CurrentTime);
 	gettimeofday(&tv, NULL); // get microseconds, 10^-6
 
-	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >>  /Storage/OCPP/[%04d.%02d]OcppMessage",
+	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >>  /Storage/OCPP/[%04d.%02d]OcppMessageLog",
 			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec,
 			buffer,
 			tm->tm_year+1900,tm->tm_mon+1);

+ 1 - 1
EVSE/Projects/AW-CCS/Apps/LCM/Module_LcmControl.c

@@ -75,7 +75,7 @@ int StoreLogMsg(const char *fmt, ...)
 	tm=localtime(&CurrentTime);
 	gettimeofday(&tv, NULL); // get microseconds, 10^-6
 
-	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_LcmControl",
+	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_LcmControlLog",
 						tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec,
 						buffer,
 						tm->tm_year+1900,tm->tm_mon+1);

+ 1 - 1
EVSE/Projects/AW-CCS/Apps/Module_InternalComm.c

@@ -77,7 +77,7 @@ int StoreLogMsg(const char *fmt, ...)
 	tm=localtime(&CurrentTime);
 	gettimeofday(&tv, NULL); // get microseconds, 10^-6
 
-	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_InterComm",
+	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >> /Storage/SystemLog/[%04d.%02d]Module_InterCommLog",
 				tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec,
 				buffer,
 				tm->tm_year+1900,tm->tm_mon+1);

+ 1 - 1
EVSE/Projects/define.h

@@ -3691,7 +3691,7 @@ struct StructSampledValue
 struct StructMeterValue
 {
 	unsigned char 				TimeStamp[28];
-	struct StructSampledValue	SampledValue[10];
+	struct StructSampledValue	SampledValue[20];
 };
 struct StructConfigurationKeyItems
 {

+ 0 - 0
EVSE/rootfs/var/lib/.1


+ 1 - 1
EVSE/rootfs/var/www/upgrade_iso_action.php

@@ -41,7 +41,7 @@
 				// echo "<font color=#000fff>Upgrade is completed</font><br />";
 			}
 			//ob_start();
-			exec("rm /mnt/log.zip");
+			exec("rm /mnt/*");
 			sleep(1);
 			move_uploaded_file($_FILES["file"]["tmp_name"],"/mnt/".$_FILES["file"]["name"]);
 			chdir("/root");

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно