Browse Source

Merge branch 'master' into DO360

Wendell 2 năm trước cách đây
mục cha
commit
3b3430c77d
42 tập tin đã thay đổi với 328 bổ sung1146 xóa
  1. 5 0
      EVSE/Projects/AW-CCS/Apps/CCS/Makefile
  2. 1 0
      EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c
  3. 119 83
      EVSE/Projects/AW-CCS/Apps/main.c
  4. 30 29
      EVSE/Projects/AW-Regular/Apps/main.c
  5. 9 7
      EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c
  6. 52 54
      EVSE/Projects/DD360Tcci/Apps/CSU/main.c
  7. 2 0
      EVSE/Projects/DD360Tcci/Apps/Config.h
  8. 5 5
      EVSE/Projects/DD360Tcci/Apps/DataBase/DataBase.c
  9. 4 4
      EVSE/Projects/DD360Tcci/Apps/Log/log.h
  10. 5 2
      EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.c
  11. 3 3
      EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.h
  12. 26 17
      EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c
  13. 0 2
      EVSE/Projects/DD360Tcci/Apps/ModulePrimary/Module_PrimaryComm.c
  14. 20 2
      EVSE/Projects/DD360Tcci/Apps/ModuleUpdateFW/Module_UpdateFW.c
  15. 26 1
      EVSE/Projects/DD360Tcci/Apps/ReadCmdline.c
  16. BIN
      EVSE/Projects/DD360Tcci/Images/ramdisk.gz
  17. BIN
      EVSE/Projects/DD360Tcci/output/FactoryConfig
  18. BIN
      EVSE/Projects/DD360Tcci/output/Module_ChkSysTask
  19. BIN
      EVSE/Projects/DD360Tcci/output/Module_DoComm
  20. BIN
      EVSE/Projects/DD360Tcci/output/Module_EvComm
  21. BIN
      EVSE/Projects/DD360Tcci/output/Module_EventLogging
  22. BIN
      EVSE/Projects/DD360Tcci/output/Module_InternalComm
  23. BIN
      EVSE/Projects/DD360Tcci/output/Module_LcmControl
  24. BIN
      EVSE/Projects/DD360Tcci/output/Module_PrimaryComm
  25. BIN
      EVSE/Projects/DD360Tcci/output/Module_UpdateFW
  26. BIN
      EVSE/Projects/DD360Tcci/output/ReadCmdline
  27. BIN
      EVSE/Projects/DD360Tcci/output/main
  28. 9 4
      EVSE/Projects/EVSE-Emulator/Apps/CCS/Makefile
  29. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/CsuComm
  30. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/FWUpdate
  31. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/FactoryConfig
  32. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/PCBATester
  33. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/SeccComm
  34. 0 14
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/cacert.pem
  35. 0 24
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/cakey.pem
  36. BIN
      EVSE/Projects/EVSE-Emulator/Apps/Images/root/main
  37. 4 4
      EVSE/Projects/define.h
  38. 6 6
      EVSE/rootfs/var/www/set_charging.php
  39. 1 0
      board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.byteswap.cmd
  40. 1 0
      board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.cmd
  41. 0 27
      board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.checkpatch.conf
  42. 0 858
      board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.config

+ 5 - 0
EVSE/Projects/AW-CCS/Apps/CCS/Makefile

@@ -128,8 +128,13 @@ PCBATesterTask:
 	rm -f PCBATester
 
 init:
+ifeq ($(CCSType),AWCCS)
+	rm -rfv ../../Images/root
+	mkdir -p ../../Images/root
+else
 	rm -rfv ../Images/root
 	mkdir -p ../Images/root
+endif
 #	cp -rfv ../Images/boot/reset_soft.sh ../Images/root/
 #	cp -rfv ../Images/boot/stop.sh ../Images/root/
 #	cp -rfv ../Images/boot/reboot.sh ../Images/root/

+ 1 - 0
EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

@@ -307,6 +307,7 @@ int main(int argc, char *argv[])
 	strcpy((char *) SysConfig.AthInterface.WifiPassword, "");			// default: Null
 	SysConfig.AthInterface.WifiDhcpServer = 0;							// 0: Enable 1: Disable
 	SysConfig.AthInterface.WifiDhcpClient = 0;							// 0: Enable 1: Disable
+	SysConfig.AthInterface.WifiBroadcastSsid = 1;						// 0: hidden 1: broadcast
 
 	// Telecom configuration
 	strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "");			// default: Null

+ 119 - 83
EVSE/Projects/AW-CCS/Apps/main.c

@@ -577,7 +577,18 @@ uint8_t ocpp_get_reset_req()
 	}
 	else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
 	{
-		result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+		if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate") == 0)
+		{
+			result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+		}
+		else
+		{
+			if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_TERMINATING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_COMPLETE)) &&
+			   (AC_QUANTITY>1?((ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_TERMINATING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_COMPLETE)):TRUE))
+			{
+				result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+			}
+		}
 	}
 
 	return result;
@@ -791,7 +802,8 @@ uint8_t ocpp_get_auth_result(uint8_t isValidParent, ...)
 				}
 				else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
 				{
-					if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0))
+					if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0) &&
+					   (strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->ControllerComponentVariable[AuthCtrlr_MasterPassGroupId].variableAttribute[0].value) != 0))
 						result = PASS;
 				}
 
@@ -823,7 +835,8 @@ uint8_t ocpp_get_auth_result(uint8_t isValidParent, ...)
 					*/
 					
 					if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0) &&
-					   (strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->TransactionEvent[gun_index].Response_idTokenInfo.groupIdToken.idToken)==0))
+					   ((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->TransactionEvent[gun_index].Response_idTokenInfo.groupIdToken.idToken) == 0) ||
+						(strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->ControllerComponentVariable[AuthCtrlr_MasterPassGroupId].variableAttribute[0].value) == 0)))
 						result = PASS;
 				}
 
@@ -841,7 +854,8 @@ uint8_t ocpp_get_auth_result(uint8_t isValidParent, ...)
 		}
 		else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
 		{
-			if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0))
+			if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0) &&
+			   (strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->ControllerComponentVariable[AuthCtrlr_MasterPassGroupId].variableAttribute[0].value) != 0))
 				result = PASS;
 		}
 	}
@@ -2757,6 +2771,14 @@ void InitEthernet()
 				DEBUG_INFO("Bridge uap0 & eth0 for local power sharing by ethernet.\n");
 			}
 
+			// Change uap0 to low priority
+			if(ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharing &&
+			  (ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode == 2) &&
+			  (isUap0up() == PASS))
+			{
+				system("/sbin/ifmetric uap0 1");
+			}
+
 			sleep(5);
 		}
 	}
@@ -4772,12 +4794,9 @@ void checkStopReason(uint8_t gun_index)
 		{
 			sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "GroundFault");
 		}
-		else if(ShmOCPP20Data->MsMsg.bits.ResetReq)
+		else if((ShmOCPP20Data->MsMsg.bits.ResetReq) && (strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0))
 		{
-			if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0)
-				sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
-			else
-				sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "OnIdle");
+			sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
 		}
 		else if(ShmCharger->gun_info[gun_index].rfidReq || ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop)
 		{
@@ -4948,6 +4967,7 @@ void checkHandshakeCountdown(uint8_t gun_index)
 void checkRfidAuthrize()
 {
 	static uint8_t isCheckdResult = FALSE;
+	static uint8_t isReadable = TRUE;
 	uint8_t isStartByWrongReservation = NO;
 
 	if(!ShmCharger->isAuthrizing)
@@ -4955,85 +4975,94 @@ void checkRfidAuthrize()
 		// Read RFID
 		if(GetCardSerialNumber() != FAIL)
 		{
-			uint8_t isSnStart = FALSE;
-			uint8_t bufferRFID[ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId)];
-
-			if(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian)
+			if(isReadable == TRUE)
 			{
-				// Big endian
-				switch(rfid.snType)
+				uint8_t isSnStart = FALSE;
+				uint8_t bufferRFID[ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId)];
+
+				if(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian)
 				{
-					case RFID_SN_TYPE_6BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5]);
-						break;
-					case RFID_SN_TYPE_7BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5], rfid.currentCard[6]);
-						break;
-					case RFID_SN_TYPE_10BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5], rfid.currentCard[6], rfid.currentCard[7], rfid.currentCard[8], rfid.currentCard[9]);
-						break;
-					case RFID_SN_TYPE_4BYTE:
-					default:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3]);
-						break;
+					// Big endian
+					switch(rfid.snType)
+					{
+						case RFID_SN_TYPE_6BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5]);
+							break;
+						case RFID_SN_TYPE_7BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5], rfid.currentCard[6]);
+							break;
+						case RFID_SN_TYPE_10BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3], rfid.currentCard[4], rfid.currentCard[5], rfid.currentCard[6], rfid.currentCard[7], rfid.currentCard[8], rfid.currentCard[9]);
+							break;
+						case RFID_SN_TYPE_4BYTE:
+						default:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X", rfid.currentCard[0], rfid.currentCard[1], rfid.currentCard[2], rfid.currentCard[3]);
+							break;
+					}
 				}
-			}
-			else
-			{
-				// Little endian
-				switch(rfid.snType)
+				else
 				{
-					case RFID_SN_TYPE_6BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X", rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
-						break;
-					case RFID_SN_TYPE_7BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[6], rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
-						break;
-					case RFID_SN_TYPE_10BYTE:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[9], rfid.currentCard[8], rfid.currentCard[7], rfid.currentCard[6], rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
-						break;
-					case RFID_SN_TYPE_4BYTE:
-					default:
-						sprintf((char*)bufferRFID, "%02X%02X%02X%02X", rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
-						break;
+					// Little endian
+					switch(rfid.snType)
+					{
+						case RFID_SN_TYPE_6BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X", rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
+							break;
+						case RFID_SN_TYPE_7BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[6], rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
+							break;
+						case RFID_SN_TYPE_10BYTE:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", rfid.currentCard[9], rfid.currentCard[8], rfid.currentCard[7], rfid.currentCard[6], rfid.currentCard[5], rfid.currentCard[4], rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
+							break;
+						case RFID_SN_TYPE_4BYTE:
+						default:
+							sprintf((char*)bufferRFID, "%02X%02X%02X%02X", rfid.currentCard[3], rfid.currentCard[2], rfid.currentCard[1], rfid.currentCard[0]);
+							break;
+					}
 				}
-			}
-			DEBUG_INFO("Authorize request User Id : %s\n", bufferRFID);
-			//DEBUG_INFO("Authorize request User Id : %s\n", ShmSysConfigAndInfo->SysConfig.UserId);
+				DEBUG_INFO("Authorize request User Id : %s\n", bufferRFID);
+				//DEBUG_INFO("Authorize request User Id : %s\n", ShmSysConfigAndInfo->SysConfig.UserId);
 
-			for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
-				ShmCharger->gun_info[gun_index].resultAuthorization = UNKNOW_RFID;
+				for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
+					ShmCharger->gun_info[gun_index].resultAuthorization = UNKNOW_RFID;
 
-			// Check SN already start
-			for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
-			{
-				if(isMatchStartUser(gun_index) || (isMatchPresentUser(gun_index) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_PREPARING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A)))
+				// Check SN already start
+				for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
 				{
-					DEBUG_INFO("%s running on connector-%02d.\n", ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, gun_index);
-					isSnStart = TRUE;
-					ShmCharger->gun_info[gun_index].rfidReq = ON;
-					ocpp_set_auth_conf(ON);
-					setLedMotion(gun_index,LED_ACTION_RFID_PASS);
-					setSpeaker(ON, SPEAKER_SHORT);
-					sleep(3);
+					if(isMatchStartUser(gun_index) || (isMatchPresentUser(gun_index) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].SystemStatus == SYS_MODE_PREPARING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_A)))
+					{
+						DEBUG_INFO("%s running on connector-%02d.\n", ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, gun_index);
+						isSnStart = TRUE;
+						ShmCharger->gun_info[gun_index].rfidReq = ON;
+						ocpp_set_auth_conf(ON);
+						setLedMotion(gun_index,LED_ACTION_RFID_PASS);
+						setSpeaker(ON, SPEAKER_SHORT);
+						sleep(3);
 
-					break;
+						break;
+					}
 				}
-			}
 
-			// Request authorize if isSnStart is false
-			if(!isSnStart)
-			{
-				memcpy(ShmSysConfigAndInfo->SysConfig.UserId, bufferRFID, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId));
-				refreshStartTimer(&startTime[0][TMR_IDX_AUTH]);
-				ocpp_set_auth_conf(OFF);
-				ocpp_set_auth_req(ON, "ISO14443");
-				setLedMotion(0,LED_ACTION_AUTHED);
-				ShmCharger->isAuthrizing = TRUE;
-				ShmCharger->isGetAuthResult = FALSE;
-				isCheckdResult = FALSE;
+				// Request authorize if isSnStart is false
+				if(!isSnStart)
+				{
+					memcpy(ShmSysConfigAndInfo->SysConfig.UserId, bufferRFID, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId));
+					refreshStartTimer(&startTime[0][TMR_IDX_AUTH]);
+					ocpp_set_auth_conf(OFF);
+					ocpp_set_auth_req(ON, "ISO14443");
+					setLedMotion(0,LED_ACTION_AUTHED);
+					ShmCharger->isAuthrizing = TRUE;
+					ShmCharger->isGetAuthResult = FALSE;
+					isCheckdResult = FALSE;
+				}
+				
+				isReadable = FALSE;
 			}
 		}
+		else
+		{
+			isReadable = TRUE;
+		}
 	}
 	else
 	{
@@ -5104,17 +5133,22 @@ void checkRfidAuthrize()
 					{
 						if(GetCardSerialNumber() != FAIL)
 						{
-							if(isMatchPresentUser())
+							if(isReadable == TRUE)
 							{
-								DEBUG_INFO("Cancel present user.\n");
-								for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
+								if(isMatchPresentUser())
 								{
-									setLedMotion(gun_index,LED_ACTION_IDLE);
-									ShmCharger->gun_info[gun_index].resultAuthorization = DEFAULT_RFID;
-								}
+									DEBUG_INFO("Cancel present user.\n");
+									for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
+									{
+										setLedMotion(gun_index,LED_ACTION_IDLE);
+										ShmCharger->gun_info[gun_index].resultAuthorization = DEFAULT_RFID;
+									}
 
-								setSpeaker(ON, SPEAKER_SHORT);
-								ShmCharger->isAuthrizing = FALSE;
+									setSpeaker(ON, SPEAKER_SHORT);
+									ShmCharger->isAuthrizing = FALSE;
+								}
+								
+								isReadable = FALSE;
 							}
 						}
 						else
@@ -5139,6 +5173,8 @@ void checkRfidAuthrize()
 									break;
 								}
 							}
+							
+							isReadable = TRUE;
 						}
 					}
 					else

+ 30 - 29
EVSE/Projects/AW-Regular/Apps/main.c

@@ -523,7 +523,18 @@ uint8_t ocpp_get_reset_req()
 	}
 	else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
 	{
-		result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+		if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate") == 0)
+		{
+			result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+		}
+		else
+		{
+			if(((ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_TERMINATING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[0].SystemStatus != SYS_MODE_COMPLETE)) &&
+			   (AC_QUANTITY>1?((ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_CHARGING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_TERMINATING) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[1].SystemStatus != SYS_MODE_COMPLETE)):TRUE))
+			{
+				result = ShmOCPP20Data->MsMsg.bits.ResetReq;
+			}
+		}
 	}
 
 	return result;
@@ -729,7 +740,8 @@ uint8_t ocpp_get_auth_result(uint8_t gun_index)
 			}
 			else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
 			{
-				if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0))
+				if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0) &&
+				   (strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->ControllerComponentVariable[AuthCtrlr_MasterPassGroupId].variableAttribute[0].value) != 0))
 					result = PASS;
 			}
 
@@ -757,7 +769,8 @@ uint8_t ocpp_get_auth_result(uint8_t gun_index)
 				DEBUG_INFO("TransactionEvent[%d].Response_idTokenInfo.groupIdToken.idToken : %s \n", gun_index, ShmOCPP20Data->TransactionEvent[gun_index].Response_idTokenInfo.groupIdToken.idToken);
 
 				if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0) &&
-				   (strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->TransactionEvent[gun_index].Response_idTokenInfo.groupIdToken.idToken)==0))
+				   ((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->TransactionEvent[gun_index].Response_idTokenInfo.groupIdToken.idToken) == 0) ||
+					(strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.groupIdToken.idToken, (char*)ShmOCPP20Data->ControllerComponentVariable[AuthCtrlr_MasterPassGroupId].variableAttribute[0].value) == 0)))
 					result = PASS;
 			}
 
@@ -3460,28 +3473,19 @@ void checkConnectionTimeout()
 	}
 	else
 	{
-		if(strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData,"") != 0)
-		{
-			ShmCharger->timeoutSpec.Setting_Timeout_Spec = atoi((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
-			if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
-			{
-				ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
-				//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
-			}
-			else
-			{
-				ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
-				//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
-			}
-			//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
+		ShmCharger->timeoutSpec.Setting_Timeout_Spec = ocpp_get_connection_timeout();
+        if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
+        {
+            ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
+            //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
+        }
+        else
+        {
+            ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
+            //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
+        }
+        //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
 
-		}
-		else
-		{
-			ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
-			//DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Table is blank...\n.");
-		}
-		//DEBUG_INFO("Present timeout spec : %d \n", ShmCharger->timeoutSpec.Present_Timeout_Spec);
 	}
 }
 
@@ -3964,12 +3968,9 @@ void checkStopReason(uint8_t gun_index)
 		{
 			sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "GroundFault");
 		}
-		else if(ShmOCPP20Data->MsMsg.bits.ResetReq)
+		else if((ShmOCPP20Data->MsMsg.bits.ResetReq) && (strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0))
 		{
-			if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate")==0)
-				sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
-			else
-				sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "OnIdle");
+			sprintf((char*)ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason, "ImmediateReset");
 		}
 		else if(ShmCharger->gun_info[gun_index].rfidReq || ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop)
 		{

+ 9 - 7
EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c

@@ -501,7 +501,7 @@ void CreateRfidFork(void)
                 if (checkRemoteStart(gunIndex) && ShmDcCommonData->AuthPass_flag[gunIndex] &&
                     !ShmDcCommonData->PayPass_flag[gunIndex]) {
                     RemoteStartCancelPreAuth(gunIndex);
-                    ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                    ShmDcCommonData->AuthPass_flag[gunIndex] = FALSE;
                 }
 
                 if (ShmDcCommonData->StopCharge[gunIndex] == TRUE && pDcChargingInfo->Replug_flag == TRUE) {
@@ -509,12 +509,15 @@ void CreateRfidFork(void)
                     if (ShmDcCommonData->DebugFlag == TRUE ||
                         ShmDcCommonData->is_RemoteStart[gunIndex] == TRUE ||
                         ShmDcCommonData->is_AutoStart[gunIndex] == TRUE) {
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
+                        if (pSysInfo->CurGunSelected == gunIndex)
+                            pSysInfo->SystemPage = _PAGE_PLUGOUT;
                         ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                        ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                         continue;
                     }
                     ShmDcCommonData->StopCharge[gunIndex] = FALSE;
                     log_info("Gun %d Not Into Charging cancel Trade",gunIndex);
+            
                     StopGunInfoTimeoutDet(gunIndex);
                     ShmDcCommonData->TradeCancel = TRUE;
                     pSysInfo->SystemPage = _PAGE_SENSING;
@@ -532,11 +535,10 @@ void CreateRfidFork(void)
                         StopGunInfoTimeoutDet(gunIndex); //Timeout_FinalCost
 
                         // Remote Start of AutoStart ByPass Credit Card Reader
-                        if (ShmDcCommonData->DebugFlag == TRUE ||
-                            checkRemoteStart(gunIndex) ||
+                        if (ShmDcCommonData->DebugFlag == TRUE || checkRemoteStart(gunIndex) ||
                             ShmDcCommonData->is_AutoStart[gunIndex]) {
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
                             ShmDcCommonData->PayPass_flag[gunIndex] = TRUE;
+                            pSysInfo->SystemPage = _PAGE_COMPLETE;
                             continue;
                         }
                         // 實際扣款
@@ -610,7 +612,7 @@ void CreateRfidFork(void)
             }
 
             if ((is_idle == TRUE &&
-                (pSysInfo->SystemPage == _PAGE_IDLE || pSysInfo->SystemPage == _PAGE_SELECT_GUN) &&
+                pSysInfo->SystemPage == _PAGE_IDLE  &&
                 ShmDcCommonData->RoutineReduct == FALSE) || ShmDcCommonData->Exe_ReDeduct) {
 
                 ReDeductProcess(fd);
@@ -620,7 +622,7 @@ void CreateRfidFork(void)
             }
 
             // 每日晚上11點30分結帳
-            if (is_idle == TRUE && (pSysInfo->SystemPage == _PAGE_IDLE || pSysInfo->SystemPage == _PAGE_SELECT_GUN) &&
+            if (is_idle == TRUE && pSysInfo->SystemPage == _PAGE_IDLE  &&
                 ((tm->tm_hour == 15 && tm->tm_min > 30  && ShmDcCommonData->RoutineSettlement == FALSE) ||
                     ShmDcCommonData->UnionSettlement)) {
                 StopSystemTimeoutDet();

+ 52 - 54
EVSE/Projects/DD360Tcci/Apps/CSU/main.c

@@ -82,8 +82,8 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V2.12.00.0000.00"; // Phihong version
-char* DebugVersion = "v2.12.01";      // Software debug version
+char *fwVersion = "V2.13.00.0000.00"; // Phihong version
+char* DebugVersion = "V2.13.01";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -292,7 +292,7 @@ static void GetFirmwareVersion(void)
 {
     // Get CSU root file system version
     sprintf((char *)pSysInfo->CsuRootFsFwRev, fwVersion);
-
+    sprintf((char*)ShmDcCommonData->DebugVersion, DebugVersion);
     uint8_t count = 0, chademo = 0, ccs = 0, gb = 0;
     for (uint8_t idx = 0; idx < 3; idx++) {
         if (pSysConfig->ModelName[7 + idx] == 'J') {
@@ -2766,18 +2766,11 @@ void CreateTimeoutFork(void)
                 		if (ShmDcCommonData->finalcost_flag[gunIndex] == FALSE) {
                             if (ShmDcCommonData->is_AutoStart[gunIndex] || ShmDcCommonData->is_RemoteStart[gunIndex]) {
                                 ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
-                                pSysInfo->SystemPage = _PAGE_PAYFAIL;
                                 ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
                             } else {
                                 log_info("Not Get Final Cost");
                                 ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
                                 pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                                /*
-                                ShmDcCommonData->TransactionInfo[gunIndex].Amount = pDcChargingInfo->PresentChargedEnergy * ShmDcCommonData->ChargingRate;
-                                if (ShmDcCommonData->TransactionInfo[gunIndex].Amount < 1)
-                                    ShmDcCommonData->TransactionInfo[gunIndex].Amount = 1;
-                                ShmDcCommonData->finalcost_flag[gunIndex] = TRUE;
-                                */
                             }
                 		}
                 	}
@@ -3927,7 +3920,7 @@ void ResetIdleData(uint8_t gunIndex)
     pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gunIndex);
     ShmOCPP16Data = (struct OCPP16Data *)GetShmOCPP16Data();
     ShmSelectGunInfo = (SelectGunInfo *)GetShmSelectGunInfo();
-
+    float powerconsumption = ShmDcCommonData->pGunInfo[gunIndex].PowerConsumption;
     pDcChargingInfo->PresentChargedDuration = 0;
     pDcChargingInfo->RemainChargingDuration = 0;
     pDcChargingInfo->PresentChargingVoltage = 0;//DS60-120 add
@@ -3944,7 +3937,7 @@ void ResetIdleData(uint8_t gunIndex)
     memset(&ShmSelectGunInfo->PricesInfo[gunIndex], 0, sizeof(PricesInfo));
     memset(&ShmDcCommonData->TransactionInfo[gunIndex], 0, sizeof(RecordTransactionInfo));
     memset(&ShmDcCommonData->pGunInfo[gunIndex], 0, sizeof(GunInfo));
-    DB_Get_PowerConsumption(gunIndex);
+    ShmDcCommonData->pGunInfo[gunIndex].PowerConsumption = powerconsumption;
     ShmDcCommonData->finalcost_flag[gunIndex] = FALSE;
     ShmDcCommonData->AuthPass_flag[gunIndex] = FALSE;
     ShmDcCommonData->PayPass_flag[gunIndex] = FALSE;
@@ -4262,11 +4255,8 @@ int main(void)
         isDb_ready = true;
         for (int _index = 0; _index < pSysConfig->TotalConnectorCount; _index++) {
             pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_index);
-
             pDcChargingInfo->IsAvailable = DB_Get_Operactive(_index);
-            if (!DB_Get_PowerConsumption(_index)) {
-                DB_Insert_PowerConsumption(_index, 0);
-            }
+
         }
         DB_Reboot_Record();
     }
@@ -4275,14 +4265,22 @@ int main(void)
         log_info("Power DB_Open fail. ");
         isDb_ready = false;
     } else {
+        int _retry = 0;
         isDb_ready = true;
         for (int _index = 0; _index < pSysConfig->TotalConnectorCount; _index++) {
             pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(_index);
-
-            if (!DB_Get_PowerConsumption(_index)) {
-                DB_Insert_PowerConsumption(_index, 0);
-            }
-        }
+            while (_retry < 3) {
+                if (DB_Get_PowerConsumption(_index)) {
+                    break;
+                } else {
+                    sleep(1);
+                    _retry++;
+                    if (_retry == 3) {
+                        DB_Insert_PowerConsumption(_index, 0);
+                    }
+                }
+            } // while
+        } // for
     }
     log_info("===== Create DB End ===== ");
 
@@ -4407,7 +4405,7 @@ int main(void)
                 // 讀卡邏輯
                 if (!ShmDcCommonData->TradeCancel && pSysInfo->CurGunSelected == gunIndex)
                     ScannerCardProcess(gunIndex);
-                if (pSysInfo->SystemPage == _PAGE_SELECT_GUN) {
+                if (pSysInfo->SystemPage == _PAGE_SELECT_GUN || pSysInfo->SystemPage == _PAGE_IDLE) {
                 	//ShmDcCommonData->LineStatus[gunIndex] = 0;
                 	StopGunInfoTimeoutDet(gunIndex);
 				}
@@ -4492,8 +4490,8 @@ int main(void)
                     break;
                 }
                 if (pDcChargingInfo->SystemStatus == S_FAULT) {
-                    systemPageRestoreInit();
                     setChargerMode(gunIndex, MODE_IDLE);
+                    systemPageRestoreInit();
                 }
 
                 break;
@@ -4512,9 +4510,7 @@ int main(void)
                 }
                 if (isDetectPlugin(gunIndex)) {
                     StartGunInfoTimeoutDet(gunIndex, Timeout_WaitPlug);
-                    if (pSysInfo->CurGunSelected == gunIndex) {
-                        pSysInfo->SystemPage = _PAGE_PLUGIN;
-                    }
+
                     // 卡號驗證成功後,等待充電槍插入充電車
                     if (pDcChargingInfo->RemoteStartFlag == YES) {
                         if (pDcChargingInfo->ConnectorPlugIn == YES &&
@@ -4858,29 +4854,32 @@ int main(void)
                         StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
                     }
                 }
+                if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
+                    pSysInfo->SystemPage = _PAGE_PLUGOUT;
+                    break;
+                }
                 // Remote start
                 if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
-                    if (pDcChargingInfo->Replug_flag == TRUE)
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                    else {
-                        if (ShmDcCommonData->finalcost_flag[gunIndex]) {
+
+                    if (ShmDcCommonData->finalcost_flag[gunIndex]) {
+                        if (ShmDcCommonData->PayPass_flag[gunIndex]) {
                             pSysInfo->SystemPage = _PAGE_COMPLETE;
+                            //log_info("_PAGE_COMPLETE");
                         } else {
-                            pSysInfo->SystemPage = _PAGE_PAYING;
+                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
+                            //log_info("_PAGE_PAYFAIL");
                         }
+                    } else {
+                        pSysInfo->SystemPage = _PAGE_PAYING;
                     }
                     break;
                 }
                 if (pSysInfo->CurGunSelected == gunIndex && 
                     pSysInfo->SystemPage != _PAGE_PAYING && pSysInfo->SystemPage != _PAGE_SENSING) {
-                    if (pDcChargingInfo->Replug_flag == TRUE)
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                    else {
-                        if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
-                            pSysInfo->SystemPage = _PAGE_COMPLETE;
-                        else
-                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                    }
+                    if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
+                        pSysInfo->SystemPage = _PAGE_COMPLETE;
+                    else
+                        pSysInfo->SystemPage = _PAGE_PAYFAIL;
                 }
 
                 break;
@@ -4934,28 +4933,27 @@ int main(void)
                         StartGunInfoTimeoutDet(gunIndex, Timeout_ExitPage);
                     }
                 }
+                if (pDcChargingInfo->Replug_flag == TRUE && pSysInfo->CurGunSelected == gunIndex) {
+                    pSysInfo->SystemPage = _PAGE_PLUGOUT;
+                    break;
+                }
                 // Remote start
                 if (ShmDcCommonData->is_RemoteStart[gunIndex] && pSysInfo->CurGunSelected == gunIndex) {
-                    if (pDcChargingInfo->Replug_flag == TRUE)
-                        pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                    else {
-                        if (ShmDcCommonData->finalcost_flag[gunIndex]) {
+                    if (ShmDcCommonData->finalcost_flag[gunIndex]) {
+                        if (ShmDcCommonData->PayPass_flag[gunIndex])
                             pSysInfo->SystemPage = _PAGE_COMPLETE;
-                        } else {
-                            pSysInfo->SystemPage = _PAGE_PAYING;
-                        }
+                        else
+                            pSysInfo->SystemPage = _PAGE_PAYFAIL;
+                    } else {
+                        pSysInfo->SystemPage = _PAGE_PAYING;
                     }
                     break;
                 }
                 if (pSysInfo->CurGunSelected == gunIndex && pSysInfo->SystemPage != _PAGE_PAYING ) {
-                	if (pDcChargingInfo->Replug_flag == TRUE)
-                		pSysInfo->SystemPage = _PAGE_PLUGOUT;
-                	else {
-                		if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
-							pSysInfo->SystemPage = _PAGE_COMPLETE;
-						else
-							pSysInfo->SystemPage = _PAGE_PAYFAIL;
-                	}
+                	if (ShmDcCommonData->PayPass_flag[gunIndex] == TRUE)
+						pSysInfo->SystemPage = _PAGE_COMPLETE;
+					else
+						pSysInfo->SystemPage = _PAGE_PAYFAIL;
 				}
 
                 break;

+ 2 - 0
EVSE/Projects/DD360Tcci/Apps/Config.h

@@ -580,6 +580,8 @@ typedef struct StDcCommonInfo {
     uint8_t tccdev;
     uint8_t TaiwanEast;
     uint8_t lcmtest;
+    char DebugVersion[32];
+    uint8_t BackLight;
 } DcCommonInfo;
 
 #endif /* CONFIG_H_ */

+ 5 - 5
EVSE/Projects/DD360Tcci/Apps/DataBase/DataBase.c

@@ -67,7 +67,7 @@ int DB_Open(void)
         log_info( "Can't open database: %s", sqlite3_errmsg(localDb));
         sqlite3_close(localDb);
     } else {
-        log_info( "Local charging record database open successfully.");
+        //log_info( "Local charging record database open successfully.");
 
         if (sqlite3_exec(localDb, createRecordSql, 0, 0, &errMsg) != SQLITE_OK) {
             result = FAIL;
@@ -168,14 +168,14 @@ int DB_Update_Operactive(uint8_t gunIndex, uint8_t IsAvailable)
         log_info( "Can't open database: %s", sqlite3_errmsg(localDb));
         sqlite3_close(localDb);
     } else {
-        log_info( "Local charging record database open successfully (%d).", IsAvailable);
+        //log_info( "Local charging record database open successfully (%d).", IsAvailable);
 
         //sprintf(sqlStr, "insert or replace into config (IsAvailable, connector, val) values('IsAvailable', %d, %d);", gunIndex, IsAvailable);
         sprintf(sqlStr,
                 "insert or replace into config (item, connector, val) values('IsAvailable', %d, %d);",
                 gunIndex,
                 IsAvailable); //DS60-120 add
-        log_info("sqlStr= %s", sqlStr);
+        //log_info("sqlStr= %s", sqlStr);
         if (sqlite3_exec(localDb, sqlStr, 0, 0, &errMsg) != SQLITE_OK) {
             result = FAIL;
             log_info( "update config error message: %s", errMsg);
@@ -239,7 +239,7 @@ int DB_Reboot_Record(void)
         log_info( "Can't open database: %s", sqlite3_errmsg(localDb));
         sqlite3_close(localDb);
     } else {
-        log_info( "Local charging record database open successfully.");
+        //log_info( "Local charging record database open successfully.");
         if (sqlite3_exec(localDb, insertSql, 0, 0, &errMsg) != SQLITE_OK) {
             result = FAIL;
             log_info( "Insert reboot record error message: %s", errMsg);
@@ -899,7 +899,7 @@ int DB_Get_PowerConsumption(uint8_t gunIndex)
         log_info("Can't open database: %s", sqlite3_errmsg(powerDb));
         sqlite3_close(powerDb);
     } else {
-        log_info("Local config query database open successfully.");
+        //log_info("Local config query database open successfully.");
         sqlite3_get_table(powerDb, sqlStr, &rs, &rows, &cols, &errMsg);
         if (rows > 0) {
             for (int idxRow = 1; idxRow <= rows; idxRow++) {

+ 4 - 4
EVSE/Projects/DD360Tcci/Apps/Log/log.h

@@ -2,11 +2,11 @@
 #define _LOG_H_
 
 //------------------------------------------------------------------------------
-#define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
-#define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
-#define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
+#define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
+#define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
 
-#define event_info(format, args...) StoreEventLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args) //DS60-120 add
+#define event_info(format, args...) StoreEventLogMsg("[%s:%d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args) //DS60-120 add
 //------------------------------------------------------------------------------
 int StoreLogMsg(const char *fmt, ...);
 int StoreEventLogMsg(const char *fmt, ...);

+ 5 - 2
EVSE/Projects/DD360Tcci/Apps/ModuleDoComm/DoComm.c

@@ -1417,13 +1417,13 @@ static int responsePackeHandle(int fd, uint8_t *pResult, uint8_t plugNum, uint8_
         ShmDcCommonData->Location = atoi(_stationInfo.StationName);
 
         CheckTaiwanEastWest(ShmDcCommonData->Location);
-        /*
+        
         log_info("Station Name: %s, ID: %d, Weather: %d, Temperature: %.1f",
                 _stationInfo.StationName,
                 _stationInfo.StationID,
                 _stationInfo.WeatherID,
                 _stationInfo.Temperature);
-        */
+        
         break;
 
     case REG_DEDUCT_INFO:
@@ -2262,6 +2262,9 @@ static int messageTrigger(int fd, uint8_t plugNum, uint8_t gunID, uint8_t curReg
 					ShmDcCommonData->TransactionInfo[plugNum].Amount = pDcChargingInfo->ChargingFee;
 					ShmDcCommonData->finalcost_flag[plugNum] = TRUE;
 					log_info("Gun %d get final cost %f", plugNum, ShmDcCommonData->TransactionInfo[plugNum].Amount);
+                    if (ShmDcCommonData->is_RemoteStart[plugNum] || ShmDcCommonData->is_AutoStart[plugNum]) {
+                        ShmDcCommonData->PayPass_flag[plugNum] = TRUE;
+                    }
                 }
             }
             curReg = REG_PLUG_IN_STATE;

+ 3 - 3
EVSE/Projects/DD360Tcci/Apps/ModuleInternalComm/Module_InternalComm.h

@@ -85,9 +85,9 @@
 #define AC_ROTARY_SWITCH_FAULT                  (131072)
 #define AC_RELAY_DRIVE_FAULT                    (262144)
 
-#define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
-#define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
-#define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
+#define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
+#define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)), __LINE__, __FUNCTION__, ##args)
 
 //------------------------------------------------------------------------------
 

+ 26 - 17
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -235,6 +235,9 @@ void ReadMsgFromLcm(uint8_t* msg, uint8_t readLen)
                 strcpy((char*)pSysInfo->LcmHwRev, moduleName);
             if (key == 0x0014)
                 _currentPage = *(msg + 8);
+            if (key == 0x0031) {
+                log_info("Get LCM Backlight change to 0x%x", *(msg + 8));
+            }
             if (key >= _Touch_IDLE && key <= _Touch_Pay_LinePay) {
 
                 _btn_press_id = key;
@@ -449,6 +452,7 @@ void CheckConfirmGun(uint8_t gunIndex)
         log_info("Reservation can't select");
         return;
     }
+    //log_info("Confirm Gun%d",gunIndex);
 	pSysInfo->CurGunSelected = gunIndex;
 	pSysInfo->SystemPage = _PAGE_BILL;
 }
@@ -617,7 +621,7 @@ void CheckLCMPressed()
     pid_t Pid = fork();
     if ( Pid == 0 ) {
         while (1) {
-        	if (pSysInfo->SystemPage != _PAGE_SELECT_GUN) {
+        	if (pSysInfo->SystemPage != _PAGE_SELECT_GUN && pSysInfo->SystemPage != _PAGE_IDLE) {
 				CheckTouchPress(_Touch_Show_Left);
 				CheckTouchPress(_Touch_Show_Right);
         	}
@@ -727,26 +731,22 @@ void ChangeToOtherPage(short newPage)
     ReadMsgFromLcm(msg, ARRAY_SIZE(msg));
 }
 
-void ChangeBackLight(bool islight)
+void ChangeBackLight(uint8_t value)
 {
-    uint8_t value = 0x01;
+    //uint8_t value = 0x01;
     uint8_t msg[9];
     memset(msg, 0x00, sizeof(msg));
 
-    // 0x00 ~ 0x40
-    if (islight)
-    {
-        value = 0x20;
-    }
     uint8_t cmd[7];
     memset(cmd, 0x00, sizeof(cmd));
 
     cmd[0] = CMD_TITLE_1;
     cmd[1] = CMD_TITLE_2;
-    cmd[2] = 0x03;
-    cmd[3] = CMD_READ;
-    cmd[4] = CMD_BACKLIGHT;
-    cmd[5] = value;
+    cmd[2] = 0x05;
+    cmd[3] = CMD_MULTI_WRITE;
+    cmd[4] = 0x00;
+    cmd[5] = 0x82;
+    cmd[6] = value;
 
     WriteCmdToLcm(cmd, ARRAY_SIZE(cmd));
     usleep(10000);
@@ -1321,8 +1321,12 @@ void ProcessPageInfo()
     for (uint8_t i = 0; i < pSysConfig->TotalConnectorCount; i++) {
 
         if (pSysInfo->CurGunSelected == i) {
-            pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
+            pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(i);
 
+            if (pDcChargingInfo->SystemStatus == S_IDLE) {
+                _everyPageRollChange = 0;
+                _Text_Running_Count = 1;
+            }
             switch (pSysInfo->SystemPage) {
             case _PAGE_IDLE:
                 ShowSelectGun();
@@ -1351,7 +1355,7 @@ void ProcessPageInfo()
 
 		        ChangeChargingRateValue((int)ShmDcCommonData->ChargingRate);
                 ShowAuthorizeCountDown();
-            	_Text_Running_Count = 1;
+
                 break;
             case _PAGE_SENSING:
                 if (ShmDcCommonData->TradeCancel == TRUE) {
@@ -1368,8 +1372,6 @@ void ProcessPageInfo()
                 ShowLineRegisterCountDown();
                 break;
             case _PAGE_PRECHARGE:
-            	//ChangeDisplay2Value(_Icon_Precharge,1);
-
             	RefreshProgressAnimation();
             	if (_everyPageRollChange == 0) {
             		ChangeDisplay2Value(_Icon_Precharge,_Text_Running_Count);
@@ -1762,7 +1764,9 @@ int main(void)
     _port = CreateCommunicationLcmPort();
     uint8_t changeWarningPriority = 0;
     uint8_t curWarningCount = 255;
-    ChangeBackLight(true);
+    uint8_t light = 0x64;
+    ShmDcCommonData->BackLight = light;
+    ChangeBackLight(light);
     _totalCount = pSysConfig->TotalConnectorCount;
     _everyPageRollChange = 0;
     //Initialization();
@@ -1791,6 +1795,11 @@ int main(void)
         } else {
             UpdateLcmFunction(ShmDcCommonData,_port);
 
+            if (ShmDcCommonData->BackLight != light) {
+                ChangeBackLight(ShmDcCommonData->BackLight);
+                light = ShmDcCommonData->BackLight;
+                log_info("Set Backlight:%d",light);
+            }
             /*
             // Warning 處理
             if (curWarningCount != pSysWarning->WarningCount) {

+ 0 - 2
EVSE/Projects/DD360Tcci/Apps/ModulePrimary/Module_PrimaryComm.c

@@ -272,8 +272,6 @@ static void checkChillerStatus(Gpio_out *gpio)
 
         }
     }
-    if (ShmDcCommonData->DebugFlag == YES) 
-        _chillerNeedOn = ShmDcCommonData->chillerCtrl;
 
     if(_chiller.ChillerSwitch != _chillerNeedOn)
     {

+ 20 - 2
EVSE/Projects/DD360Tcci/Apps/ModuleUpdateFW/Module_UpdateFW.c

@@ -225,6 +225,14 @@ bool CreateBufferForLcmFile(char *file)
 
 	return result;
 }
+
+unsigned long long getAvailableMemory()
+{
+    long pages = sysconf(_SC_AVPHYS_PAGES);
+    long page_size = sysconf(_SC_PAGE_SIZE);
+    return pages * page_size;
+}
+
 static int CheckUpdateProcess(void)
 {
     //bool isPass = true;
@@ -246,6 +254,13 @@ static int CheckUpdateProcess(void)
     struct ChargingInfoData *pDcChargingInfo = NULL;
     
     pSysConfig = (struct SysConfigData *)GetShmSysConfigData();
+
+    if (getAvailableMemory() < (200 * 1024 * 1024))
+    {
+        log_info("Available memory (%.2f Bytes) less than 200 MBytes, free cache first.\n", getAvailableMemory() / (1024 * 1024.0));
+        system("echo 3 > /proc/sys/vm/drop_caches");
+    }
+
     d = opendir("/mnt/");
     if (d) {
         log_info("Open /mnt success");
@@ -284,7 +299,7 @@ static int CheckUpdateProcess(void)
                         ((unsigned int)ptr[18]) << 8  |
                         ((unsigned int)ptr[19]));
                 log_info("Typed...%x ", Type);
-
+                free(ptr);
                 switch (Type) {
                 case 0x10000001:
                 case 0x10000002:
@@ -456,9 +471,12 @@ static int CheckUpdateProcess(void)
                     }
                     break;
                 }
+            } else { 
+                free(ptr);
             }
+
             free(new_str);
-            free(ptr);
+
         }
     }
     free(dir);

+ 26 - 1
EVSE/Projects/DD360Tcci/Apps/ReadCmdline.c

@@ -336,7 +336,20 @@ void GetFwVerProc(void)
                      "      ac\n"
                      "      exit | c | C\n"
                      "      help | ? | h\n";
-
+    printf("ModelName = %s\r\n", pSysConfig->ModelName);
+    printf("DC Main Version = %s \n", pSysInfo->CsuRootFsFwRev);
+    printf("DC Main Debug Version = %s \n", ShmDcCommonData->DebugVersion);
+    printf("407 FW Version = %s\n", ShmPrimaryMcuData->version);
+    printf("Gun 0 FW Version = %s \n", pSysInfo->Connector1FwRev);
+    printf("Gun 1 FW Version = %s \n", pSysInfo->Connector2FwRev);
+    printf("Relay Board Version = %s \n", pSysInfo->RelayModuleFwRev);
+    printf("FAN Version = %s \n", pSysInfo->FanModuleFwRev);
+    printf("LED Version = %s \n", pSysInfo->LedModuleFwRev);
+    printf("Dispenser Network Information checked: IP = % s Netmask = % s, Gateway = % s \n",
+        pSysConfig->Eth0Interface.EthIpAddress,
+        pSysConfig->Eth0Interface.EthSubmaskAddress,
+        pSysConfig->Eth0Interface.EthGatewayAddress);
+    /*
     while (isContinue) {
         if (readCmdKey(CMD_KEY_WAIT) == NO) {
             continue;
@@ -381,6 +394,7 @@ void GetFwVerProc(void)
         }
 
     }//while
+    */
 }
 
 void CreateOneError(char *v1)
@@ -527,6 +541,14 @@ void writeChillerStatus(char* v1)
     else
         printf("Please open Debug mode\n");
 }
+void writeBackLight(char* v1)
+{
+    uint8_t light = atoi(v1);
+    if (light >= 0 && light <= 0x64) {
+        ShmDcCommonData->BackLight = light;
+    } else
+        printf("Error para.");
+}
 void writeTccdev()
 {
     ShmDcCommonData->tccdev = !ShmDcCommonData->tccdev;
@@ -1310,6 +1332,7 @@ int main(void)
                      "       tccdev                            : print TCC dev QR Code\n"
                      "       lcmtest                           : Only For LCM Demo\n"
                      "       billtest                          : Rededuct Transcation id amount\n"
+                     "       backlight                         : Change Lcm Backlight\n"
                      "\r\n";
 
     if (CreateAllCsuShareMemory() == FAIL) {
@@ -1507,6 +1530,8 @@ int main(void)
                 continue;
             }
             setbilltest(newString[1], newString[2]);
+        } else if (strcmp(newString[0], "backlight") == 0) { //測試槍頭和水冷機溫度
+            writeBackLight(newString[1]);
         } else {
             printf("%s\n", usageMsg);
         }

BIN
EVSE/Projects/DD360Tcci/Images/ramdisk.gz


BIN
EVSE/Projects/DD360Tcci/output/FactoryConfig


BIN
EVSE/Projects/DD360Tcci/output/Module_ChkSysTask


BIN
EVSE/Projects/DD360Tcci/output/Module_DoComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EvComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EventLogging


BIN
EVSE/Projects/DD360Tcci/output/Module_InternalComm


BIN
EVSE/Projects/DD360Tcci/output/Module_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360Tcci/output/Module_UpdateFW


BIN
EVSE/Projects/DD360Tcci/output/ReadCmdline


BIN
EVSE/Projects/DD360Tcci/output/main


+ 9 - 4
EVSE/Projects/EVSE-Emulator/Apps/CCS/Makefile

@@ -6,7 +6,7 @@
 #                           (since 2019/07/19)
 #=============================================================================
 	
-ifeq ($(CCSType),AWCCS)
+ifeq ($(CCSType),Emulator)
 -include ../../../../../Rules.make
 export PATH=/bin:/sbin:/usr/bin:$(SDK_PATH_TARGET)/usr/bin:$PATH
 SSL_PATH= ../../../../GPL/openssl-1.0.2g/
@@ -45,7 +45,7 @@ EXI_ENGINE =	exi_engine/api/api.c \
 				exi_engine/xmldsig/xmldsigEXIDatatypesEncoder.c
 
 all: init secc
-ifeq ($(CCSType),AWCCS)
+ifeq ($(CCSType),Emulator)
 secc:  CsuCommTask SeccCommTask 
 else
 secc: MainTask SeccCommTask CsuCommTask FactoryConfigTask FWUpdateTask PCBATesterTask
@@ -61,7 +61,7 @@ MainTask:
 	rm -f main
 
 CsuCommTask:
-ifeq ($(CCSType),AWCCS)
+ifeq ($(CCSType),Emulator)
 	rm -f CsuComm
 	@echo "=============== Make AC CsuCommTask==========================="
 	$(CC) -D $(CCSType) CsuComm.c ${EXI_ENGINE} -lm -o CsuComm
@@ -76,7 +76,7 @@ endif
 
 SeccCommTask:
 	rm -f SeccComm
-ifeq ($(CCSType),AWCCS)
+ifeq ($(CCSType),Emulator)
 	@echo "=============== Make AC SeccCommTask==========================="
 	$(CC) -D $(CCSType) SeccComm.c NidNmk.c ${EXI_ENGINE} -lm -o SeccComm $(CFLAGS)
 	cp -f SeccComm ../../Images/root
@@ -128,8 +128,13 @@ PCBATesterTask:
 	rm -f PCBATester
 
 init:
+ifeq ($(CCSType),Emulator)
+	rm -rfv ../../Images/root
+	mkdir -p ../../Images/root
+else
 	rm -rfv ../Images/root
 	mkdir -p ../Images/root
+endif
 #	cp -rfv ../Images/boot/reset_soft.sh ../Images/root/
 #	cp -rfv ../Images/boot/stop.sh ../Images/root/
 #	cp -rfv ../Images/boot/reboot.sh ../Images/root/

BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/CsuComm


BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/FWUpdate


BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/FactoryConfig


BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/PCBATester


BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/SeccComm


+ 0 - 14
EVSE/Projects/EVSE-Emulator/Apps/Images/root/cacert.pem

@@ -1,14 +0,0 @@
-subject=/C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server
-issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA
------BEGIN X509 CERTIFICATE-----
-
-MIIBgjCCASwCAQQwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV
-BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MTAwOTIz
-MzIwNVoXDTk4MDcwNTIzMzIwNVowYDELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM
-RDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRkLjELMAkGA1UECxMCQ1MxGzAZBgNV
-BAMTElNTTGVheSBkZW1vIHNlcnZlcjBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC3
-LCXcScWua0PFLkHBLm2VejqpA1F4RQ8q0VjRiPafjx/Z/aWH3ipdMVvuJGa/wFXb
-/nDFLDlfWp+oCPwhBtVPAgMBAAEwDQYJKoZIhvcNAQEEBQADQQArNFsihWIjBzb0
-DCsU0BvL2bvSwJrPEqFlkDq3F4M6EGutL9axEcANWgbbEdAvNJD1dmEmoWny27Pn
-IMs6ZOZB
------END X509 CERTIFICATE-----

+ 0 - 24
EVSE/Projects/EVSE-Emulator/Apps/Images/root/cakey.pem

@@ -1,24 +0,0 @@
-issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA
-subject=/C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server
------BEGIN X509 CERTIFICATE-----
-
-MIIBgjCCASwCAQQwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV
-BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MTAwOTIz
-MzIwNVoXDTk4MDcwNTIzMzIwNVowYDELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM
-RDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRkLjELMAkGA1UECxMCQ1MxGzAZBgNV
-BAMTElNTTGVheSBkZW1vIHNlcnZlcjBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQC3
-LCXcScWua0PFLkHBLm2VejqpA1F4RQ8q0VjRiPafjx/Z/aWH3ipdMVvuJGa/wFXb
-/nDFLDlfWp+oCPwhBtVPAgMBAAEwDQYJKoZIhvcNAQEEBQADQQArNFsihWIjBzb0
-DCsU0BvL2bvSwJrPEqFlkDq3F4M6EGutL9axEcANWgbbEdAvNJD1dmEmoWny27Pn
-IMs6ZOZB
------END X509 CERTIFICATE-----
------BEGIN RSA PRIVATE KEY-----
-
-MIIBPAIBAAJBALcsJdxJxa5rQ8UuQcEubZV6OqkDUXhFDyrRWNGI9p+PH9n9pYfe
-Kl0xW+4kZr/AVdv+cMUsOV9an6gI/CEG1U8CAwEAAQJAXJMBZ34ZXHd1vtgL/3hZ
-hexKbVTx/djZO4imXO/dxPGRzG2ylYZpHmG32/T1kaHpZlCHoEPgHoSzmxYXfxjG
-sQIhAPmZ/bQOjmRUHM/VM2X5zrjjM6z18R1P6l3ObFwt9FGdAiEAu943Yh9SqMRw
-tL0xHGxKmM/YJueUw1gB6sLkETN71NsCIQCeT3RhoqXfrpXDoEcEU+gwzjI1bpxq
-agiNTOLfqGoA5QIhAIQFYjgzONxex7FLrsKBm16N2SFl5pXsN9SpRqqL2n63AiEA
-g9VNIQ3xwpw7og3IbONifeku+J9qGMGQJMKwSTwrFtI=
------END RSA PRIVATE KEY-----

BIN
EVSE/Projects/EVSE-Emulator/Apps/Images/root/main


+ 4 - 4
EVSE/Projects/define.h

@@ -155,10 +155,10 @@ Storage							0x0A200000-0x7FFFFFFF		1886 MB
     #define ONE_CONNECTOR_USE       0
 #elif defined Emulator
     #define MAX_PSU_QUANTITY        62
-    #define CHAdeMO_QUANTITY        3
-    #define CCS_QUANTITY            3
-    #define GB_QUANTITY             3
-    #define AC_QUANTITY             3
+    #define CHAdeMO_QUANTITY        2
+    #define CCS_QUANTITY            2
+    #define GB_QUANTITY             2
+    #define AC_QUANTITY             2
     #define GENERAL_GUN_QUANTITY    0
     #define PSU_QUANTITY            2
     #define ONE_CONNECTOR_USE       0

+ 6 - 6
EVSE/rootfs/var/www/set_charging.php

@@ -219,7 +219,7 @@
 		}
 	}
 	if($obj['DDChargingInfo1']){
-		switch ($obj['DDChargingInfo1']['DDSystemStatus']){
+		switch ($obj['DDChargingInfo1']['SystemStatus']){
 			case 0:
 				$DDSystemStatus1='booting';
 				break;
@@ -286,7 +286,7 @@
 		}
 	}
 	if($obj['DDChargingInfo2']){
-		switch ($obj['DDChargingInfo2']['DDSystemStatus']){
+		switch ($obj['DDChargingInfo2']['SystemStatus']){
 			case 0:
 				$DDSystemStatus2='booting';
 				break;
@@ -353,7 +353,7 @@
 		}
 	}
 	if($obj['DDChargingInfo3']){
-		switch ($obj['DDChargingInfo3']['DDSystemStatus']){
+		switch ($obj['DDChargingInfo3']['SystemStatus']){
 			case 0:
 				$DDSystemStatus3='booting';
 				break;
@@ -420,7 +420,7 @@
 		}
 	}
 	if($obj['DDChargingInfo4']){
-		switch ($obj['DDChargingInfo4']['DDSystemStatus']){
+		switch ($obj['DDChargingInfo4']['SystemStatus']){
 			case 0:
 				$DDSystemStatus4='booting';
 				break;
@@ -980,7 +980,7 @@ CORE STYLES ABOVE - NO TOUCHY
 										</div>
 										<div class="form-group ChillerTemp">
 											<label>Chiller Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['DDChargingInfo1']['ChillerrTemp']!=255?$obj['DDChargingInfo1']['ChillerTemp']." ℃":"not supported";?>">
+											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['DDChargingInfo1']['ChillerTemp']!=255?$obj['DDChargingInfo1']['ChillerTemp']." ℃":"not supported";?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label><?php echo $lang->showWord("present_charging_voltage"); ?></label>
@@ -1208,7 +1208,7 @@ CORE STYLES ABOVE - NO TOUCHY
 										</div>
 										<div class="form-group ChillerTemp">
 											<label>Chiller Temperature</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['DDChargingInfo4']['ChilleTemp']!=255?$obj['DDChargingInfo4']['ChillerTemp']." ℃":"not supported";?>">
+											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['DDChargingInfo4']['ChillerTemp']!=255?$obj['DDChargingInfo4']['ChillerTemp']." ℃":"not supported";?>">
 										</div>
 										<div class="form-group" style="display:<?php echo $am001;?>">
 											<label><?php echo $lang->showWord("present_charging_voltage"); ?></label>

+ 1 - 0
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.byteswap.cmd

@@ -0,0 +1 @@
+cmd_MLO.byteswap := ./tools/mkimage -T omapimage -n byteswap -a 0x402F0400 -d spl/u-boot-spl.bin MLO.byteswap  >/dev/null

+ 1 - 0
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.MLO.cmd

@@ -0,0 +1 @@
+cmd_MLO := ./tools/mkimage -T omapimage -a 0x402F0400 -d spl/u-boot-spl.bin MLO  >/dev/null

+ 0 - 27
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.checkpatch.conf

@@ -1,27 +0,0 @@
-# Not Linux, so don't expect a Linux tree.
---no-tree
-
-# Temporary for false positive in checkpatch
---ignore COMPLEX_MACRO
-
-# For CONFIG_SYS_I2C_NOPROBES
---ignore MULTISTATEMENT_MACRO_USE_DO_WHILE
-
-# For simple_strtoul
---ignore CONSIDER_KSTRTO
-
-# For min/max
---ignore MINMAX
-
-# enable more tests
---strict
-
-# Not Linux, so we don't recommend usleep_range() over udelay()
---ignore USLEEP_RANGE
-
-# Ignore networking block comment style
---ignore NETWORKING_BLOCK_COMMENT_STYLE
-
-# Ignore "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
-# addresses are __aligned(2)".
---ignore PREFER_ETHER_ADDR_COPY

+ 0 - 858
board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/.config

@@ -1,858 +0,0 @@
-#
-# Automatically generated file; DO NOT EDIT.
-# U-Boot 2017.01 Configuration
-#
-CONFIG_CREATE_ARCH_SYMLINK=y
-# CONFIG_ARC is not set
-CONFIG_ARM=y
-# CONFIG_AVR32 is not set
-# CONFIG_BLACKFIN is not set
-# CONFIG_M68K is not set
-# CONFIG_MICROBLAZE is not set
-# CONFIG_MIPS is not set
-# CONFIG_NDS32 is not set
-# CONFIG_NIOS2 is not set
-# CONFIG_OPENRISC is not set
-# CONFIG_PPC is not set
-# CONFIG_SANDBOX is not set
-# CONFIG_SH is not set
-# CONFIG_SPARC is not set
-# CONFIG_X86 is not set
-# CONFIG_XTENSA is not set
-CONFIG_SYS_ARCH="arm"
-CONFIG_SYS_CPU="armv7"
-CONFIG_SYS_SOC="am33xx"
-CONFIG_SYS_VENDOR="ti"
-CONFIG_SYS_BOARD="am335x"
-CONFIG_SYS_CONFIG_NAME="am335x_evm"
-
-#
-# ARM architecture
-#
-CONFIG_HAS_VBAR=y
-CONFIG_HAS_THUMB2=y
-CONFIG_CPU_V7=y
-CONFIG_SYS_ARM_ARCH=7
-CONFIG_SYS_CACHE_SHIFT_6=y
-CONFIG_SYS_CACHELINE_SIZE=64
-# CONFIG_SEMIHOSTING is not set
-# CONFIG_SYS_L2CACHE_OFF is not set
-# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set
-CONFIG_USE_ARCH_MEMCPY=y
-CONFIG_USE_ARCH_MEMSET=y
-CONFIG_ARCH_OMAP2=y
-# CONFIG_ARM64_SUPPORT_AARCH32 is not set
-# CONFIG_ARCH_AT91 is not set
-# CONFIG_TARGET_EDB93XX is not set
-# CONFIG_TARGET_ASPENITE is not set
-# CONFIG_TARGET_GPLUGD is not set
-# CONFIG_ARCH_DAVINCI is not set
-# CONFIG_KIRKWOOD is not set
-# CONFIG_ARCH_MVEBU is not set
-# CONFIG_TARGET_DEVKIT3250 is not set
-# CONFIG_TARGET_WORK_92105 is not set
-# CONFIG_TARGET_MX25PDK is not set
-# CONFIG_TARGET_ZMX25 is not set
-# CONFIG_TARGET_APF27 is not set
-# CONFIG_TARGET_APX4DEVKIT is not set
-# CONFIG_TARGET_XFI3 is not set
-# CONFIG_TARGET_M28EVK is not set
-# CONFIG_TARGET_MX23EVK is not set
-# CONFIG_TARGET_MX28EVK is not set
-# CONFIG_TARGET_MX23_OLINUXINO is not set
-# CONFIG_TARGET_BG0900 is not set
-# CONFIG_TARGET_SANSA_FUZE_PLUS is not set
-# CONFIG_TARGET_SC_SPS_1 is not set
-# CONFIG_ORION5X is not set
-# CONFIG_TARGET_SPEAR300 is not set
-# CONFIG_TARGET_SPEAR310 is not set
-# CONFIG_TARGET_SPEAR320 is not set
-# CONFIG_TARGET_SPEAR600 is not set
-# CONFIG_TARGET_STV0991 is not set
-# CONFIG_TARGET_X600 is not set
-# CONFIG_TARGET_IMX31_PHYCORE is not set
-# CONFIG_TARGET_MX31ADS is not set
-# CONFIG_TARGET_MX31PDK is not set
-# CONFIG_TARGET_WOODBURN is not set
-# CONFIG_TARGET_WOODBURN_SD is not set
-# CONFIG_TARGET_FLEA3 is not set
-# CONFIG_TARGET_MX35PDK is not set
-# CONFIG_ARCH_BCM283X is not set
-# CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
-# CONFIG_TARGET_VEXPRESS_CA5X2 is not set
-# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
-# CONFIG_TARGET_BRXRE1 is not set
-# CONFIG_TARGET_BRPPT1 is not set
-# CONFIG_TARGET_DRACO is not set
-# CONFIG_TARGET_THUBAN is not set
-# CONFIG_TARGET_RASTABAN is not set
-# CONFIG_TARGET_ETAMIN is not set
-# CONFIG_TARGET_PXM2 is not set
-# CONFIG_TARGET_RUT is not set
-# CONFIG_TARGET_TI814X_EVM is not set
-# CONFIG_TARGET_TI816X_EVM is not set
-# CONFIG_TARGET_BCM23550_W1D is not set
-# CONFIG_TARGET_BCM28155_AP is not set
-# CONFIG_TARGET_BCMCYGNUS is not set
-# CONFIG_TARGET_BCMNSP is not set
-# CONFIG_ARCH_EXYNOS is not set
-# CONFIG_ARCH_S5PC1XX is not set
-# CONFIG_ARCH_HIGHBANK is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_KEYSTONE is not set
-# CONFIG_ARCH_MESON is not set
-# CONFIG_ARCH_MX7 is not set
-# CONFIG_ARCH_MX6 is not set
-# CONFIG_ARCH_MX5 is not set
-# CONFIG_TARGET_M53EVK is not set
-# CONFIG_TARGET_MX51EVK is not set
-# CONFIG_TARGET_MX53ARD is not set
-# CONFIG_TARGET_MX53EVK is not set
-# CONFIG_TARGET_MX53LOCO is not set
-# CONFIG_TARGET_MX53SMD is not set
-# CONFIG_OMAP34XX is not set
-# CONFIG_OMAP44XX is not set
-# CONFIG_OMAP54XX is not set
-# CONFIG_AM43XX is not set
-CONFIG_AM33XX=y
-# CONFIG_ARCH_RMOBILE is not set
-# CONFIG_TARGET_S32V234EVB is not set
-# CONFIG_ARCH_SNAPDRAGON is not set
-# CONFIG_ARCH_SOCFPGA is not set
-# CONFIG_TARGET_CM_T43 is not set
-# CONFIG_ARCH_SUNXI is not set
-# CONFIG_TARGET_TS4600 is not set
-# CONFIG_TARGET_TS4800 is not set
-# CONFIG_TARGET_VF610TWR is not set
-# CONFIG_TARGET_COLIBRI_VF is not set
-# CONFIG_TARGET_PCM052 is not set
-# CONFIG_TARGET_BK4R1 is not set
-# CONFIG_ARCH_ZYNQ is not set
-# CONFIG_ARCH_ZYNQMP is not set
-# CONFIG_TEGRA is not set
-# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set
-# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set
-# CONFIG_TARGET_VEXPRESS64_BASE_FVP_DRAM is not set
-# CONFIG_TARGET_VEXPRESS64_JUNO is not set
-# CONFIG_TARGET_LS2080A_EMU is not set
-# CONFIG_TARGET_LS2080A_SIMU is not set
-# CONFIG_TARGET_LS2080AQDS is not set
-# CONFIG_TARGET_LS2080ARDB is not set
-# CONFIG_TARGET_HIKEY is not set
-# CONFIG_TARGET_LS1012AQDS is not set
-# CONFIG_TARGET_LS1012ARDB is not set
-# CONFIG_TARGET_LS1012AFRDM is not set
-# CONFIG_TARGET_LS1021AQDS is not set
-# CONFIG_TARGET_LS1021ATWR is not set
-# CONFIG_TARGET_LS1021AIOT is not set
-# CONFIG_TARGET_LS1043AQDS is not set
-# CONFIG_TARGET_LS1043ARDB is not set
-# CONFIG_TARGET_LS1046AQDS is not set
-# CONFIG_TARGET_LS1046ARDB is not set
-# CONFIG_TARGET_H2200 is not set
-# CONFIG_TARGET_ZIPITZ2 is not set
-# CONFIG_TARGET_COLIBRI_PXA270 is not set
-# CONFIG_ARCH_UNIPHIER is not set
-# CONFIG_STM32 is not set
-# CONFIG_ARCH_ROCKCHIP is not set
-# CONFIG_TARGET_THUNDERX_88XX is not set
-CONFIG_SPL_GPIO_SUPPORT=y
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
-CONFIG_TI_I2C_BOARD_DETECT=y
-CONFIG_EEPROM_BUS_ADDRESS=0
-CONFIG_EEPROM_CHIP_ADDRESS=0x50
-CONFIG_SPL_ENV_SUPPORT=y
-CONFIG_SPL_EXT_SUPPORT=y
-CONFIG_SPL_FAT_SUPPORT=y
-CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_LIBDISK_SUPPORT=y
-CONFIG_SPL_MMC_SUPPORT=y
-CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SPL_POWER_SUPPORT=y
-CONFIG_SPL_SERIAL_SUPPORT=y
-# CONFIG_TI_SECURE_DEVICE is not set
-# CONFIG_SPL_DISPLAY_PRINT is not set
-CONFIG_CONS_INDEX=1
-CONFIG_TARGET_AM335X_EVM=y
-# CONFIG_TARGET_AM335X_BALTOS is not set
-# CONFIG_TARGET_AM335X_IGEP0033 is not set
-# CONFIG_TARGET_AM335X_SHC is not set
-# CONFIG_TARGET_AM335X_SL50 is not set
-# CONFIG_TARGET_BAV335X is not set
-# CONFIG_TARGET_CM_T335 is not set
-# CONFIG_TARGET_PCM051 is not set
-# CONFIG_TARGET_PENGWYN is not set
-# CONFIG_TARGET_PEPPER is not set
-CONFIG_ISW_ENTRY_ADDR=0x402F0400
-CONFIG_PUB_ROM_DATA_SIZE=0x8400
-# CONFIG_SPL_DRIVERS_MISC_SUPPORT is not set
-# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
-# CONFIG_SPL_SPI_SUPPORT is not set
-CONFIG_SPL_WATCHDOG_SUPPORT=y
-# CONFIG_ARMV7_LPAE is not set
-CONFIG_IDENT_STRING=""
-# CONFIG_PRE_CONSOLE_BUFFER is not set
-CONFIG_MMC=y
-# CONFIG_VIDEO is not set
-CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_YMODEM_SUPPORT=y
-# CONFIG_NOR is not set
-
-#
-# ARM debug
-#
-# CONFIG_DEBUG_LL is not set
-CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
-CONFIG_SMBIOS_PRODUCT_NAME="am335x"
-# CONFIG_AHCI is not set
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_MALLOC_F=y
-CONFIG_EXPERT=y
-CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
-# CONFIG_TOOLS_DEBUG is not set
-# CONFIG_PHYS_64BIT is not set
-
-#
-# Boot images
-#
-CONFIG_FIT=y
-# CONFIG_SPL_FIT is not set
-# CONFIG_FIT_VERBOSE is not set
-# CONFIG_FIT_SIGNATURE is not set
-# CONFIG_FIT_BEST_MATCH is not set
-CONFIG_OF_BOARD_SETUP=y
-# CONFIG_OF_SYSTEM_SETUP is not set
-# CONFIG_OF_STDOUT_VIA_ALIAS is not set
-CONFIG_SYS_EXTRA_OPTIONS="NAND,ENV_IS_IN_NAND"
-CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_RAW_IMAGE_SUPPORT=y
-CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
-CONFIG_ARCH_FIXUP_FDT_MEMORY=y
-
-#
-# Boot timing
-#
-# CONFIG_BOOTSTAGE is not set
-CONFIG_BOOTSTAGE_USER_COUNT=20
-CONFIG_BOOTSTAGE_STASH_ADDR=0
-CONFIG_BOOTSTAGE_STASH_SIZE=4096
-
-#
-# Boot media
-#
-# CONFIG_NAND_BOOT is not set
-# CONFIG_ONENAND_BOOT is not set
-# CONFIG_QSPI_BOOT is not set
-# CONFIG_SATA_BOOT is not set
-# CONFIG_SD_BOOT is not set
-# CONFIG_SPI_BOOT is not set
-CONFIG_BOOTDELAY=1
-
-#
-# Console
-#
-CONFIG_MENU=y
-# CONFIG_CONSOLE_RECORD is not set
-# CONFIG_SILENT_CONSOLE is not set
-# CONFIG_CONSOLE_MUX is not set
-# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set
-# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set
-# CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set
-CONFIG_SYS_CONSOLE_INFO_QUIET=y
-# CONFIG_SYS_STDIO_DEREGISTER is not set
-# CONFIG_FIT_EMBED is not set
-CONFIG_DEFAULT_FDT_FILE=""
-# CONFIG_SYS_NO_FLASH is not set
-CONFIG_VERSION_VARIABLE=y
-CONFIG_DISPLAY_CPUINFO=y
-CONFIG_DISPLAY_BOARDINFO=y
-
-#
-# SPL / TPL
-#
-CONFIG_SUPPORT_SPL=y
-CONFIG_SPL=y
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x100000
-CONFIG_SPL_SEPARATE_BSS=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
-# CONFIG_SPL_CRYPTO_SUPPORT is not set
-# CONFIG_SPL_HASH_SUPPORT is not set
-# CONFIG_SPL_DMA_SUPPORT is not set
-# CONFIG_SPL_SAVEENV is not set
-CONFIG_SPL_ETH_SUPPORT=y
-# CONFIG_SPL_FPGA_SUPPORT is not set
-# CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT is not set
-CONFIG_SPL_MTD_SUPPORT=y
-CONFIG_SPL_MUSB_NEW_SUPPORT=y
-CONFIG_SPL_NET_SUPPORT=y
-CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL"
-# CONFIG_SPL_NO_CPU_SUPPORT is not set
-# CONFIG_SPL_NOR_SUPPORT is not set
-# CONFIG_SPL_ONENAND_SUPPORT is not set
-CONFIG_SPL_OS_BOOT=y
-# CONFIG_SPL_POST_MEM_SUPPORT is not set
-# CONFIG_SPL_RAM_SUPPORT is not set
-# CONFIG_SPL_SATA_SUPPORT is not set
-# CONFIG_SPL_USB_HOST_SUPPORT is not set
-CONFIG_SPL_USB_GADGET_SUPPORT=y
-CONFIG_SPL_USBETH_SUPPORT=y
-
-#
-# Command line interface
-#
-CONFIG_CMDLINE=y
-CONFIG_HUSH_PARSER=y
-CONFIG_SYS_PROMPT="=> "
-
-#
-# Autoboot options
-#
-CONFIG_AUTOBOOT=y
-CONFIG_AUTOBOOT_KEYED=y
-CONFIG_AUTOBOOT_PROMPT="Press SPACE key 2 times to abort autoboot in %d seconds\n"
-# CONFIG_AUTOBOOT_ENCRYPTION is not set
-CONFIG_AUTOBOOT_DELAY_STR="d"
-CONFIG_AUTOBOOT_STOP_STR="  "
-# CONFIG_AUTOBOOT_KEYED_CTRLC is not set
-
-#
-# FASTBOOT
-#
-# CONFIG_FASTBOOT is not set
-
-#
-# Commands
-#
-
-#
-# Info commands
-#
-CONFIG_CMD_BDI=y
-CONFIG_CMD_CONSOLE=y
-# CONFIG_CMD_CPU is not set
-# CONFIG_CMD_LICENSE is not set
-
-#
-# Boot commands
-#
-CONFIG_CMD_BOOTD=y
-CONFIG_CMD_BOOTM=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_BOOTEFI=y
-CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
-# CONFIG_CMD_BOOTEFI_HELLO is not set
-# CONFIG_CMD_BOOTMENU is not set
-CONFIG_CMD_ELF=y
-CONFIG_CMD_FDT=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_RUN=y
-CONFIG_CMD_IMI=y
-# CONFIG_CMD_IMLS is not set
-CONFIG_CMD_XIMG=y
-
-#
-# Environment commands
-#
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_EXPORTENV=y
-CONFIG_CMD_IMPORTENV=y
-CONFIG_CMD_EDITENV=y
-# CONFIG_CMD_GREPENV is not set
-CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_ENV_EXISTS=y
-
-#
-# Memory commands
-#
-CONFIG_CMD_MEMORY=y
-CONFIG_CMD_CRC32=y
-# CONFIG_LOOPW is not set
-CONFIG_CMD_MEMTEST=y
-# CONFIG_CMD_MX_CYCLIC is not set
-# CONFIG_CMD_MEMINFO is not set
-
-#
-# Device access commands
-#
-CONFIG_CMD_DM=y
-# CONFIG_CMD_DEMO is not set
-CONFIG_CMD_LOADB=y
-CONFIG_CMD_LOADS=y
-# CONFIG_CMD_FLASH is not set
-# CONFIG_CMD_ARMFLASH is not set
-CONFIG_CMD_MMC=y
-# CONFIG_CMD_NAND is not set
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_USB_MASS_STORAGE is not set
-CONFIG_CMD_FPGA=y
-CONFIG_CMD_GPIO=y
-# CONFIG_CMD_RIO is not set
-
-#
-# Shell scripting commands
-#
-CONFIG_CMD_ECHO=y
-CONFIG_CMD_ITEST=y
-CONFIG_CMD_SOURCE=y
-# CONFIG_CMD_SETEXPR is not set
-
-#
-# Network commands
-#
-CONFIG_CMD_NET=y
-# CONFIG_CMD_TFTPPUT is not set
-# CONFIG_CMD_TFTPSRV is not set
-# CONFIG_CMD_RARP is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PXE=y
-CONFIG_CMD_NFS=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-# CONFIG_CMD_CDP is not set
-# CONFIG_CMD_SNTP is not set
-# CONFIG_CMD_DNS is not set
-# CONFIG_CMD_LINK_LOCAL is not set
-
-#
-# Misc commands
-#
-# CONFIG_CMD_BKOPS_ENABLE is not set
-# CONFIG_CMD_CACHE is not set
-# CONFIG_CMD_TIME is not set
-CONFIG_CMD_MISC=y
-# CONFIG_CMD_TIMER is not set
-# CONFIG_CMD_QFW is not set
-
-#
-# Power commands
-#
-
-#
-# Security commands
-#
-
-#
-# Firmware commands
-#
-
-#
-# Filesystem commands
-#
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-# CONFIG_CMD_UBI is not set
-CONFIG_SUPPORT_OF_CONTROL=y
-
-#
-# Device Tree Control
-#
-CONFIG_OF_CONTROL=y
-# CONFIG_SPL_OF_CONTROL is not set
-CONFIG_OF_SEPARATE=y
-# CONFIG_OF_EMBED is not set
-CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"
-CONFIG_NET=y
-# CONFIG_NET_RANDOM_ETHADDR is not set
-# CONFIG_NETCONSOLE is not set
-CONFIG_NET_TFTP_VARS=y
-CONFIG_BOOTP_PXE_CLIENTARCH=0x15
-CONFIG_BOOTP_VCI_STRING="U-Boot.armv7"
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_DM=y
-# CONFIG_SPL_DM is not set
-CONFIG_DM_WARN=y
-CONFIG_DM_DEVICE_REMOVE=y
-CONFIG_DM_STDIO=y
-CONFIG_DM_SEQ_ALIAS=y
-# CONFIG_SPL_DM_SEQ_ALIAS is not set
-# CONFIG_REGMAP is not set
-# CONFIG_SPL_REGMAP is not set
-# CONFIG_DEVRES is not set
-CONFIG_SIMPLE_BUS=y
-CONFIG_OF_TRANSLATE=y
-# CONFIG_ADC is not set
-# CONFIG_ADC_EXYNOS is not set
-# CONFIG_ADC_SANDBOX is not set
-# CONFIG_BLK is not set
-# CONFIG_BLOCK_CACHE is not set
-
-#
-# SATA/SCSI device support
-#
-
-#
-# Clock
-#
-# CONFIG_CLK is not set
-# CONFIG_CPU is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_FSL_CAAM is not set
-# CONFIG_SYS_FSL_SEC_BE is not set
-# CONFIG_SYS_FSL_SEC_LE is not set
-
-#
-# Demo for driver model
-#
-# CONFIG_DM_DEMO is not set
-
-#
-# DFU support
-#
-CONFIG_USB_FUNCTION_DFU=y
-# CONFIG_DFU_TFTP is not set
-CONFIG_DFU_MMC=y
-# CONFIG_SPL_DFU_MMC is not set
-CONFIG_DFU_NAND=y
-CONFIG_DFU_RAM=y
-# CONFIG_DFU_SF is not set
-
-#
-# DMA Support
-#
-# CONFIG_DMA is not set
-# CONFIG_TI_EDMA3 is not set
-
-#
-# FPGA support
-#
-# CONFIG_FPGA_ALTERA is not set
-# CONFIG_FPGA_XILINX is not set
-
-#
-# GPIO Support
-#
-CONFIG_DM_GPIO=y
-# CONFIG_ALTERA_PIO is not set
-# CONFIG_DWAPB_GPIO is not set
-# CONFIG_ATMEL_PIO4 is not set
-# CONFIG_INTEL_BROADWELL_GPIO is not set
-# CONFIG_LPC32XX_GPIO is not set
-# CONFIG_MSM_GPIO is not set
-# CONFIG_PCF8575_GPIO is not set
-# CONFIG_ROCKCHIP_GPIO is not set
-# CONFIG_TEGRA_GPIO is not set
-# CONFIG_TEGRA186_GPIO is not set
-# CONFIG_VYBRID_GPIO is not set
-# CONFIG_DM_74X164 is not set
-# CONFIG_DM_PCA953X is not set
-# CONFIG_MPC85XX_GPIO is not set
-
-#
-# I2C support
-#
-CONFIG_DM_I2C=y
-# CONFIG_DM_I2C_COMPAT is not set
-# CONFIG_DM_I2C_GPIO is not set
-# CONFIG_SYS_I2C_FSL is not set
-# CONFIG_SYS_I2C_DW is not set
-# CONFIG_SYS_I2C_INTEL is not set
-# CONFIG_SYS_I2C_ROCKCHIP is not set
-# CONFIG_SYS_I2C_MVTWSI is not set
-# CONFIG_I2C_MUX is not set
-# CONFIG_DM_KEYBOARD is not set
-# CONFIG_CROS_EC_KEYB is not set
-
-#
-# LED Support
-#
-# CONFIG_LED is not set
-
-#
-# Mailbox Controller Support
-#
-# CONFIG_DM_MAILBOX is not set
-
-#
-# Memory Controller drivers
-#
-
-#
-# Multifunction device drivers
-#
-CONFIG_MISC=y
-# CONFIG_ALTERA_SYSID is not set
-# CONFIG_CROS_EC is not set
-# CONFIG_FSL_SEC_MON is not set
-# CONFIG_MXC_OCOTP is not set
-# CONFIG_NUVOTON_NCT6102D is not set
-# CONFIG_PWRSEQ is not set
-# CONFIG_PCA9551_LED is not set
-# CONFIG_WINBOND_W83627 is not set
-# CONFIG_I2C_EEPROM is not set
-
-#
-# MMC Host controller Support
-#
-CONFIG_DM_MMC=y
-# CONFIG_DM_MMC_OPS is not set
-# CONFIG_SPL_MMC_TINY is not set
-# CONFIG_ROCKCHIP_DWMMC is not set
-# CONFIG_MMC_SDHCI is not set
-
-#
-# MTD Support
-#
-# CONFIG_MTD is not set
-
-#
-# NAND Device Support
-#
-CONFIG_DM_NAND=y
-# CONFIG_NAND_DENALI is not set
-# CONFIG_NAND_VF610_NFC is not set
-# CONFIG_NAND_PXA3XX is not set
-# CONFIG_NAND_ARASAN is not set
-# CONFIG_NAND_ZYNQ is not set
-
-#
-# Generic NAND options
-#
-# CONFIG_SYS_NAND_U_BOOT_LOCATIONS is not set
-# CONFIG_SPL_NAND_DENALI is not set
-
-#
-# SPI Flash Support
-#
-CONFIG_SPI_FLASH=y
-# CONFIG_SPI_FLASH_BAR is not set
-# CONFIG_SPI_FLASH_ATMEL is not set
-# CONFIG_SPI_FLASH_EON is not set
-# CONFIG_SPI_FLASH_GIGADEVICE is not set
-# CONFIG_SPI_FLASH_MACRONIX is not set
-# CONFIG_SPI_FLASH_SPANSION is not set
-# CONFIG_SPI_FLASH_STMICRO is not set
-# CONFIG_SPI_FLASH_SST is not set
-CONFIG_SPI_FLASH_WINBOND=y
-CONFIG_SPI_FLASH_USE_4K_SECTORS=y
-# CONFIG_SPI_FLASH_MTD is not set
-
-#
-# UBI support
-#
-# CONFIG_MTD_UBI is not set
-# CONFIG_DM_ETH is not set
-# CONFIG_PHYLIB is not set
-# CONFIG_NETDEVICES is not set
-# CONFIG_PCI is not set
-# CONFIG_MVEBU_COMPHY_SUPPORT is not set
-
-#
-# Pin controllers
-#
-# CONFIG_PINCTRL is not set
-
-#
-# Power
-#
-
-#
-# Power Domain Support
-#
-# CONFIG_POWER_DOMAIN is not set
-# CONFIG_DM_PMIC is not set
-# CONFIG_DM_REGULATOR is not set
-# CONFIG_DM_PWM is not set
-# CONFIG_RAM is not set
-# CONFIG_DM_RIO is not set
-
-#
-# Remote Processor drivers
-#
-
-#
-# Reset Controller Support
-#
-# CONFIG_DM_RESET is not set
-
-#
-# Real Time Clock
-#
-# CONFIG_DM_RTC is not set
-
-#
-# Serial drivers
-#
-CONFIG_REQUIRE_SERIAL_CONSOLE=y
-CONFIG_SERIAL_PRESENT=y
-CONFIG_SPL_SERIAL_PRESENT=y
-CONFIG_DM_SERIAL=y
-# CONFIG_DEBUG_UART is not set
-# CONFIG_DEBUG_UART_SKIP_INIT is not set
-# CONFIG_ALTERA_JTAG_UART is not set
-# CONFIG_ALTERA_UART is not set
-# CONFIG_ATMEL_USART is not set
-# CONFIG_FSL_LPUART is not set
-# CONFIG_MVEBU_A3700_UART is not set
-CONFIG_SYS_NS16550=y
-# CONFIG_MSM_SERIAL is not set
-# CONFIG_PXA_SERIAL is not set
-
-#
-# Sound support
-#
-# CONFIG_SOUND is not set
-
-#
-# SPI Support
-#
-# CONFIG_DM_SPI is not set
-# CONFIG_FSL_ESPI is not set
-# CONFIG_FSL_QSPI is not set
-# CONFIG_TI_QSPI is not set
-
-#
-# SPMI support
-#
-# CONFIG_SPMI is not set
-
-#
-# System reset device drivers
-#
-# CONFIG_SYSRESET is not set
-# CONFIG_DM_THERMAL is not set
-
-#
-# Timer Support
-#
-CONFIG_TIMER=y
-# CONFIG_TIMER_EARLY is not set
-# CONFIG_ALTERA_TIMER is not set
-CONFIG_OMAP_TIMER=y
-
-#
-# TPM support
-#
-CONFIG_USB=y
-CONFIG_DM_USB=y
-
-#
-# USB Host Controller Drivers
-#
-# CONFIG_USB_XHCI_HCD is not set
-# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_EHCI is not set
-# CONFIG_USB_OHCI_HCD is not set
-# CONFIG_USB_UHCI_HCD is not set
-# CONFIG_USB_DWC3 is not set
-
-#
-# MUSB Controller Driver
-#
-CONFIG_USB_MUSB_HOST=y
-CONFIG_USB_MUSB_GADGET=y
-CONFIG_USB_MUSB_TI=y
-
-#
-# ULPI drivers
-#
-
-#
-# USB peripherals
-#
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_KEYBOARD is not set
-CONFIG_USB_GADGET=y
-# CONFIG_USB_GADGET_ATMEL_USBA is not set
-# CONFIG_USB_GADGET_BCM_UDC_OTG_PHY is not set
-# CONFIG_USB_GADGET_DWC2_OTG is not set
-# CONFIG_CI_UDC is not set
-CONFIG_USB_GADGET_VBUS_DRAW=2
-CONFIG_USB_GADGET_DUALSPEED=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
-CONFIG_G_DNL_VENDOR_NUM=0x0451
-CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_USBNET_DEVADDR="de:ad:be:ef:00:01"
-
-#
-# Graphics support
-#
-# CONFIG_DM_VIDEO is not set
-
-#
-# TrueType Fonts
-#
-# CONFIG_VIDEO_VESA is not set
-# CONFIG_VIDEO_LCD_ANX9804 is not set
-# CONFIG_VIDEO_LCD_SSD2828 is not set
-# CONFIG_VIDEO_MVEBU is not set
-# CONFIG_I2C_EDID is not set
-# CONFIG_DISPLAY is not set
-# CONFIG_VIDEO_TEGRA20 is not set
-# CONFIG_VIDEO_BRIDGE is not set
-# CONFIG_LCD is not set
-# CONFIG_PHYS_TO_BUS is not set
-
-#
-# File systems
-#
-
-#
-# Library routines
-#
-# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
-CONFIG_HAVE_PRIVATE_LIBGCC=y
-CONFIG_USE_PRIVATE_LIBGCC=y
-CONFIG_SYS_HZ=1000
-CONFIG_USE_TINY_PRINTF=y
-CONFIG_REGEX=y
-# CONFIG_LIB_RAND is not set
-# CONFIG_CMD_DHRYSTONE is not set
-CONFIG_RSA=y
-# CONFIG_SPL_RSA is not set
-CONFIG_RSA_SOFTWARE_EXP=y
-# CONFIG_TPM is not set
-
-#
-# Hashing Support
-#
-# CONFIG_SHA1 is not set
-# CONFIG_SHA256 is not set
-# CONFIG_SHA_HW_ACCEL is not set
-
-#
-# Compression Support
-#
-# CONFIG_LZ4 is not set
-# CONFIG_ERRNO_STR is not set
-CONFIG_OF_LIBFDT=y
-# CONFIG_OF_LIBFDT_OVERLAY is not set
-CONFIG_SPL_OF_LIBFDT=y
-# CONFIG_FDT_FIXUP_PARTITIONS is not set
-
-#
-# System tables
-#
-CONFIG_GENERATE_SMBIOS_TABLE=y
-CONFIG_SMBIOS_MANUFACTURER="ti"
-CONFIG_EFI_LOADER=y
-# CONFIG_UNIT_TEST is not set