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

[Added][AW-CCS][Module_FactoryConfig.c]
2022-10-17 / EASON YANG
Action:
1. Added: Added default setting configuration for Amazon.

File:
Action 1

FIRMWARE VERSION: B0.63.XX.XXXX.PX

8009 2 жил өмнө
parent
commit
59daf24b2b

+ 10 - 3
EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

@@ -335,6 +335,7 @@ int main(int argc, char *argv[])
 	// Customization configuration item
 	if(SysConfig.ModelName[12] == 'P')
 	{
+		// PHIHONG standard configuration
 		strcpy((char*)SysConfig.OcppServerURL, "");
 		sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
 		strcpy((char *)SysConfig.chargePointVendor, "");
@@ -359,10 +360,17 @@ int main(int argc, char *argv[])
 		strcpy((char*)SysConfig.chargePointVendor, "ChargeLab");
 		SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
 	}
-	else
+	else if(SysConfig.ModelName[12] == 'Z')
 	{
-
+		// AMAZON customization configuration
+		SysConfig.AuthorisationMode = 1;				// 0: enable, 1: disable
+		SysConfig.AthInterface.WifiMode = 0;			// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+		strcpy((char*)SysConfig.OcppServerURL, "");
+		strcpy((char*)SysConfig.ChargeBoxId, "");
+		strcpy((char *)SysConfig.chargePointVendor, "Amazon");
 	}
+	else
+	{}
 
 	// Copy default configuration to pointer
 	memcpy(ptr,&SysConfig,sizeof(struct SysConfigData));
@@ -418,7 +426,6 @@ int main(int argc, char *argv[])
 	fd = open("/mnt/FactoryDefaultConfig.bin", O_RDWR|O_CREAT|O_TRUNC);
 	if (fd < 0)
 	{
-
 		DEBUG_ERROR("open /mnt/FactoryDefaultConfig.bin NG\n");
 
 		free(ptr);