Przeglądaj źródła

Merge branch 'master' into AW-Regular

FolusWen 5 lat temu
rodzic
commit
4ede19428e

+ 1 - 0
EVSE/Modularization/Makefile

@@ -13,6 +13,7 @@ clean:
 	rm -f OcppBackend
 	rm -f libPhihong_PsuCommObj.a
 	rm -f libModule_Upgrade.a
+	rm -f libInfypwr_PsuCommObj.a
 
 Module_RFIDLib:
 	rm -f libModule_RFID.a

+ 16 - 6
EVSE/Modularization/WebService.c

@@ -156,7 +156,7 @@ int ConnectorType(char* connector){
 		result= 4;//AC
 	}
 	else{
-
+		result= 0;
 	}
 	return result;
 }
@@ -235,7 +235,7 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 	if (fd < 0)
 	{
 		#ifdef SystemLogMessage
-		StoreLogMsg("[main]StoreUsrConfigData: open /dev/mtdblock10 NG");
+		StoreLogMsg("[WebService]StoreUsrConfigData: open /dev/mtdblock10 NG");
 		#endif
 		return 0;
 	}
@@ -244,7 +244,7 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 	if(wrd!=(sizeof(struct SysConfigData)))
 	{
 		#ifdef SystemLogMessage
-		StoreLogMsg("[main]StoreUsrConfigData: write /dev/mtdblock10 NG");
+		StoreLogMsg("[WebService]StoreUsrConfigData: write /dev/mtdblock10 NG");
 		#endif
 		return 0;
 	}
@@ -253,7 +253,7 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 	if (fd < 0)
 	{
 		#ifdef SystemLogMessage
-		StoreLogMsg("[main]StoreUsrConfigData: open /dev/mtdblock11(backup) NG");
+		StoreLogMsg("[WebService]StoreUsrConfigData: open /dev/mtdblock11(backup) NG");
 		#endif
 		return 0;
 	}
@@ -262,7 +262,7 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
    	if(wrd!=(sizeof(struct SysConfigData)))
 	{
 		#ifdef SystemLogMessage
-		StoreLogMsg("[main]StoreUsrConfigData: write /dev/mtdblock11(backup) NG");
+		StoreLogMsg("[WebService]StoreUsrConfigData: write /dev/mtdblock11(backup) NG");
 		#endif
 		return 0;
 	}
@@ -565,7 +565,17 @@ int main(int argc, char *argv[]) {
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,ChargeBoxId);
 		}
 
-		StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
+		int result = StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
+		if(result != 1){
+			#ifdef SystemLogMessage
+			StoreLogMsg("[WebService]StoreUsrConfigData: normal NG");
+			#endif
+		}
+		else{
+			#ifdef SystemLogMessage
+			StoreLogMsg("[WebService]StoreUsrConfigData: normal OK");
+			#endif
+		}
 
 		#ifdef SystemLogMessage
 			DEBUG_INFO("WebServiceConfig update OK");

BIN
EVSE/Modularization/libInfypwr_PsuCommObj.a


BIN
EVSE/Projects/DS60-120/Apps/Ev_Comm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_EvComm


BIN
EVSE/Projects/DS60-120/Apps/Module_EvComm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_EventLogging


BIN
EVSE/Projects/DS60-120/Apps/Module_EventLogging.o


BIN
EVSE/Projects/DS60-120/Apps/Module_InternalComm


BIN
EVSE/Projects/DS60-120/Apps/Module_InternalComm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_LcmControl


BIN
EVSE/Projects/DS60-120/Apps/Module_LcmControl.o


BIN
EVSE/Projects/DS60-120/Apps/Module_PrimaryComm


BIN
EVSE/Projects/DS60-120/Apps/Module_PrimaryComm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_PsuComm


BIN
EVSE/Projects/DS60-120/Apps/Module_PsuComm.o


BIN
EVSE/Projects/DS60-120/Apps/PrimaryComm.o


BIN
EVSE/Projects/DS60-120/Apps/ReadCmdline


BIN
EVSE/Projects/DS60-120/Apps/ReadCmdline.o


BIN
EVSE/Projects/DS60-120/Apps/internalComm.o


BIN
EVSE/Projects/DS60-120/Apps/main


BIN
EVSE/Projects/DS60-120/Apps/main.o


BIN
EVSE/Projects/DS60-120/Apps/timeout.o


+ 3 - 5
EVSE/Projects/define.h

@@ -40,7 +40,7 @@ Storage							0x0A200000-0x7FFFFFFF		1886 MB
 #define CHAdeMO_QUANTITY	1
 #define CCS_QUANTITY		1
 #define GB_QUANTITY			0
-#define AC_QUANTITY			1
+#define AC_QUANTITY			0
 #define PSU_QUANTITY		2
 #define ONE_CONNECTOR_USE	0
 
@@ -141,11 +141,9 @@ struct SysConfigData
 	unsigned short	   		MaxChargingEnergy;			//0: no limit,	1 ~ 65535	kWh
 	unsigned short	   		MaxChargingPower;			//0: rating value, 1 ~ RATING_POWER	kW"
 	unsigned short	   		MaxChargingCurrent;			//0: rating value, 1 ~ RATING_CURRENT	amp"
-	unsigned short	   		MaxChargingDuration;			//0: no limit,	1 ~ 65535	minutes
+	unsigned short	   		MaxChargingDuration;		//0: no limit,	1 ~ 65535	minutes
 	unsigned char   		PhaseLossPolicy;			//0: charging,  1: stop charging
-	unsigned char   		LocalWhiteCard[10][32];			//Max. card quantity is 10
-	unsigned char			CcsAuthentication;			//0:EIM, 1:EIM&PnC mixed
-	unsigned char			AcCcsChargingMode;			//0:BC(PWM) only, 1:BC&PLC mixed
+	unsigned char   		LocalWhiteCard[10][32];		//Max. card quantity is 10
 	unsigned char 			UserId[32];					//the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
 	/**************Network***************/
 	unsigned char 			FtpServer[32];				//the ftp server for Phihong server to do data transimission

+ 1 - 0
EVSE/rootfs/etc/lighttpd/lighttpd.conf

@@ -19,6 +19,7 @@ server.stat-cache-engine        = "simple"
 server.max-connections          = 1024
 server.follow-symlink           = "enable"
 server.upload-dirs              = ( "/mnt" )
+server.max-request-size = 131072 #128M
 
 ssl.engine = "enable"
 ssl.pemfile = "/etc/lighttpd/ssl/lighttpd.pem"

+ 2 - 2
EVSE/rootfs/etc/php.ini

@@ -657,7 +657,7 @@ auto_globals_jit = On
 ; Its value may be 0 to disable the limit. It is ignored if POST data reading
 ; is disabled through enable_post_data_reading.
 ; http://php.net/post-max-size
-post_max_size = 8M
+post_max_size = 128M
 
 ; Automatically add files before PHP document.
 ; http://php.net/auto-prepend-file
@@ -817,7 +817,7 @@ file_uploads = On
 
 ; Maximum allowed size for uploaded files.
 ; http://php.net/upload-max-filesize
-upload_max_filesize = 64M
+upload_max_filesize = 128M
 
 ; Maximum number of files that can be uploaded via a single request
 max_file_uploads = 20