Browse Source

[Added][NoodoeAX][Module_FactoryConfig.c]
2022-11-14 / EASON YANG
Action:
1.Added : Customized factory settings for AX-32 model.

File:
1. Module_FactoryConfig.c
Action 1

FIRMWARE VERSION: B0.62.XX.XXXX.NX

8009 2 years ago
parent
commit
496def214e
1 changed files with 99 additions and 65 deletions
  1. 99 65
      EVSE/Projects/NoodoeAX/Apps/Module_FactoryConfig.c

+ 99 - 65
EVSE/Projects/NoodoeAX/Apps/Module_FactoryConfig.c

@@ -342,75 +342,109 @@ int main(int argc, char *argv[])
 	}
 	else if(SysConfig.ModelName[12] == 'N')
 	{
-		if(SysConfig.ModelName[13] == '1')
+		if((SysConfig.ModelName[2] == 'Y') || (SysConfig.ModelName[2] == 'D') || (SysConfig.ModelName[2] == 'W'))
 		{
-			SysConfig.AuthorisationMode = 1;		// 0: enable, 1: disable
-			SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
-			
-			SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-			strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
-			strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
-			
-			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
-			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
-			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-			strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
-		}
-		else if(SysConfig.ModelName[13] == '2')
-		{
-			SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
-			SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
-			
-			SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-			strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
-			strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
-			
-			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
-			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
-			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-			strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
-		}
-		else if(SysConfig.ModelName[13] == '3')
-		{
-			SysConfig.AuthorisationMode = 1;		// 0: enable, 1: disable
-			SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
-			
-			SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-			strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
-			strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
-			
-			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
-			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
-			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-			strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
-		}
-		else if(SysConfig.ModelName[13] == '4')
-		{
-			SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
-			SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
-			
-			SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-			strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
-			strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
-			
-			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
-			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
-			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-			strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			if(SysConfig.ModelName[13] == '0')
+			{
+				SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
+			else
+			{
+				SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
 		}
 		else
 		{
-			SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
-			SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
-			
-			SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
-			strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
-			strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
-			
-			SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
-			strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
-			sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
-			strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			if(SysConfig.ModelName[13] == '1')
+			{
+				SysConfig.AuthorisationMode = 1;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
+			else if(SysConfig.ModelName[13] == '2')
+			{
+				SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
+			else if(SysConfig.ModelName[13] == '3')
+			{
+				SysConfig.AuthorisationMode = 1;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
+			else if(SysConfig.ModelName[13] == '4')
+			{
+				SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
+			else
+			{
+				SysConfig.AuthorisationMode = 0;		// 0: enable, 1: disable
+				SysConfig.RfidCardNumEndian = 1;		// 0: Little endian 1: Big endian
+				
+				SysConfig.AthInterface.WifiMode = 1;	// 0: Disable 1: Infrastructure client 2: Infrastructure server	3: Ad-Hoc
+				strcpy((char *) SysConfig.AthInterface.WifiSsid, "NoodoeEV-LTE");				// default: Null
+				strcpy((char *) SysConfig.AthInterface.WifiPassword, "LTE4NoodoeEV");			// default: Null
+				
+				SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+				strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.noodoe.com:443/");
+				sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
+				strcpy((char *)SysConfig.chargePointVendor, "Noodoe");	// default: Null
+			}
 		}
 	}
 	else