Browse Source

[Improve][AW-Regular][Module_FactoryConfig.c]
Action
1.Improve: Identify model and default factory settings.
2.Added: Default maintain server URL to (wss://ocpp.phihong.com.tw:2013/) for phihong standard.

File
1. Module_FactoryConfig.c
Action 1
Action 2

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

8009 3 years ago
parent
commit
31ea4943cc
1 changed files with 5 additions and 1 deletions
  1. 5 1
      EVSE/Projects/AW-Regular/Apps/Module_FactoryConfig.c

+ 5 - 1
EVSE/Projects/AW-Regular/Apps/Module_FactoryConfig.c

@@ -307,6 +307,8 @@ int main(int argc, char *argv[])
 	// Backend configuration
 	strcpy((char*)SysConfig.OcppServerURL, "");
 	sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+	strcpy((char *)SysConfig.chargePointVendor, "");	// default: Null
+	strcpy((char*)SysConfig.MaintainServerURL, "");
 	SysConfig.BackendConnTimeout=300; 		// 300 seconds
 	SysConfig.OfflinePolicy = 2;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
 	SysConfig.OfflineMaxChargeEnergy = 0;	// 0: Same as MaxChargeEnergy	Other: 1~65535KWH
@@ -314,11 +316,13 @@ int main(int argc, char *argv[])
 	//SysConfig.isReqFirstUpgrade = 1;		// 0: Skip first upgrade, 	1: Process first upgrade
 
 	// Customization configuration item
-	if(strstr((char*)&SysConfig.ModelName[12], "P0") != NULL)
+	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, "");	// default: Null
+		strcpy((char*)SysConfig.MaintainServerURL, "wss://ocpp.phihong.com.tw:2013/");
 	}
 	else if(SysConfig.ModelName[12] == 'A')
 	{