Parcourir la source

2020-03-06 /Eason Yang
1.Change:main.c Reason : synchronize to Platform_CSU3.
2.Change:main.h Reason : synchronize to Platform_CSU3.
3.Change:Module_FactoryConfig.c Reason : FtpServer default null.
Version : B0.20.00.0000.00

8009 il y a 5 ans
Parent
commit
7b5ab91446

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

@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
 	SysConfig.AcPhaseCount = 1;			// 1: One phase	3: Three phase
 
 	// Network configuration
-	strcpy((char*)SysConfig.FtpServer, "ftp://ipc_ui:pht2016@ftp.phihong.com.tw/");
+	strcpy((char*)SysConfig.FtpServer, "");
 	SysConfig.Eth0Interface.EthDhcpClient = 0;
 	strcpy((char*)SysConfig.Eth0Interface.EthIpAddress, "192.168.1.10");
 	strcpy((char*)SysConfig.Eth0Interface.EthSubmaskAddress, "255.255.255.0");

+ 27 - 14
EVSE/Projects/AW-Regular/Apps/main.c

@@ -1063,7 +1063,7 @@ void get_firmware_version(unsigned char gun_index)
 	strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
 
 	// Get CSU root file system version
-	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.19.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.20.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -1763,6 +1763,7 @@ int main(void)
 		ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PreviousSystemStatus = 0xff;
 		ShmCharger->gun_info[gun_index].primaryMcuState.rotatory_switch = 0xff;
 		ShmCharger->gun_info[gun_index].mcuResetRequest.isMcuResetRequest = ON;
+		ShmCharger->gun_info[gun_index].isInitialPass = NO;
 	}
 
 	// Main loop
@@ -1875,23 +1876,29 @@ int main(void)
 			else
 				ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargingPower = 0;
 
-			// Alarm event check
-			if((ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode>0))
+			// The system switch to Booting mode
+			if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == 0XFF)
 			{
-				if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus != SYS_MODE_ALARM)
-				{
-					setChargerMode(gun_index, SYS_MODE_ALARM);
-				}
+				setChargerMode(gun_index, SYS_MODE_BOOTING);
 			}
-			else
+
+			// Check initialization "PASS" or "FAIL"
+			if(ShmCharger->gun_info[gun_index].isInitialPass == YES)
 			{
-				if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_ALARM)
+				// Alarm event check
+				if((ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode>0))
 				{
-
+					if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus != SYS_MODE_ALARM)
+					{
+						setChargerMode(gun_index, SYS_MODE_ALARM);
+					}
 				}
-				else if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == 0XFF)
+				else
 				{
-					setChargerMode(gun_index, SYS_MODE_BOOTING);
+					if(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_ALARM)
+					{
+
+					}
 				}
 			}
 
@@ -1980,8 +1987,13 @@ int main(void)
 						DEBUG_INFO("Wifi password: %s\r\n",  ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword);
 						DEBUG_INFO("==========================================\r\n");
 
+						// Flag for initialization system success
+						ShmCharger->gun_info[gun_index].isInitialPass = YES;
+
+						// Set max current to rating current
 						ShmCharger->gun_info[gun_index].primaryMcuCp_Pwn_Duty.max_current = ShmCharger->gun_info[gun_index].primaryMcuState.rating_current;
 
+						// If rotate switch equal zero, the system needs to change Debug mode
 						if(ShmCharger->gun_info[gun_index].primaryMcuState.rotatory_switch == 0)
 							setChargerMode(gun_index, SYS_MODE_DEBUG);
 						else
@@ -2473,9 +2485,10 @@ int main(void)
 					   (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A) ||
 					   ShmOCPP16Data->MsMsg.bits.ResetReq)
 					{
-						setSpeaker(ON,SPEAKER_SHORT);
+						if(ShmCharger->gun_info[gun_index].legacyRequest.isLegacyRequest == ON)
+							setSpeaker(ON,SPEAKER_SHORT);
+
 						setRelay(gun_index, OFF);
-						sleep(5);
 
 						if(!ShmCharger->gun_info[gun_index].primaryMcuState.relay_state)
 						{

+ 1 - 0
EVSE/Projects/AW-Regular/Apps/main.h

@@ -395,6 +395,7 @@ typedef struct GUN_INFO
 	uint8_t											isAuthPassEnd:1;
 	uint8_t											rfidReq:1;
 	uint8_t											isGunPlugged:1;
+	uint8_t											isInitialPass:1;
 }Gun_Info;
 
 struct Charger

BIN
EVSE/Projects/AW-Regular/Images/FactoryDefaultConfig.bin


BIN
EVSE/Projects/AW-Regular/Images/MLO


BIN
EVSE/Projects/AW-Regular/Images/ramdisk.gz


BIN
EVSE/Projects/AW-Regular/Images/u-boot.img


BIN
EVSE/Projects/AW-Regular/Images/zImage


BIN
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/.tmp_vmlinux1


BIN
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/.tmp_vmlinux2


+ 1 - 1
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/.version

@@ -1 +1 @@
-401
+402