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

Merge branch 'master' into AW-Regular

FolusWen 5 жил өмнө
parent
commit
e702cf2ef6
100 өөрчлөгдсөн 10924 нэмэгдсэн , 6644 устгасан
  1. 3 3
      EVSE/Modularization/Infypwr_PsuCommObj.c
  2. 16 0
      EVSE/Modularization/Infypwr_PsuCommObj.h
  3. 2 3
      EVSE/Modularization/Module_RFID.c
  4. 2 2
      EVSE/Modularization/Module_RFID.h
  5. BIN
      EVSE/Modularization/Module_Wifi
  6. 8 8
      EVSE/Modularization/Phihong_PsuCommObj.c
  7. 2 2
      EVSE/Modularization/Phihong_PsuCommObj.h
  8. 199 194
      EVSE/Modularization/WebService.c
  9. BIN
      EVSE/Modularization/libInfypwr_PsuCommObj.a
  10. BIN
      EVSE/Modularization/libModule_RFID.a
  11. 137 0
      EVSE/Projects/DS60-120/Apps/Config.h
  12. 175 0
      EVSE/Projects/DS60-120/Apps/Ev_Comm.c
  13. BIN
      EVSE/Projects/DS60-120/Apps/Ev_Comm.o
  14. 82 0
      EVSE/Projects/DS60-120/Apps/Makefile
  15. BIN
      EVSE/Projects/DS60-120/Apps/Module_EvComm
  16. 1093 0
      EVSE/Projects/DS60-120/Apps/Module_EvComm.c
  17. 77 0
      EVSE/Projects/DS60-120/Apps/Module_EvComm.h
  18. BIN
      EVSE/Projects/DS60-120/Apps/Module_EvComm.o
  19. BIN
      EVSE/Projects/DS60-120/Apps/Module_EventLogging
  20. 298 0
      EVSE/Projects/DS60-120/Apps/Module_EventLogging.c
  21. BIN
      EVSE/Projects/DS60-120/Apps/Module_EventLogging.o
  22. BIN
      EVSE/Projects/DS60-120/Apps/Module_InternalComm
  23. 1347 0
      EVSE/Projects/DS60-120/Apps/Module_InternalComm.c
  24. BIN
      EVSE/Projects/DS60-120/Apps/Module_InternalComm.o
  25. 150 0
      EVSE/Projects/DS60-120/Apps/Module_LcmContro.h
  26. BIN
      EVSE/Projects/DS60-120/Apps/Module_LcmControl
  27. 871 0
      EVSE/Projects/DS60-120/Apps/Module_LcmControl.c
  28. BIN
      EVSE/Projects/DS60-120/Apps/Module_LcmControl.o
  29. BIN
      EVSE/Projects/DS60-120/Apps/Module_PrimaryComm
  30. 361 0
      EVSE/Projects/DS60-120/Apps/Module_PrimaryComm.c
  31. BIN
      EVSE/Projects/DS60-120/Apps/Module_PrimaryComm.o
  32. BIN
      EVSE/Projects/DS60-120/Apps/Module_PsuComm
  33. 1221 0
      EVSE/Projects/DS60-120/Apps/Module_PsuComm.c
  34. 83 0
      EVSE/Projects/DS60-120/Apps/Module_PsuComm.h
  35. BIN
      EVSE/Projects/DS60-120/Apps/Module_PsuComm.o
  36. 332 0
      EVSE/Projects/DS60-120/Apps/PrimaryComm.c
  37. 80 0
      EVSE/Projects/DS60-120/Apps/PrimaryComm.h
  38. BIN
      EVSE/Projects/DS60-120/Apps/PrimaryComm.o
  39. BIN
      EVSE/Projects/DS60-120/Apps/ReadCmdline
  40. 497 0
      EVSE/Projects/DS60-120/Apps/ReadCmdline.c
  41. BIN
      EVSE/Projects/DS60-120/Apps/ReadCmdline.o
  42. 10 0
      EVSE/Projects/DS60-120/Apps/init.sh
  43. 753 0
      EVSE/Projects/DS60-120/Apps/internalComm.c
  44. 185 0
      EVSE/Projects/DS60-120/Apps/internalComm.h
  45. BIN
      EVSE/Projects/DS60-120/Apps/internalComm.o
  46. 8 0
      EVSE/Projects/DS60-120/Apps/kill.sh
  47. BIN
      EVSE/Projects/DS60-120/Apps/main
  48. 2825 0
      EVSE/Projects/DS60-120/Apps/main.c
  49. BIN
      EVSE/Projects/DS60-120/Apps/main.o
  50. 5 0
      EVSE/Projects/DS60-120/Apps/timeout.c
  51. 52 0
      EVSE/Projects/DS60-120/Apps/timeout.h
  52. BIN
      EVSE/Projects/DS60-120/Apps/timeout.o
  53. BIN
      EVSE/Projects/DS60-120/Images/MLO
  54. BIN
      EVSE/Projects/DS60-120/Images/am335x-evm.dtb
  55. BIN
      EVSE/Projects/DS60-120/Images/ramdisk.gz
  56. BIN
      EVSE/Projects/DS60-120/Images/u-boot.img
  57. BIN
      EVSE/Projects/DS60-120/Images/zImage
  58. 50 61
      EVSE/Projects/define.h
  59. BIN
      EVSE/rootfs/lib/qcaspi.ko
  60. BIN
      EVSE/rootfs/root/Module_4g
  61. BIN
      EVSE/rootfs/root/Module_Wifi
  62. BIN
      EVSE/rootfs/root/OcppBackend
  63. BIN
      EVSE/rootfs/root/WebService
  64. BIN
      EVSE/rootfs/root/logPackTools
  65. 0 165
      EVSE/rootfs/var/www/css/color2.css
  66. 0 165
      EVSE/rootfs/var/www/css/color3.css
  67. 0 165
      EVSE/rootfs/var/www/css/color4.css
  68. 0 165
      EVSE/rootfs/var/www/css/color5.css
  69. 0 165
      EVSE/rootfs/var/www/css/color6.css
  70. 0 165
      EVSE/rootfs/var/www/css/color7.css
  71. 0 165
      EVSE/rootfs/var/www/css/color8.css
  72. 0 49
      EVSE/rootfs/var/www/css/colorbox-skins/2/colorbox.css
  73. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/2/images/controls.png
  74. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/2/images/loading.gif
  75. 0 44
      EVSE/rootfs/var/www/css/colorbox-skins/3/colorbox.css
  76. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/3/images/controls.png
  77. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/3/images/loading.gif
  78. 0 65
      EVSE/rootfs/var/www/css/colorbox-skins/4/colorbox.css
  79. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/4/images/border1.png
  80. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/4/images/border2.png
  81. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/4/images/loading.gif
  82. 0 57
      EVSE/rootfs/var/www/css/colorbox-skins/5/colorbox.css
  83. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/5/images/border.png
  84. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/5/images/controls.png
  85. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/5/images/loading.gif
  86. BIN
      EVSE/rootfs/var/www/css/colorbox-skins/5/images/loading_background.png
  87. 0 46
      EVSE/rootfs/var/www/css/font-awesome/Gemfile.lock
  88. 0 1
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/CNAME
  89. 0 36
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/Makefile
  90. 0 30
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/prettify.css
  91. 0 71
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/pygments.css
  92. 0 1153
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/site.css
  93. BIN
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome.zip
  94. 0 1203
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome-ie7.css
  95. 0 384
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome-ie7.min.css
  96. 0 1479
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome.css
  97. 0 403
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome.min.css
  98. BIN
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/FontAwesome.otf
  99. BIN
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/fontawesome-webfont.eot
  100. 0 195
      EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/fontawesome-webfont.svg

+ 3 - 3
EVSE/Modularization/Infypwr_PsuCommObj.c

@@ -99,21 +99,21 @@ int InitCanBus()
    	if (setsockopt(s0, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_RCVTIMEO NG");
+		printf("Set SO_RCVTIMEO NG");
 		#endif
 	}
 	nbytes=40960;
 	if (setsockopt(s0, SOL_SOCKET,  SO_RCVBUF, &nbytes, sizeof(int)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_RCVBUF NG");
+		printf("Set SO_RCVBUF NG");
 		#endif
 	}
 	nbytes=40960;
 	if (setsockopt(s0, SOL_SOCKET, SO_SNDBUF, &nbytes, sizeof(int)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_SNDBUF NG");
+		printf("Set SO_SNDBUF NG");
 		#endif
 	}
 

+ 16 - 0
EVSE/Modularization/Infypwr_PsuCommObj.h

@@ -22,7 +22,23 @@
 #include <sys/ipc.h>
 #include <sys/shm.h>
 #include <sys/time.h>
+
 #include 	<stdbool.h>
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+
 
 typedef unsigned char 		byte;
 typedef unsigned short 	word;

+ 2 - 3
EVSE/Modularization/Module_RFID.c

@@ -1,7 +1,7 @@
 /*
  * Module_RFID.c
  *
- *  Created on: 2019¦~10¤ë28¤é
+ *  Created on: 2019|~10?e28?e
  *      Author: Eason Yang
  *     Version: D0.01
  */
@@ -681,5 +681,4 @@ void sethaltCard(int Fd, int moduleType)
 
 			break;
 	}
-}
-
+}

+ 2 - 2
EVSE/Modularization/Module_RFID.h

@@ -1,7 +1,7 @@
 /*
  * Module_RFID.h
  *
- *  Created on: 2019¦~10¤ë24¤é
+ *  Created on: 2019|~10?e24?e
  *      Author: Eason Yang
  */
 #ifndef LIB_RFID_H_
@@ -73,4 +73,4 @@ bool setBlockWrite(int Fd, int moduleType,int block, unsigned char keyid, unsign
 void setBuzzer(int Fd, int moduleType, unsigned char time);
 void sethaltCard(int Fd, int moduleType);
 
-#endif
+#endif

BIN
EVSE/Modularization/Module_Wifi


+ 8 - 8
EVSE/Modularization/Phihong_PsuCommObj.c

@@ -138,21 +138,21 @@ int InitCanBus()
    	if (setsockopt(s0, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_RCVTIMEO NG");
+		printf("Set SO_RCVTIMEO NG");
 		#endif
 	}
 	nbytes=40960;
 	if (setsockopt(s0, SOL_SOCKET,  SO_RCVBUF, &nbytes, sizeof(int)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_RCVBUF NG");
+		printf("Set SO_RCVBUF NG");
 		#endif
 	}
 	nbytes=40960;
 	if (setsockopt(s0, SOL_SOCKET, SO_SNDBUF, &nbytes, sizeof(int)) < 0)
 	{
 		#ifdef SystemLogMessage
-		DEBUG_ERROR("Set SO_SNDBUF NG");
+		printf("Set SO_SNDBUF NG");
 		#endif
 	}
 
@@ -314,14 +314,13 @@ void ReceiveDataFromCanBus()
 					break;
 				case ALARM_NOTIFICATION:
 				{
-					frame.data[6] = '\0';
 					return_alarm_code(group, address, frame.data);
 				}
 					break;
 				case FAULT_NOTIFICATION:
 				{
-					frame.data[6] = '\0';
-					return_fault_code(group, address, frame.data);
+					return_fault_code(group, address,
+							((int) frame.data[3] << 24)	+ ((int) frame.data[2] << 16) + ((int) frame.data[1] << 8) + (int) frame.data[0]);
 				}
 					break;
 				case STATUS_NOTIFICATION:
@@ -493,7 +492,7 @@ void GetAvailableCap(byte group, byte address, short _outputVol)
 	SendCmdToPsu(cmd, data, sizeof(data));
 }
 
-void SetPresentOutput(byte group, byte address, short vol, short cur, unsigned short AvailableCur)
+void SetPresentOutput(byte group, byte address, short vol, short cur, unsigned short AvailableCur, byte derating)
 {
 	//printf("PSU_C_DLL : SetPresentOutput. group = %x, address = %x \n", group, address);
 	int cmd = PackageIdCmd(Psu_cmd._set_present_output + (group << 6) + address);
@@ -509,8 +508,9 @@ void SetPresentOutput(byte group, byte address, short vol, short cur, unsigned s
 	short percent = ((float) cur / AvailableCur) * 10000;
 	data[2] = percent & 0xff;
 	data[3] = (percent >> 8) & 0xff;
+	data[4] = derating;
 
-	//printf("vol = %d, tot_Amp = %d, need_cur = %d, percent = %d \n", vol, AvailableCur, cur, percent);
+	printf("vol = %d, tot_Amp = %d, need_cur = %d, percent = %d \n", vol, AvailableCur, cur, percent);
 	SendCmdToPsu(cmd, data, sizeof(data));
 }
 

+ 2 - 2
EVSE/Modularization/Phihong_PsuCommObj.h

@@ -110,7 +110,7 @@ void GetPresentOutput(byte group, byte address);
 void GetPresentInputCurrent(byte group, byte address);
 void GetAvailableCap(byte group, byte address, short _outputVol);
 
-void SetPresentOutput(byte group, byte address, short vol, short cur, unsigned short AvailableCur);
+void SetPresentOutput(byte group, byte address, short vol, short cur, unsigned short AvailableCur, byte derating);
 
 void EnableOutputPower(byte group, byte address, byte value);
 /* API Function end */
@@ -144,7 +144,7 @@ void RefreshAlarmNotify(void *func);
 void (*return_alarm_code)(byte group, byte address, unsigned char *alarm);
 
 void RefreshFaultNotify(void *func);
-void (*return_fault_code)(byte group, byte address, unsigned char *fault);
+void (*return_fault_code)(byte group, byte address, int fault);
 
 void RefreshStatusNotify(void *func);
 void (*return_status_code)(byte group, byte address, byte st_machine, unsigned short out_vol, unsigned short out_cur);

+ 199 - 194
EVSE/Modularization/WebService.c

@@ -288,13 +288,14 @@ int main(int argc, char *argv[]) {
 		if (strcmp(argv[1], "1") == 0) {
 			struct json_object *jobj = json_tokener_parse(argv[2]);
 			json_object *val_obj = NULL;
-			const char *SystemId=NULL;
-			const char *SystemDateTime = NULL;
-			const char *AcPhaseCount = NULL;
-			const char *FactoryConfiguration = NULL;
-			const char *AuthorisationMode = NULL;
-			const char *DefaultLanguage = NULL;
-			const char *RfidCardNumEndian = NULL;
+			char *SystemId=NULL;
+			char *SystemDateTime = NULL;
+			int AcPhaseCount = 0;
+			int FactoryConfiguration = 0;
+			int AuthorisationMode = 0;
+			int DefaultLanguage = 0;
+			int RfidCardNumEndian = 0;
+			int PsuAcInputType = 0;
 
 			if( json_object_object_get_ex(jobj, "SystemId", &val_obj) ) {
 				SystemId = json_object_get_string(val_obj);
@@ -303,26 +304,30 @@ int main(int argc, char *argv[]) {
 				SystemDateTime = json_object_get_string(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "AcPhaseCount", &val_obj) ) {
-				AcPhaseCount = json_object_get_string(val_obj);
+				AcPhaseCount = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "FactoryConfiguration", &val_obj) ) {
-				FactoryConfiguration = json_object_get_string(val_obj);
+				FactoryConfiguration = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "AuthorisationMode", &val_obj) ) {
-				AuthorisationMode = json_object_get_string(val_obj);
+				AuthorisationMode = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "DefaultLanguage", &val_obj) ) {
-				DefaultLanguage = json_object_get_string(val_obj);
+				DefaultLanguage = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "RfidCardNumEndian", &val_obj) ) {
-				RfidCardNumEndian = json_object_get_string(val_obj);
+				RfidCardNumEndian = json_object_get_int(val_obj);
+			}
+			if( json_object_object_get_ex(jobj, "PsuAcInputType", &val_obj) ) {
+				PsuAcInputType = json_object_get_int(val_obj);
 			}
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId,SystemId);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AcPhaseCount,AcPhaseCount);
-			strcpy((char *)&ShmSysConfigAndInfo->SysInfo.FactoryConfiguration,FactoryConfiguration);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AuthorisationMode,AuthorisationMode);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.DefaultLanguage,DefaultLanguage);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian,RfidCardNumEndian);
+			ShmSysConfigAndInfo->SysConfig.AcPhaseCount = AcPhaseCount;
+			ShmSysConfigAndInfo->SysInfo.FactoryConfiguration = FactoryConfiguration;
+			ShmSysConfigAndInfo->SysConfig.AuthorisationMode = AuthorisationMode;
+			ShmSysConfigAndInfo->SysConfig.DefaultLanguage = DefaultLanguage;
+			ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = RfidCardNumEndian;
+			ShmSysConfigAndInfo->SysConfig.PsuAcInputType = PsuAcInputType;
 
 			if(strlen(SystemDateTime)>0){
 				char cmd[100];
@@ -336,21 +341,21 @@ int main(int argc, char *argv[]) {
 		if (strcmp(argv[1], "2") == 0) {
 			struct json_object *jobj = json_tokener_parse(argv[2]);
 			json_object *val_obj = NULL;
-			const int *MaxChargingEnergy= 0;
-			const int *MaxChargingPower = 0;
-			const int *MaxChargingCurrent = 0;
-			const int *MaxChargingDuration = 0;
-			const char *PhaseLossPolicy = NULL;
-			const char *LocalWhiteCard0 = NULL;
-			const char *LocalWhiteCard1 = NULL;
-			const char *LocalWhiteCard2 = NULL;
-			const char *LocalWhiteCard3 = NULL;
-			const char *LocalWhiteCard4 = NULL;
-			const char *LocalWhiteCard5 = NULL;
-			const char *LocalWhiteCard6 = NULL;
-			const char *LocalWhiteCard7 = NULL;
-			const char *LocalWhiteCard8 = NULL;
-			const char *LocalWhiteCard9 = NULL;
+			int MaxChargingEnergy= 0;
+			int MaxChargingPower = 0;
+			int MaxChargingCurrent = 0;
+			int MaxChargingDuration = 0;
+			int PhaseLossPolicy = 0;
+			char *LocalWhiteCard0 = NULL;
+			char *LocalWhiteCard1 = NULL;
+			char *LocalWhiteCard2 = NULL;
+			char *LocalWhiteCard3 = NULL;
+			char *LocalWhiteCard4 = NULL;
+			char *LocalWhiteCard5 = NULL;
+			char *LocalWhiteCard6 = NULL;
+			char *LocalWhiteCard7 = NULL;
+			char *LocalWhiteCard8 = NULL;
+			char *LocalWhiteCard9 = NULL;
 
 			if( json_object_object_get_ex(jobj, "MaxChargingEnergy", &val_obj) ) {
 				MaxChargingEnergy = json_object_get_int(val_obj);
@@ -365,7 +370,7 @@ int main(int argc, char *argv[]) {
 				MaxChargingDuration = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "PhaseLossPolicy", &val_obj) ) {
-				PhaseLossPolicy = json_object_get_string(val_obj);
+				PhaseLossPolicy = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "LocalWhiteCard0", &val_obj) ) {
 				LocalWhiteCard0 = json_object_get_string(val_obj);
@@ -401,7 +406,7 @@ int main(int argc, char *argv[]) {
 			ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower;
 			ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent;
 			ShmSysConfigAndInfo->SysConfig.MaxChargingDuration = MaxChargingDuration;
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy,PhaseLossPolicy);
+			ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy = PhaseLossPolicy;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0],LocalWhiteCard0);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[1],LocalWhiteCard1);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[2],LocalWhiteCard2);
@@ -416,32 +421,32 @@ int main(int argc, char *argv[]) {
 		if (strcmp(argv[1], "3") == 0) {
 			struct json_object *jobj = json_tokener_parse(argv[2]);
 			json_object *val_obj = NULL;
-			const char *FtpServer=NULL;
-			const char *Eth0DhcpClient=NULL;
-			const char *Eth0IpAddress=NULL;
-			const char *Eth0SubmaskAddress=NULL;
-			const char *Eth0GatewayAddress=NULL;
-			const char *Eth1DhcpClient=NULL;
-			const char *Eth1IpAddress=NULL;
-			const char *Eth1SubmaskAddress=NULL;
-			const char *Eth1GatewayAddress=NULL;
-			const char *WifiMode=NULL;
-			const char *WifiSsid=NULL;
-			const char *WifiPassword=NULL;
-			const char *WifiDhcpServer=NULL;
-			const char *WifiDhcpClient=NULL;
-			const char *WifiIpAddress=NULL;
-			const char *WifiSubmaskAddress=NULL;
-			const char *WifiGatewayAddress=NULL;
-			const char *TelcomApn=NULL;
-			const char *TelcomChapPapId=NULL;
-			const char *TelcomChapPapPwd=NULL;
-			const char *TelcomIpAddress=NULL;
+			char *FtpServer=NULL;
+			int Eth0DhcpClient=0;
+			char *Eth0IpAddress=NULL;
+			char *Eth0SubmaskAddress=NULL;
+			char *Eth0GatewayAddress=NULL;
+			int Eth1DhcpClient=0;
+			char *Eth1IpAddress=NULL;
+			char *Eth1SubmaskAddress=NULL;
+			char *Eth1GatewayAddress=NULL;
+			int WifiMode=0;
+			char *WifiSsid=NULL;
+			char *WifiPassword=NULL;
+			int WifiDhcpServer=0;
+			int WifiDhcpClient=0;
+			char *WifiIpAddress=NULL;
+			char *WifiSubmaskAddress=NULL;
+			char *WifiGatewayAddress=NULL;
+			char *TelcomApn=NULL;
+			char *TelcomChapPapId=NULL;
+			char *TelcomChapPapPwd=NULL;
+			char *TelcomIpAddress=NULL;
 			if( json_object_object_get_ex(jobj, "FtpServer", &val_obj) ) {
 				FtpServer = json_object_get_string(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "Eth0DhcpClient", &val_obj) ) {
-				Eth0DhcpClient = json_object_get_string(val_obj);
+				Eth0DhcpClient = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "Eth0IpAddress", &val_obj) ) {
 				Eth0IpAddress = json_object_get_string(val_obj);
@@ -453,7 +458,7 @@ int main(int argc, char *argv[]) {
 				Eth0GatewayAddress = json_object_get_string(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "Eth1DhcpClient", &val_obj) ) {
-				Eth1DhcpClient = json_object_get_string(val_obj);
+				Eth1DhcpClient = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "Eth1IpAddress", &val_obj) ) {
 				Eth1IpAddress = json_object_get_string(val_obj);
@@ -465,7 +470,7 @@ int main(int argc, char *argv[]) {
 				Eth1GatewayAddress = json_object_get_string(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "WifiMode", &val_obj) ) {
-				WifiMode = json_object_get_string(val_obj);
+				WifiMode = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "WifiSsid", &val_obj) ) {
 				WifiSsid = json_object_get_string(val_obj);
@@ -474,10 +479,10 @@ int main(int argc, char *argv[]) {
 				WifiPassword = json_object_get_string(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "WifiDhcpServer", &val_obj) ) {
-				WifiDhcpServer = json_object_get_string(val_obj);
+				WifiDhcpServer = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "WifiDhcpClient", &val_obj) ) {
-				WifiDhcpClient = json_object_get_string(val_obj);
+				WifiDhcpClient = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "WifiIpAddress", &val_obj) ) {
 				WifiIpAddress = json_object_get_string(val_obj);
@@ -502,19 +507,19 @@ int main(int argc, char *argv[]) {
 			}
 
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer,FtpServer);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient,Eth0DhcpClient);
+			ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient=Eth0DhcpClient;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,Eth0IpAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress,Eth0SubmaskAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress,Eth0GatewayAddress);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient,Eth1DhcpClient);
+			ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient=Eth1DhcpClient;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthIpAddress,Eth1IpAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthSubmaskAddress,Eth1SubmaskAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthGatewayAddress,Eth1GatewayAddress);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode,WifiMode);
+			ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode=WifiMode;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid,WifiSsid);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword,WifiPassword);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer,WifiDhcpServer);
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient,WifiDhcpClient);
+			ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer=WifiDhcpServer;
+			ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient=WifiDhcpClient;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress,WifiIpAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress,WifiSubmaskAddress);
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress,WifiGatewayAddress);
@@ -526,26 +531,23 @@ int main(int argc, char *argv[]) {
 		if (strcmp(argv[1], "4") == 0) {
 			struct json_object *jobj = json_tokener_parse(argv[2]);
 			json_object *val_obj = NULL;
-			const int *BackendConnTimeout=0;
-			const char *OfflinePolicy=NULL;
-			const int *OfflineMaxChargeEnergy=0;
-			const int *OfflineMaxChargeDuration=0;
-			const char *OcppServerURL=NULL;
-			const char *ChargeBoxId=NULL;
+			int BackendConnTimeout=0;
+			int OfflinePolicy=0;
+			int OfflineMaxChargeEnergy=0;
+			int OfflineMaxChargeDuration=0;
+			char *OcppServerURL=NULL;
+			char *ChargeBoxId=NULL;
 
 			if( json_object_object_get_ex(jobj, "BackendConnTimeout", &val_obj) ) {
-				//BackendConnTimeout = json_object_get_string(val_obj);
 				BackendConnTimeout = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "OfflinePolicy", &val_obj) ) {
-				OfflinePolicy = json_object_get_string(val_obj);
+				OfflinePolicy = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "OfflineMaxChargeEnergy", &val_obj) ) {
-				//OfflineMaxChargeEnergy = json_object_get_string(val_obj);
 				OfflineMaxChargeEnergy = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "OfflineMaxChargeDuration", &val_obj) ) {
-				//OfflineMaxChargeDuration = json_object_get_string(val_obj);
 				OfflineMaxChargeDuration = json_object_get_int(val_obj);
 			}
 			if( json_object_object_get_ex(jobj, "OcppServerURL", &val_obj) ) {
@@ -556,7 +558,7 @@ int main(int argc, char *argv[]) {
 			}
 
 			ShmSysConfigAndInfo->SysConfig.BackendConnTimeout = BackendConnTimeout;
-			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OfflinePolicy,OfflinePolicy);
+			ShmSysConfigAndInfo->SysConfig.OfflinePolicy = OfflinePolicy;
 			ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = OfflineMaxChargeEnergy;
 			ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration = OfflineMaxChargeDuration;
 			strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,OcppServerURL);
@@ -573,7 +575,7 @@ int main(int argc, char *argv[]) {
 		if (strcmp(argv[1], "aaa") == 0) {
 			struct SysConfigData 	SysConfig;
 		//system
-		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DWLU700111W1PH");
+		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DSLU122110T1P0");
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber, "SerialNumber");
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId, "1234567890");
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemDateTime, "2019-12-31 23:59:59");
@@ -587,6 +589,7 @@ int main(int argc, char *argv[]) {
 		ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed=0;
 		ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed=0;
 		ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian=0;
+		ShmSysConfigAndInfo->SysConfig.PsuAcInputType=0;
 		ShmSysConfigAndInfo->SysInfo.AuxPower5V=0;
 		ShmSysConfigAndInfo->SysInfo.AuxPower12V=0;
 		ShmSysConfigAndInfo->SysInfo.AuxPower24V=0;
@@ -617,9 +620,6 @@ int main(int argc, char *argv[]) {
 		ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime=0;
 		ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes=0;
 		ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes=0;
-		//Set default configuration
-		strcpy(SysConfig.SystemId, "0987654321");
-		strcpy(SysConfig.SystemDateTime, "2019-08-12 00:00:00");
 		//charging
 		ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy=0;
 		ShmSysConfigAndInfo->SysConfig.MaxChargingPower=0;
@@ -680,6 +680,7 @@ int main(int argc, char *argv[]) {
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd,"");
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemImei,"");
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimImsi,"");
+		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid,"");
 		ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus=0;
 		ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode=0;
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress,"");
@@ -693,7 +694,7 @@ int main(int argc, char *argv[]) {
 		strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,"");
 
 		ShmSysConfigAndInfo->SysInfo.FirmwareUpdate=0;
-		StoreUsrConfigData(&SysConfig);
+		StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
 
 		#ifdef SystemLogMessage
 		DEBUG_INFO("WebService initial OK");
@@ -776,6 +777,7 @@ int main(int argc, char *argv[]) {
 		struct json_object *SystemFanRotaSpeed;
 		struct json_object *PsuFanRotaSpeed;
 		struct json_object *RfidCardNumEndian;
+		struct json_object *PsuAcInputType;
 		struct json_object *AuxPower5V;
 		struct json_object *AuxPower12V;
 		struct json_object *AuxPower24V;
@@ -871,7 +873,7 @@ int main(int argc, char *argv[]) {
 		struct json_object *TelcomChapPapPwd;
 		struct json_object *TelcomModemImei;
 		struct json_object *TelcomSimImsi;
-//		struct json_object *TelcomSimIccid;
+		struct json_object *TelcomSimIccid;
 		struct json_object *TelcomSimStatus;
 		struct json_object *TelcomModemMode;
 		struct json_object *TelcomIpAddress;
@@ -897,20 +899,21 @@ int main(int argc, char *argv[]) {
 		SerialNumber = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber);
 		SystemId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.SystemId);
 //		SystemDateTime = json_object_new_string(ShmSysConfigAndInfo->SysConfig.SystemDateTime);
-		AcPhaseCount = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AcPhaseCount,1);
-		FactoryConfiguration = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.FactoryConfiguration,1);
-		AuthorisationMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AuthorisationMode,1);
-		DefaultLanguage = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.DefaultLanguage,1);
+		AcPhaseCount = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcPhaseCount);
+		FactoryConfiguration = json_object_new_int(ShmSysConfigAndInfo->SysInfo.FactoryConfiguration);
+		AuthorisationMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
+		DefaultLanguage = json_object_new_int(ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
 		InputVoltageR = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageR);
 		InputVoltageS = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageS);
 		InputVoltageT = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageT);
-		SystemFanRotaSpeed = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed);
-		PsuFanRotaSpeed = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed);
-		RfidCardNumEndian = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian,1);
-		AuxPower5V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower5V,1);
-		AuxPower12V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower12V,1);
-		AuxPower24V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower24V,1);
-		AuxPower48V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower48V,1);
+		SystemFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed);
+		PsuFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed);
+		RfidCardNumEndian = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
+		PsuAcInputType = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PsuAcInputType);
+		AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V);
+		AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V);
+		AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V);
+		AuxPower48V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower48V);
 		CsuHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuHwRev);
 		CsuBootLoadFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuBootLoadFwRev);
 		CsuKernelFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuKernelFwRev);
@@ -928,15 +931,15 @@ int main(int argc, char *argv[]) {
 		RelayModuleHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleHwRev);
 		RelayModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev);
 		TelcomModemFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.TelcomModemFwRev);
-		SystemAmbientTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
-		SystemCriticalTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
-		CcsConnectorTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
-		PsuAmbientTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.PsuAmbientTemp);
-		AcPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.AcPlugInTimes);
-		GbPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.GbPlugInTimes);
-		Ccs1PlugInTime = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime);
-		Ccs2PlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes);
-		ChademoPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes);
+		SystemAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
+		SystemCriticalTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
+		CcsConnectorTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
+		PsuAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.PsuAmbientTemp);
+		AcPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcPlugInTimes);
+		GbPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.GbPlugInTimes);
+		Ccs1PlugInTime = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime);
+		Ccs2PlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes);
+		ChademoPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes);
 		FirmwareUpdate = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.FirmwareUpdate);
 		//charging
 		int CcsGunQty=0;
@@ -946,11 +949,11 @@ int main(int argc, char *argv[]) {
 		ChargingInfo1=json_object_new_object();
 		ChargingInfo2=json_object_new_object();
 		ChargingInfo3=json_object_new_object();
-		MaxChargingEnergy = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
-		MaxChargingPower = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
-		MaxChargingCurrent = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
-		MaxChargingDuration = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
-		PhaseLossPolicy = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy,1);
+		MaxChargingEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
+		MaxChargingPower = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
+		MaxChargingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
+		MaxChargingDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
+		PhaseLossPolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy);
 		LocalWhiteCard[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0]);
 		LocalWhiteCard[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[1]);
 		LocalWhiteCard[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[2]);
@@ -973,17 +976,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
-				SystemStatus[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
-				Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
-				Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
-				type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
+				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
+				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
+				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
+				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
 				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
-				StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
-				ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
+				StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
+				ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
 				CcsGunQty++;
 			}
 			else if(connectorType1 == 2){//GB
@@ -996,17 +999,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
-				SystemStatus[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
-				Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
-				Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
-				type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
+				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
+				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
+				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
+				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
 				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
-				StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
-				ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
+				StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
+				ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
 				GbGunQty++;
 			}
 			else if(connectorType1 == 3){//CHAdeMO
@@ -1019,17 +1022,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
-				SystemStatus[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
-				Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
-				Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
-				type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
+				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
+				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
+				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
+				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
 				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
-				StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
-				ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
+				StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
+				ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType1 == 4){//AC
@@ -1042,17 +1045,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
-				SystemStatus[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
-				Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
-				Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
-				type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
+				SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
+				Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
+				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
+				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
 				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
-				StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
-				ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
+				StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
+				ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
 				AcGunQty++;
 			}
 		}
@@ -1067,17 +1070,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
-				SystemStatus[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
-				Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
-				Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
-				type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
+				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
+				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
+				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
+				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
 				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
-				StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
-				ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
+				StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
+				ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
 				CcsGunQty++;
 			}
 			else if(connectorType2 == 2){//GB
@@ -1090,17 +1093,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
-				SystemStatus[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
-				Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
-				Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
-				type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
+				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
+				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
+				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
+				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
 				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
-				StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
-				ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
+				StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
+				ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
 				GbGunQty++;
 			}
 			else if(connectorType2 == 3){//CHAdeMO
@@ -1113,17 +1116,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
-				SystemStatus[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
-				Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
-				Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
-				type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
+				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
+				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
+				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
+				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
 				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
-				StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
-				ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
+				StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
+				ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType2 == 4){//AC
@@ -1136,17 +1139,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
-				SystemStatus[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
-				Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
-				Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
-				type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
+				SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
+				Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
+				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
+				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
 				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
-				StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
-				ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
+				StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
+				ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
 				AcGunQty++;
 			}
 		}
@@ -1161,17 +1164,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
-				SystemStatus[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
-				Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
-				Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
-				type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
+				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
+				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
+				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
+				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
 				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
-				StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
-				ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
+				StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
+				ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
 				CcsGunQty++;
 			}
 			else if(connectorType3 == 2){//GB
@@ -1184,17 +1187,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
-				SystemStatus[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
-				Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
-				Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
-				type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
+				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
+				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
+				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
+				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
 				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
-				StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
-				ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
+				StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
+				ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
 				GbGunQty++;
 			}
 			else if(connectorType3 == 3){//CHAdeMO
@@ -1207,17 +1210,17 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
-				SystemStatus[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
-				Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
-				Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
-				type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
+				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
+				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
+				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
+				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
 				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
-				StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
-				ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
+				StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
+				ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
 				CHAdeMOGunQty++;
 			}
 			else if(connectorType3 == 4){//AC
@@ -1230,61 +1233,61 @@ int main(int argc, char *argv[]) {
 				EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
 				EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
 				EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
-				SystemStatus[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
-				Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
-				Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
-				type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
+				SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
+				Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
+				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
+				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
 				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
-				StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
-				ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
+				StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
+				ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
 				AcGunQty++;
 			}
 		}
 
 		//network
-		InternetConn = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.InternetConn,1);
+		InternetConn = json_object_new_int(ShmSysConfigAndInfo->SysInfo.InternetConn);
 		FtpServer = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer);
-		Eth0DhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient,1);
+		Eth0DhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
 		Eth0MacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthMacAddress);
 		Eth0IpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress);
 		Eth0SubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
 		Eth0GatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
-		Eth1DhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient,1);
+		Eth1DhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
 		Eth1MacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthMacAddress);
 		Eth1IpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthIpAddress);
 		Eth1SubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthSubmaskAddress);
 		Eth1GatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthGatewayAddress);
-		WifiMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode,1);
+		WifiMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode);
 		WifiSsid = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid);
 		WifiPassword = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword);
-		WifiRssi = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiRssi);
-		WifiDhcpServer = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer,1);
-		WifiDhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient,1);
+		WifiRssi = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiRssi);
+		WifiDhcpServer = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer);
+		WifiDhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient);
 		WifiMacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMacAddress);
 		WifiIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress);
 		WifiSubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress);
 		WifiGatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress);
 		WifiNetworkConn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiNetworkConn);
 		TelcomApn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn);
-		TelcomRssi = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomRssi);
+		TelcomRssi = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomRssi);
 		TelcomChapPapId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId);
 		TelcomChapPapPwd = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd);
 		TelcomModemImei = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemImei);
 		TelcomSimImsi = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimImsi);
-		//TelcomSimIccid = json_object_new_string(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
-		TelcomSimStatus = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus,1);
-		TelcomModemMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode,1);
+		TelcomSimIccid = json_object_new_string(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
+		TelcomSimStatus = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus);
+		TelcomModemMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode);
 		TelcomIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress);
 		TelcomNetworkConn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomNetworkConn);
 		//backend
-		BackendConnTimeout = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
-		OfflinePolicy = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.OfflinePolicy,1);
-		OfflineMaxChargeEnergy = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
-		OfflineMaxChargeDuration = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
+		BackendConnTimeout = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
+		OfflinePolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
+		OfflineMaxChargeEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
+		OfflineMaxChargeDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
 		OcppConnStatus = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.OcppConnStatus,1);
 		OcppServerURL = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL);
 		ChargeBoxId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId);
@@ -1305,6 +1308,7 @@ int main(int argc, char *argv[]) {
 		json_object_object_add(jobj1,"SystemFanRotaSpeed",SystemFanRotaSpeed);
 		json_object_object_add(jobj1,"PsuFanRotaSpeed",PsuFanRotaSpeed);
 		json_object_object_add(jobj1,"RfidCardNumEndian",RfidCardNumEndian);
+		json_object_object_add(jobj1,"PsuAcInputType",PsuAcInputType);
 		json_object_object_add(jobj1,"AuxPower5V",AuxPower5V);
 		json_object_object_add(jobj1,"AuxPower12V",AuxPower12V);
 		json_object_object_add(jobj1,"AuxPower24V",AuxPower24V);
@@ -1459,6 +1463,7 @@ int main(int argc, char *argv[]) {
 		json_object_object_add(jobj3,"TelcomChapPapPwd",TelcomChapPapPwd);
 		json_object_object_add(jobj3,"TelcomModemImei",TelcomModemImei);
 		json_object_object_add(jobj3,"TelcomSimImsi",TelcomSimImsi);
+		json_object_object_add(jobj3,"TelcomSimIccid",TelcomSimIccid);
 		json_object_object_add(jobj3,"TelcomSimStatus",TelcomSimStatus);
 		json_object_object_add(jobj3,"TelcomModemMode",TelcomModemMode);
 		json_object_object_add(jobj3,"TelcomIpAddress",TelcomIpAddress);

BIN
EVSE/Modularization/libInfypwr_PsuCommObj.a


BIN
EVSE/Modularization/libModule_RFID.a


+ 137 - 0
EVSE/Projects/DS60-120/Apps/Config.h

@@ -0,0 +1,137 @@
+/*
+ * Config.h
+ *
+ *  Created on: 2019年4月23日
+ *      Author: foluswen
+ */
+
+#ifndef CONFIG_H_
+#define CONFIG_H_
+
+typedef unsigned char			byte;
+
+#define TOTAL_QUANTITY_GUN			4				//Max Count
+#define MODE_BOOT					0
+#define MODE_IDLE					1
+#define MODE_AUTHORIZING			2
+#define MODE_REASSIGN_CHECK			3
+#define MODE_REASSIGN				4
+#define MODE_PRECHARGE				5
+#define MODE_PREPARE_FOR_EV			6
+#define MODE_PREPARE_FOR_EVSE		7
+#define MODE_CHARGING				8
+#define MODE_TERMINATING			9
+#define MODE_COMPLETE				10
+#define MODE_ALARM					11
+#define MODE_RESERVATION			12
+#define MODE_BOOKING				13
+#define MODE_MAINTAIN				14
+#define MODE_DEBUG					15
+#define MODE_CCS_PRECHARGE_STEP0	16 	// ready for ccs precharge processing, For D+ relay to precharge relay
+#define MODE_CCS_PRECHARGE_STEP1	17	// waitting for ev board inform to enter to charging, For precharge relay to D+ relay
+#define MODE_SINGLE_RUN				18
+
+#define GFD_WAIT			0
+#define GFD_PASS			1
+#define GFD_FAIL			2
+#define GFD_WARNING			3
+
+#define PRECHARGE_WAIT				0
+#define PRECHARGE_READY				1
+#define PRECHARGE_PRERELAY_PASS		2
+#define PRECHARGE_CHARELAY_PASS		3
+
+#define BOOTTING			0
+#define BOOT_COMPLETE		1
+
+enum _SYSTEM_STATUS
+{
+	S_BOOTING = 						0,
+    S_IDLE,
+	S_AUTHORIZING,
+	S_REASSIGN_CHECK,
+	S_REASSIGN,
+	S_PREPARNING,
+	S_PREPARING_FOR_EV,
+	S_PREPARING_FOR_EVSE,
+    S_CHARGING,
+	S_TERMINATING,
+	S_COMPLETE,
+	S_ALARM,
+	S_RESERVATION,
+	S_BOOKING,
+	S_MAINTAIN,
+	S_DEBUG,
+	S_CCS_PRECHARGE_ST0,
+	S_CCS_PRECHARGE_ST1,
+	S_SINGLE_RUN,
+	S_SP_MODE,
+	S_NONE,
+};
+
+enum _GUN_TYPE
+{
+	_Type_Chademo = 		0,
+	_Type_CCS,
+	_Type_GB,
+};
+
+enum _LCM_INDEX
+{
+	_LCM_INIT = 			0x00,
+	_LCM_IDLE = 			0x01,
+	_LCM_AUTHORIZING = 		0x04,
+	_LCM_AUTHORIZ_COMP = 	0x05,
+	_LCM_AUTHORIZ_FAIL = 	0x06,
+	_LCM_WAIT_FOR_PLUG = 	0x07,
+	_LCM_PRE_CHARGE = 		0x08,
+	_LCM_CHARGING = 		0x09,
+	_LCM_COMPLETE = 		0x0A,
+	_LCM_FIX = 				0x0B,
+	_LCM_NONE = 			0xFF,
+};
+
+enum _SELF_TEST_SEQ
+{
+	_STEST_VERSION = 0x00,
+	_STEST_AC_CONTACTOR = 0x01,
+	_STEST_PSU_DETECT = 0x02,
+	_STEST_PSU_CAP = 0x03,
+	_STEST_FAIL = 0x04,
+	_STEST_COMPLETE = 0xFE,
+};
+
+enum _MODULE_PSU_WORK_STEP
+{
+	ASSIGN_START 	= 			0,
+	ASSIGN_COMP 	= 			1,
+	ENABLE_POW		=			2,
+	_TEST_LINE_STEP 	= 		3,
+	_TEST_POWER_STEP 	= 		4,
+	_TEST_COMPLETE 		= 		5,
+
+	_WORK_CHARGING 	= 			10,
+
+	_NO_WORKING			= 		254,
+};
+
+enum _OFFLINE_POLICY
+{
+	_OFFLINE_POLICY_LOCAL_LIST = 0x00,
+	_OFFLINE_POLICY_PHIHONG_RFID_TAG = 0x01,
+	_OFFLINE_POLICY_FREE_CHARGING = 0x02,
+	_OFFLINE_POLICY_NO_CHARGING = 0x03,
+};
+
+enum _REASSIGNED_RESOURCE_STEP
+{
+	_REASSIGNED_NONE = 			0,	//
+	_REASSIGNED_PREPARE = 		1,	// 系統收到需要降載需求 (輸出總電流降低),PSU Task 收到將狀態切換至下個狀態
+	_REASSIGNED_GET_NEW_CAP = 	2,	// 充電中的重新取得屬於自己火線上的總能量並透過小板通知車端 - 超過10秒直接跳下一步
+	_REASSIGNED_MAIN = 			3,  // 重新分配 PSU
+	_REASSIGNED_ADJUST = 		4,	// 模塊重新分配完成
+	_REASSIGNED_RELAY = 		5,	// 切斷橋接的 Relay
+	_REASSIGNED_COMP = 			6,	// 完成
+};
+
+#endif /* CONFIG_H_ */

+ 175 - 0
EVSE/Projects/DS60-120/Apps/Ev_Comm.c

@@ -0,0 +1,175 @@
+#include "Module_EvComm.h"
+#include 	<linux/can.h>
+#include 	<linux/can/raw.h>
+#include 	<string.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+
+//================================================
+//================================================
+// CANBUS send cmd
+//================================================
+//================================================
+
+int PackageIdCmd(int cmd)
+{
+	return cmd | 0x80000000;
+}
+
+void SendCmdToEvboard(int cmd, byte *data, byte dataLen)
+{
+    struct can_frame frame;
+
+    frame.can_id = cmd;
+    frame.can_dlc = dataLen;
+    memcpy(frame.data, data, sizeof(frame.data));
+
+    write(CanFd, &frame, sizeof(struct can_frame));
+}
+
+void SetTargetAddr(byte *target_number, byte index)
+{
+	int id = PackageIdCmd(Ev_Cmd.address_assignment + index);
+	//printf("intCmd = %x \n", cmd & CAN_EFF_MASK);
+	//cmd = cmd & CAN_EFF_MASK;
+
+	byte data[8];
+
+	data[0] = *target_number;
+	data[1] = *(target_number + 1);
+	data[2] = *(target_number + 2);
+	data[3] = *(target_number + 3);
+	data[4] = index;
+
+	SendCmdToEvboard(id, data, 5);
+}
+
+void GetFirmwareVersion(byte gun_index, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.get_firmware_ver + toId);
+	byte data[8];
+
+	SendCmdToEvboard(id, data, 0);
+}
+
+void GetHardwareVersion(byte gun_index, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.get_hardware_ver + toId);
+	byte data[8];
+
+	SendCmdToEvboard(id, data, 0);
+}
+
+void SetChargingPermission(byte gun_index, byte permissionStatus, short aOutputPw, short aOutputCur, short aOutputVol, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.charging_permission + toId);
+	byte data[8];
+
+	data[0] = permissionStatus;
+	data[1] = aOutputPw & 0xff;
+	data[2] = (aOutputPw >> 8) & 0xff;
+	data[3] = aOutputCur & 0xff;
+	data[4] = (aOutputCur >> 8) & 0xff;
+	data[5] = aOutputVol & 0xff;
+	data[6] = (aOutputVol >> 8) & 0xff;
+	data[7] = 0xff;
+
+	SendCmdToEvboard(id, data, sizeof(data));
+}
+
+void SetPresentOutputPower(short outputVol_b1, short outputCur_b1, short outputVol_b2, short outputCur_b2)
+{
+	int id = PackageIdCmd(Ev_Cmd.present_output_power);
+	byte data[8];
+
+	data[0] = outputVol_b1 & 0xff;
+	data[1] = (outputVol_b1 >> 8) & 0xff;
+	data[2] = outputCur_b1 & 0xff;
+	data[3] = (outputCur_b1 >> 8) & 0xff;
+	data[4] = outputVol_b2 & 0xff;
+	data[5] = (outputVol_b2 >> 8) & 0xff;
+	data[6] = outputCur_b2 & 0xff;
+	data[7] = (outputCur_b2 >> 8) & 0xff;
+
+	SendCmdToEvboard(id, data, 8);
+}
+
+void SetPresentOutputCapacity(short aOutputPw_b1, short aOutputCur_b1, short aOutputPw_b2, short aOutputCur_b2)
+{
+	int id = PackageIdCmd(Ev_Cmd.present_output_cap);
+	byte data[8];
+
+	data[0] = aOutputPw_b1 & 0xff;
+	data[1] = (aOutputPw_b1 >> 8) & 0xff;
+	data[2] = aOutputCur_b1 & 0xff;
+	data[3] = (aOutputCur_b1 >> 8) & 0xff;
+	data[4] = aOutputPw_b2 & 0xff;
+	data[5] = (aOutputPw_b2 >> 8) & 0xff;
+	data[6] = aOutputCur_b2 & 0xff;
+	data[7] = (aOutputCur_b2 >> 8) & 0xff;
+
+	SendCmdToEvboard(id, data, 8);
+}
+
+void GetOutputReq(byte gun_index, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.get_output_req + toId);
+	byte data[8];
+
+	SendCmdToEvboard(id, data, 0);
+}
+
+void GetEvBatteryInfo(byte gun_index, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.get_battery_info + toId);
+	byte data[8];
+
+	SendCmdToEvboard(id, data, 0);
+}
+
+void EvseStopChargingEvent(byte stopResult, byte *stopReason, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.evse_stop_charging + toId);
+	byte data[8];
+
+	data[0] = stopResult;
+	data[1] = *stopReason;
+	data[2] = *(stopReason + 1);
+	data[3] = *(stopReason + 2);
+	data[4] = *(stopReason + 3);
+	data[5] = *(stopReason + 4);
+	data[6] = *(stopReason + 5);
+
+	SendCmdToEvboard(id, data, 7);
+}
+
+void GetMiscellaneousInfo(byte gun_index, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.get_miscellaneous_info + toId);
+	byte data[8];
+
+	SendCmdToEvboard(id, data, 0);
+}
+
+void SetIsolationStatus(byte gun_index, byte result, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.isolation_status + toId);
+	byte data[8];
+
+	data[0] = result;
+	SendCmdToEvboard(id, data, 1);
+}
+
+void SetEvsePrechargeInfo(byte gun_index, byte result, byte toId)
+{
+	int id = PackageIdCmd(Ev_Cmd.evse_precharge_info + toId);
+	byte data[8];
+
+	data[0] = result;
+	SendCmdToEvboard(id, data, 1);
+}
+

BIN
EVSE/Projects/DS60-120/Apps/Ev_Comm.o


+ 82 - 0
EVSE/Projects/DS60-120/Apps/Makefile

@@ -0,0 +1,82 @@
+-include ../../../../Rules.make
+export PATH=/bin:/sbin:/usr/bin:$(SDK_PATH_TARGET)/usr/bin:$PATH
+
+#define library variable
+Internal485ProtocolLib = -L ../../../Modularization/Internal485Protocol -lInternal485Protocol
+#PsuCommProtocolLib = -L ../../../Modularization/PsuCommProtocol -lPsuCommProtocol
+
+all: CopyFile apps
+#apps: Module_CSU Module_EvComm Module_EventLogging Module_InternalComm Module_LcmControl Module_PrimaryComm Module_PsuComm 
+# ReadCmdline kill.sh
+apps: MainTask EvCommTask EventLoggingTask InternalCommTask LcmControlTask PrimaryCommTask PsuCommTask ReadCmdlineTask WebService 4GTask OtherTools
+
+MainTask:
+	rm -f *.o
+	rm -f main;
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o timeout.o timeout.c
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o main.o main.c
+	$(CC) -o main main.o timeout.o ../../../Modularization/libModule_RFID.a ../../../Modularization/libModule_Upgrade.a	
+	cp -f main ../Images/root
+
+EvCommTask:
+	rm -f Module_EvComm;
+	$(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Ev_Comm.o Ev_Comm.c
+	$(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EvComm.o Module_EvComm.c
+	$(CC) -o Module_EvComm Ev_Comm.o Module_EvComm.o
+	cp -f Module_EvComm ../Images/root	
+	
+EventLoggingTask:
+	rm -f Module_EventLogging;
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EventLogging.o Module_EventLogging.c
+	$(CC) -o Module_EventLogging Module_EventLogging.o 	
+	cp -f Module_EventLogging ../Images/root	
+	
+InternalCommTask:
+	rm -f Module_InternalComm; 
+	$(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o internalComm.o internalComm.c
+	$(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_InternalComm.o Module_InternalComm.c
+	$(CC) -o Module_InternalComm Module_InternalComm.o internalComm.o 	
+	cp -f Module_InternalComm ../Images/root
+	
+LcmControlTask:
+	rm -f Module_LcmControl; 
+	$(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_LcmControl.o Module_LcmControl.c
+	$(CC) -o Module_LcmControl Module_LcmControl.o
+	cp -f Module_LcmControl ../Images/root			
+
+PrimaryCommTask:
+	rm -f Module_PrimaryComm; 
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PrimaryComm.o Module_PrimaryComm.c
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o PrimaryComm.o PrimaryComm.c
+	$(CC) -o Module_PrimaryComm Module_PrimaryComm.o PrimaryComm.o
+	cp -f Module_PrimaryComm ../Images/root	
+
+PsuCommTask:
+	rm -f Module_PsuComm; 
+	$(CC) -include../../../Modularization/Phihong_PsuCommObj.h -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PsuComm.o Module_PsuComm.c
+	$(CC) -o Module_PsuComm Module_PsuComm.o ../../../Modularization/libPhihong_PsuCommObj.a
+	cp -f Module_PsuComm ../Images/root	
+	
+ReadCmdlineTask:
+	rm -f ReadCmdline; 
+	$(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o ReadCmdline.o ReadCmdline.c
+	$(CC) -o ReadCmdline ReadCmdline.o
+	cp -f ReadCmdline ../Images/root
+
+WebService:
+	cp -f ../../../Modularization/WebService ../Images/root
+
+4GTask:
+	cp -f ../../../Modularization/Module_4g ../Images/root
+
+OtherTools:
+	cp -f init.sh ../Images/root
+	cp -f kill.sh ../Images/root
+
+CopyFile: 
+	rm -rfv ../Images/root
+	mkdir -p ../Images/root
+
+
+
+	

BIN
EVSE/Projects/DS60-120/Apps/Module_EvComm


+ 1093 - 0
EVSE/Projects/DS60-120/Apps/Module_EvComm.c

@@ -0,0 +1,1093 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/can.h>
+#include 	<linux/can/raw.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include	"../../define.h"
+#include 	"Module_EvComm.h"
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+#define START				1
+#define STOP				0
+#define YES					1
+#define NO					0
+#define DEMO 				0
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct FanModuleData			*ShmFanModuleData;
+struct CHAdeMOData				*ShmCHAdeMOData;
+struct CcsData					*ShmCcsData;
+
+byte gun_count = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+int chargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+float maxChargingVol = 5000;			// 限制最大充電電壓,如依照模塊則填上 0
+float maxChargingCur = 100;				// 限制最大充電電流,如依照模塊則填上 0
+
+// 槍資訊
+struct ChargingInfoData *_chargingData[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+struct Ev_Board_Cmd Ev_Cmd={
+		0,
+		0x00000200,
+		0x00000400,
+		0x00000500,
+		0x00000600,
+		0x00000700,
+		0x00000800,
+		0x00000900,
+		0x00000A00,
+		0x00000C00,
+		0x00000D00,
+
+		0x00000E00,
+		0x00000F00,
+		0x00001000,
+		0x00001100,
+
+		0x00001200,
+		0x00001500,
+};
+
+unsigned char mask_table[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
+
+void GetMaxVolAndCurMethod(byte index, float *vol, float *cur);
+unsigned long GetTimeoutValue(struct timeval _sour_time);
+
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+unsigned long GetTimeoutValue(struct timeval _sour_time)
+{
+	struct timeval _end_time;
+	gettimeofday(&_end_time, NULL);
+
+	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
+}
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+}
+
+//=================================
+// Common routine
+//=================================
+void getTimeString(char *buff)
+{
+	time_t timep;
+	struct tm *p;
+	time(&timep);
+	p=gmtime(&timep);
+
+	sprintf(buff, "[%04d-%02d-%02d %02d:%02d:%02d]", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, p->tm_hour, p->tm_hour, p->tm_sec);
+}
+
+bool CheckUniqNumber(byte value)
+{
+	for (byte index = 0; index < gun_count; index++)
+	{
+		if (_chargingData[index]->Evboard_id == value)
+		{
+			struct timeval _end_time;
+			gettimeofday(&_end_time, NULL);
+			unsigned long diff = 1000000 *	(_end_time.tv_sec - _id_assign_time.tv_sec) + _end_time.tv_usec - _id_assign_time.tv_usec;
+			if (diff >= 3000000)
+			{
+				gettimeofday(&_id_assign_time, NULL);
+				return true;
+			}
+			else
+			{
+				return false;
+			}
+		}
+	}
+
+	gettimeofday(&_id_assign_time, NULL);
+	return true;
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//initial ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmSysConfigAndInfo NG\n");
+		#endif
+    	result = FAIL;
+   	 }
+    else
+    {}
+
+   	 //initial ShmStatusCodeData
+   	 if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+   		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
+		#endif
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmStatusCodeData NG\n");
+		#endif
+    	result = FAIL;
+   	}
+    else
+    {}
+
+   	if(CHAdeMO_QUANTITY > 0)
+   	{
+   		if ((MeterSMId = shmget(ShmCHAdeMOCommKey, sizeof(struct CHAdeMOData),	IPC_CREAT | 0777)) < 0)
+   		{
+   			#ifdef SystemLogMessage
+   		   	DEBUG_ERROR("[shmget ShmCHAdeMOData NG \n");
+   			#endif
+   			return FAIL;
+   		}
+   		else if ((ShmCHAdeMOData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+   		{
+   			#ifdef SystemLogMessage
+   		   	DEBUG_ERROR("shmat ShmCHAdeMOData NG \n");
+   			#endif
+   			return FAIL;
+   		}
+   		else
+   		{}
+   	}
+
+   	if(CCS_QUANTITY > 0)
+   	{
+   		if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData),	IPC_CREAT | 0777)) < 0)
+   		{
+   			#ifdef SystemLogMessage
+   			DEBUG_ERROR("shmget ShmCcsData NG \n");
+   			#endif
+   			return FAIL;
+   		}
+   		else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1) {
+   			#ifdef SystemLogMessage
+   		   	DEBUG_ERROR("shmat ShmCcsData NG \n");
+   			#endif
+   			return FAIL;
+   		}
+   		else
+   		{}
+   	}
+
+    return result;
+}
+
+//================================================
+// initial can-bus
+//================================================
+int InitCanBus()
+{
+	int 					s0,nbytes;
+	struct timeval			tv;
+	struct ifreq 			ifr0;
+	struct sockaddr_can		addr0;
+
+	system("/sbin/ip link set can0 down");
+	system("/sbin/ip link set can0 type can bitrate 500000 restart-ms 100");
+	system("/sbin/ip link set can0 up");
+
+	s0 = socket(PF_CAN, SOCK_RAW, CAN_RAW);
+
+	tv.tv_sec = 0;
+	tv.tv_usec = 10000;
+   	if (setsockopt(s0, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Set SO_RCVTIMEO NG");
+		#endif
+	}
+	nbytes=40960;
+	if (setsockopt(s0, SOL_SOCKET,  SO_RCVBUF, &nbytes, sizeof(int)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Set SO_RCVBUF NG");
+		#endif
+	}
+	nbytes=40960;
+	if (setsockopt(s0, SOL_SOCKET, SO_SNDBUF, &nbytes, sizeof(int)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Set SO_SNDBUF NG");
+		#endif
+	}
+
+   	strcpy(ifr0.ifr_name, "can0" );
+	ioctl(s0, SIOCGIFINDEX, &ifr0); /* ifr.ifr_ifindex gets filled with that device's index */
+	addr0.can_family = AF_CAN;
+	addr0.can_ifindex = ifr0.ifr_ifindex;
+	bind(s0, (struct sockaddr *)&addr0, sizeof(addr0));
+	return s0;
+}
+
+//================================================
+//================================================
+// CANBUS receive task
+//================================================
+//================================================
+bool FindChargingInfoData(byte target, struct ChargingInfoData **chargingData)
+{
+	for (byte index = 0; index < CHAdeMO_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < CCS_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < GB_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.GbChargingData[index];
+			return true;
+		}
+	}
+
+	return false;
+}
+
+void AddrAssignment(byte *data)
+{
+	byte target_number[8];
+	byte index = 0x00;
+
+	memcpy(target_number, data, sizeof(target_number));
+	index = *(data + 4);
+
+	if (CheckUniqNumber(index))
+	{
+		printf("EV board id = %x \n", index);
+//		printf("target_number[0] = %x \n", target_number[0]);
+//		printf("target_number[1] = %x \n", target_number[1]);
+//		printf("target_number[2] = %x \n", target_number[2]);
+//		printf("target_number[3] = %x \n", target_number[3]);
+//		printf("target_number[4] = %x \n", target_number[4]);
+
+		printf("SetTargetAddr = %d \n", index);
+		SetTargetAddr(target_number, index);
+	}
+}
+
+void ClearAbnormalStatus_Chadmoe(byte gun_index)
+{
+	int codeValue = 0;
+
+	if (strlen((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index]) == 6)
+	{
+		codeValue = atoi((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index]);
+
+		if (codeValue >= 23700 && codeValue <= 23736)
+		{
+			memcpy(&ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index][0], "", 7);
+			ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level = 0;
+		}
+	}
+
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoEvCommFail = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.PilotFault = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryMalfun = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoNoPermission = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryIncompatibility = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOVP = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryUVP = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOTP = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryCurrentDiff = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryVoltageDiff = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoShiftPosition = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOtherFault = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargingSystemError = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoEvNormalStop = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoTempSensorBroken = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoConnectorLockFail = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoD1OnNoReceive = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsKtoJTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsChargeAllowTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoWaitGfdTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsEvRelayTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsReqCurrentTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsKtoJOffTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsEvRelayOffTimeout = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoAdcMoreThan10V = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoAdcMoreThan20V = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsChargeBeforeStop = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetNormalStop = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetEmergencyStop = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoIsolationResultFail = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoMissLinkWithMotherBoard = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoOutputVolMoreThanLimit = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoReqCurrentMoreThanLimit = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoReCapBmsEqrCurrentExceed = 0x00;
+	ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargeRemainCountDown = 0x00;
+}
+
+void AbnormalStopAnalysis(byte gun_index, byte *errCode)
+{
+	char string[7];
+	sprintf(string, "%d%d%d%d%d%d", *(errCode + 5), *(errCode + 4), *(errCode + 3), *(errCode + 2), *(errCode + 1), *(errCode + 0));
+
+	if (gun_index < gun_count)
+	{
+		if (strlen((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index]) <= 0)
+		{
+			memcpy(&ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index][0], string, 7);
+			ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level = 0x00;
+		}
+	}
+	printf("NOTIFICATION_EV_STOP : Err Code = %s \n", string);
+
+	if (strcmp(string, "023700") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoEvCommFail = 0x01;
+	if (strcmp(string, "023701") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.CcsEvCommFail = 0x01;
+	if (strcmp(string, "023702") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.GbEvCommFail = 0x01;
+	if (strcmp(string, "023703") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.PilotFault = 0x01;
+	if (strcmp(string, "023704") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryMalfun = 0x01;
+	if (strcmp(string, "023705") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoNoPermission = 0x01;
+	if (strcmp(string, "023706") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryIncompatibility = 0x01;
+	if (strcmp(string, "023707") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOVP = 0x01;
+	if (strcmp(string, "023708") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryUVP = 0x01;
+	if (strcmp(string, "023709") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOTP = 0x01;
+	if (strcmp(string, "023710") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryCurrentDiff = 0x01;
+	if (strcmp(string, "023711") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryVoltageDiff = 0x01;
+	if (strcmp(string, "023712") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoShiftPosition = 0x01;
+	if (strcmp(string, "023713") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBatteryOtherFault = 0x01;
+	if (strcmp(string, "023714") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargingSystemError = 0x01;
+	if (strcmp(string, "023715") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoEvNormalStop = 0x01;
+	if (strcmp(string, "023716") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoTempSensorBroken = 0x01;
+	if (strcmp(string, "023717") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoConnectorLockFail = 0x01;
+	if (strcmp(string, "023718") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoD1OnNoReceive = 0x01;
+	if (strcmp(string, "023719") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsKtoJTimeout = 0x01;
+	if (strcmp(string, "023720") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsChargeAllowTimeout = 0x01;
+	if (strcmp(string, "023721") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoWaitGfdTimeout = 0x01;
+	if (strcmp(string, "023722") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsEvRelayTimeout = 0x01;
+	if (strcmp(string, "023723") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsReqCurrentTimeout = 0x01;
+	if (strcmp(string, "023724") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsKtoJOffTimeout = 0x01;
+	if (strcmp(string, "023725") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsEvRelayOffTimeout = 0x01;
+	if (strcmp(string, "023726") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoAdcMoreThan10V = 0x01;
+	if (strcmp(string, "023727") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoAdcMoreThan20V = 0x01;
+	if (strcmp(string, "023728") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoBmsChargeBeforeStop = 0x01;
+	if (strcmp(string, "023729") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetNormalStop = 0x01;
+	if (strcmp(string, "023730") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetEmergencyStop = 0x01;
+	if (strcmp(string, "023731") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoIsolationResultFail = 0x01;
+	if (strcmp(string, "023732") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoMissLinkWithMotherBoard = 0x01;
+	if (strcmp(string, "023733") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoOutputVolMoreThanLimit = 0x01;
+	if (strcmp(string, "023734") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoReqCurrentMoreThanLimit = 0x01;
+	if (strcmp(string, "023735") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoReCapBmsEqrCurrentExceed = 0x01;
+	if (strcmp(string, "023736") == 0) ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargeRemainCountDown = 0x01;
+}
+
+void CANReceiver()
+{
+	pid_t canRecPid;
+
+	canRecPid = fork();
+
+	if(canRecPid > 0)
+	{
+		int nbytes;
+		struct can_frame frame;
+		int intCmd;
+		// 槍資訊
+		struct ChargingInfoData *_chargingData[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+		struct timeval _cmd_ack_timeout[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+		bool isPass = false;
+		while(!isPass)
+		{
+			isPass = true;
+			for (byte _index = 0; _index < gun_count; _index++)
+			{
+				if (!FindChargingInfoData(_index, &_chargingData[0]))
+				{
+					DEBUG_ERROR("EvComm (main) : FindChargingInfoData false \n");
+					isPass = false;
+					break;
+				}
+			}
+		}
+
+		for (byte _index = 0; _index < gun_count; _index++)
+			gettimeofday(&_cmd_ack_timeout[_index], NULL);
+
+		while (1)
+		{
+			memset(&frame, 0, sizeof(struct can_frame));
+			nbytes = read(CanFd, &frame, sizeof(struct can_frame));
+
+			for (byte _index = 0; _index < gun_count; _index++)
+			{
+				if (GetTimeoutValue(_cmd_ack_timeout[_index]) >= 5000000)
+				{
+					// ACK timeout
+					//printf("gun = %x, ack timeout \n", _index);
+				}
+			}
+
+			if (nbytes > 0)
+			{
+				byte target;
+				byte targetGun = 0x00;
+				intCmd = (int) (frame.can_id & CAN_EFF_MASK);
+
+				if (intCmd == ADDRESS_REQ)
+				{
+					AddrAssignment(frame.data);
+					continue;
+				}
+
+				intCmd = (int) (frame.can_id & CAN_EFF_MASK & 0xFFFFFF00);
+				target = ((byte) (frame.can_id & 0x000000FF));		// 0x01 or 0x02
+
+				for (byte _index = 0; _index < gun_count; _index++)
+				{
+					if (_chargingData[_index]->Evboard_id == target)
+					{
+						targetGun = _index;
+						break;
+					}
+				}
+
+				if(targetGun < 0 || targetGun >= CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY)
+				{
+					printf("EvComm (CANReceiver) : Target index = %x is < 0 or > QUANTITY \n", targetGun);
+					continue;
+				}
+				if(intCmd == 256)
+				{
+					continue;
+				}
+
+				gettimeofday(&_cmd_ack_timeout[targetGun], NULL);
+				switch (intCmd)
+				{
+					case NOTIFICATION_EV_STATUS:
+					{
+						_chargingData[targetGun]->ConnectorPlugIn = frame.data[0];
+						_chargingData[targetGun]->PilotVoltage = frame.data[1];
+
+						//printf("index = %d, ConnectorPlugIn = %x, data[0] = %x \n", targetGun, _chargingData[targetGun]->ConnectorPlugIn, frame.data[0]);
+						//printf("ConnectorPlugIn = %x \n", (-120 + frame.data[1]) / 10);
+					}
+						break;
+					case ACK_EV_FW_VERSION:
+					{
+						if (_chargingData[targetGun]->Type == _Type_Chademo)
+						{
+							memcpy(ShmCHAdeMOData->evse[_chargingData[targetGun]->type_index].version, frame.data, ARRAY_SIZE(frame.data));
+							ShmCHAdeMOData->evse[_chargingData[targetGun]->type_index].SelfTest_Comp = PASS;
+						}
+						else if (_chargingData[targetGun]->Type == _Type_CCS)
+						{
+							printf("Get FW HW = %s \n", frame.data);
+							if (ShmCcsData->CommProtocol == 0x01)
+							{
+								memcpy(&ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index].version, frame.data, ARRAY_SIZE(frame.data));
+								ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index].SelfTest_Comp = PASS;
+							}
+						}
+					}
+						break;
+					case ACK_EV_HW_VERSION:
+					{
+						//printf("Get EV HW = %s \n", frame.data);
+					}
+						break;
+					case ACK_GET_OUTPUT_REQ:
+					{
+						_chargingData[targetGun]->EvBatterySoc = frame.data[1];
+						_chargingData[targetGun]->EvBatterytargetVoltage = ((short) frame.data[3] << 8) + (short) frame.data[2];
+						_chargingData[targetGun]->EvBatterytargetCurrent = ((short) frame.data[5] << 8) + (short) frame.data[4];
+						_chargingData[targetGun]->PresentChargedDuration = ((short) frame.data[7] << 8) + (short) frame.data[6];
+
+						if (_chargingData[targetGun]->Type == _Type_Chademo)
+						{
+							if (ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].EvDetection != frame.data[0])
+							{
+								ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].PresentMsgFlowStatus = frame.data[0];
+							}
+
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].EvDetection = frame.data[0];
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].SOC = _chargingData[targetGun]->EvBatterySoc;
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].TargetBatteryVoltage = _chargingData[targetGun]->EvBatterytargetVoltage;
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].ChargingCurrentRequest = _chargingData[targetGun]->EvBatterytargetCurrent;
+						}
+						else if (_chargingData[targetGun]->Type == _Type_CCS)
+						{
+							if(ShmCcsData->CommProtocol == 0x01)
+							{
+								ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index].PresentMsgFlowStatus = frame.data[0];
+							}
+						}
+
+						//printf("EvBatterytargetVoltage = %f \n", _chargingData[targetGun]->EvBatterytargetVoltage);
+						//printf("EvBatterytargetCurrent = %f \n", _chargingData[targetGun]->EvBatterytargetCurrent);
+						//printf("BatteryVoltage = %d \n", ShmCHAdeMOData->ev[_chargingData[target]->type_index].TargetBatteryVoltage);
+						//printf("CurrentRequest = %d \n", ShmCHAdeMOData->ev[_chargingData[target]->type_index].ChargingCurrentRequest);
+					}
+						break;
+					case ACK_GET_EV_BATTERY_INFO:
+					{
+						//_chargingData[target].EvACorDCcharging = frame.data[0];
+						//_chargingData[target]->TotalBatteryCap = ((float) frame.data[4] << 8) + (short) frame.data[3];
+						_chargingData[targetGun]->EvBatteryMaxVoltage = ((short) frame.data[4] << 8) + (short) frame.data[3];
+						//_chargingData[target]->EvBatteryMaxCurrent = ((float) frame.data[4] << 8) + (short) frame.data[3];
+						//_chargingData[target].MaxiBatteryCurrent = ((short) frame.data[6] << 8) + (short) frame.data[5];
+						if (_chargingData[targetGun]->Type == _Type_Chademo)
+						{
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].TotalBatteryCapacity = ((short) frame.data[2] << 8) + (short) frame.data[1];
+							ShmCHAdeMOData->ev[_chargingData[targetGun]->type_index].MaxiBatteryVoltage = _chargingData[targetGun]->EvBatteryMaxVoltage;
+
+							//printf("EvBatteryMaxVoltage = %f \n", _chargingData[target]->EvBatteryMaxVoltage);
+							//printf("TotalBatteryCapacity = %d \n", ShmCHAdeMOData->ev[_chargingData[target]->type_index].TotalBatteryCapacity);
+							//printf("MaxiBatteryVoltage = %d \n", ShmCHAdeMOData->ev[_chargingData[target]->type_index].MaxiBatteryVoltage);
+						}
+						else if (_chargingData[targetGun]->Type == _Type_CCS)
+						{
+
+						}
+					}
+						break;
+					case ACK_GET_MISCELLANEOUS_INFO:
+					{
+						if (_chargingData[targetGun]->Type == _Type_Chademo)
+						{
+							_chargingData[targetGun]->GunLocked = frame.data[0];
+							ShmCHAdeMOData->evse[_chargingData[targetGun]->type_index].ConnectorTemperatureP = frame.data[1];
+							ShmCHAdeMOData->evse[_chargingData[targetGun]->type_index].ConnectorTemperatureN = frame.data[2];
+							_chargingData[targetGun]->PilotVoltage = (float)(-120 + frame.data[3]) / 10;
+							ShmCHAdeMOData->evse[_chargingData[targetGun]->type_index].EvboardStatus = frame.data[7];
+						}
+						else if (_chargingData[targetGun]->Type == _Type_CCS)
+						{
+							if (ShmCcsData->CommProtocol == 0x01)
+							{
+								_chargingData[targetGun]->GunLocked = frame.data[0];
+								//ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index]. .ConnectorTemperatureP = frame.data[1];
+								//ShmCcsData->V2GMessage_DIN70121[_chargingData[targetGun]->type_index]. .ConnectorTemperatureN = frame.data[2];
+								_chargingData[targetGun]->PilotVoltage = (float)(-120 + frame.data[3]) / 10;
+							}
+						}
+
+						//printf("EvboardStatus = %x \n", ShmCHAdeMOData->evse[_chargingData[target]->type_index].EvboardStatus);
+						//printf("ConnectorPlug locked = %x \n", frame.data[0]);
+						//printf("ConnectorTemp 0= %d \n", ShmCHAdeMOData->evse[_chargingData[target]->type_index].ConnectorTemperatureP);
+						//printf("ConnectorTemp 1= %d \n", ShmCHAdeMOData->evse[_chargingData[target]->type_index].ConnectorTemperatureN);
+						//printf("PilotVoltage = %x \n", (-120 + frame.data[3]) / 10);
+					}
+						break;
+					case ACK_EVSE_ISOLATION_STATUS:	{}
+						break;
+					case ACK_EVSE_PRECHAGE_INFO:
+					{
+						_chargingData[targetGun]->PrechargeStatus = frame.data[0];
+					}
+						break;
+					case NOTIFICATION_EV_STOP:
+					{
+						// 車端要求停止
+						// frame.data[0] : 0x01 => normal stop, 0x02 => ev emergency stop
+						printf("NOTIFICATION_EV_STOP -----------------------------\n");
+						if (frame.data[0] == 0x02)
+						{
+							AbnormalStopAnalysis(targetGun, frame.data + 1);
+						}
+						_chargingData[targetGun]->StopChargeFlag = YES;
+					}
+						break;
+					default:
+						printf("EV board = %d, Ack none defined. intCmd = %d  \n", targetGun, intCmd);
+						break;
+				}
+			}
+			usleep(10000);
+		}
+	}
+}
+
+//================================================
+// Main process
+//================================================
+// 檢查 Byte 中某個 Bit 的值
+// _byte : 欲改變的 byte
+// _bit : 該 byte 的第幾個 bit
+unsigned char EvDetectionStatus(unsigned char _byte, unsigned char _bit)
+{
+	return ( _byte & mask_table[_bit] ) != 0x00;
+}
+
+bool IsConnectorPlugIn(struct ChargingInfoData *chargingData)
+{
+	return (chargingData->ConnectorPlugIn == 0x01) ? true : false;
+}
+
+void SetPresentChargingOutputPower(struct ChargingInfoData *chargingData_1, struct ChargingInfoData *chargingData_2)
+{
+	float vol1 = 0, cur1 = 0;
+	float vol2 = 0, cur2 = 0;
+
+	//printf("f vol - 0 = %f \n", chargingData_1->FireChargingVoltage);
+	//printf("f cur - 0 = %f \n", chargingData_1->PresentChargingCurrent);
+	//printf("***********************f vol - 1 = %f \n", chargingData_2->FireChargingVoltage);
+	//printf("***********************f cur - 1 = %f \n", chargingData_2->PresentChargingCurrent);
+
+	vol1 = chargingData_1->FireChargingVoltage;
+	cur1 = chargingData_1->PresentChargingCurrent;
+
+	vol2 = chargingData_2->FireChargingVoltage;
+	cur2 = chargingData_2->PresentChargingCurrent;
+
+	SetPresentOutputPower(vol1, cur1, vol2, cur2);
+}
+
+void SetPresentChargingOutputCap(struct ChargingInfoData *chargingData_1, struct ChargingInfoData *chargingData_2)
+{
+	float pow1 = 0, cur1 = 0;
+	float pow2 = 0, cur2 = 0;
+	float vol = 0;
+
+	if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag != _REASSIGNED_NONE)
+	{
+		pow1 = chargingData_1->DeratingChargingPower;
+		cur1 = chargingData_1->DeratingChargingCurrent;
+	}
+	else
+	{
+		pow1 = chargingData_1->AvailableChargingPower;
+		cur1 = chargingData_1->AvailableChargingCurrent;
+	}
+	vol = chargingData_1->MaximumChargingVoltage;
+	GetMaxVolAndCurMethod(chargingData_1->Index, &vol, &cur1);
+
+	if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag != _REASSIGNED_NONE)
+	{
+		pow2 = chargingData_2->DeratingChargingPower;
+		cur2 = chargingData_2->DeratingChargingCurrent;
+	}
+	else
+	{
+		pow2 = chargingData_2->AvailableChargingPower;
+		cur2 = chargingData_2->AvailableChargingCurrent;
+	}
+	vol = chargingData_2->MaximumChargingVoltage;
+	GetMaxVolAndCurMethod(chargingData_2->Index, &vol, &cur2);
+
+	printf("To EV Power_1 = %f, Cur_1 = %f, Power_2 = %f, Cur_2 = %f \n", pow1, cur1, pow2, cur2);
+	SetPresentOutputCapacity(pow1, cur1, pow2, cur2);
+}
+
+void Initialization()
+{
+	bool isPass = false;
+	while(!isPass)
+	{
+		isPass = true;
+		for (byte _index = 0; _index < gun_count; _index++)
+		{
+			if (!FindChargingInfoData(_index, &_chargingData[0]))
+			{
+				DEBUG_ERROR("EvComm (main) : FindChargingInfoData false \n");
+				isPass = false;
+				break;
+			}
+		}
+	}
+}
+
+void GetMaxVolAndCurMethod(byte index, float *vol, float *cur)
+{
+	if (maxChargingVol != 0 && maxChargingVol <= *vol)
+		*vol = maxChargingVol;
+
+	if (maxChargingCur != 0 && maxChargingCur <= *cur)
+		*cur = maxChargingCur;
+}
+
+void GetStopChargingReasonByEvse(byte gunIndex, byte *reason)
+{
+	if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip == 0x01)
+	{
+		// 012251
+		*(reason + 5) = 0;
+		*(reason + 4)  = 1;
+		*(reason + 3)  = 2;
+		*(reason + 2)  = 2;
+		*(reason + 1)  = 5;
+		*(reason + 0)  = 1;
+	}
+	else if (_chargingData[gunIndex]->Type == _Type_Chademo &&
+			ShmStatusCodeData->FaultCode.FaultEvents.bits.ChademoOutputRelayDrivingFault == 0x01)
+	{
+		// 011012
+		*(reason + 5) = 0;
+		*(reason + 4) = 1;
+		*(reason + 3) = 1;
+		*(reason + 2) = 0;
+		*(reason + 1) = 1;
+		*(reason + 0) = 2;
+	}
+	else if (_chargingData[gunIndex]->Type == _Type_CCS &&
+			ShmStatusCodeData->FaultCode.FaultEvents.bits.CcsOutputRelayDrivingFault == 0x01)
+	{
+		// 011014
+		*(reason + 5) = 0;
+		*(reason + 4) = 1;
+		*(reason + 3) = 1;
+		*(reason + 2) = 0;
+		*(reason + 1) = 1;
+		*(reason + 0) = 4;
+	}
+}
+
+int main(int argc, char *argv[])
+{
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if(ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	Initialization();
+	CanFd = InitCanBus();
+	CANReceiver();
+
+	byte priorityLow = 1;
+#if (!DEMO)
+	while(CanFd)
+	{
+		for(byte _index = 0; _index < gun_count; _index++)
+		{
+			if (priorityLow == 1)
+			{
+				// 優先權較低 - 只要有回應即不會再詢問
+				if (_chargingData[_index]->Type == _Type_Chademo &&
+						ShmCHAdeMOData->evse[_chargingData[_index]->type_index].SelfTest_Comp != PASS)
+				{
+					GetFirmwareVersion(_index, _chargingData[_index]->Evboard_id);
+					GetHardwareVersion(_index, _chargingData[_index]->Evboard_id);
+				}
+				else if (_chargingData[_index]->Type == _Type_CCS)
+				{
+					if (ShmCcsData->CommProtocol == 0x01 &&
+						ShmCcsData->V2GMessage_DIN70121[_chargingData[_index]->type_index].SelfTest_Comp != PASS)
+					{
+						GetFirmwareVersion(_index, _chargingData[_index]->Evboard_id);
+						GetHardwareVersion(_index, _chargingData[_index]->Evboard_id);
+					}
+				}
+
+				// 固定要取得的資訊 : 1.槍鎖狀態, 2."Connector 1" 溫度, 3."Connector 2" 溫度, 4.Pilot Voltage
+				//printf("GetMiscellaneousInfo. index = %d, Eid = %d \n", _index, _chargingData[_index]->Evboard_id);
+				GetMiscellaneousInfo(_index, _chargingData[_index]->Evboard_id);
+			}
+
+			switch (_chargingData[_index]->SystemStatus)
+			{
+				case S_IDLE:
+					_chargingData[_index]->PresentChargedEnergy = 0;
+					_chargingData[_index]->GroundFaultStatus = GFD_WAIT;
+					_chargingData[_index]->StopChargeFlag = NO;
+					chargingTime[_index] = 0;
+
+					if (_chargingData[_index]->Type == _Type_Chademo)
+					{
+						ClearAbnormalStatus_Chadmoe(_index);
+					}
+					else if (_chargingData[_index]->Type == _Type_CCS)
+					{
+
+					}
+					break;
+				case S_PREPARING_FOR_EV:
+				{
+					// 開始確認車端是否同意開始充電 : 1.SOC, 2.Target Vol, 3.Target Cur, 4.Charging remaining time
+					GetOutputReq(_index, _chargingData[_index]->Evboard_id);
+
+					//printf("PresentChargingVoltage = %f \n", _chargingData[_index]->PresentChargingVoltage);
+					//printf("PresentChargingCurrent = %f \n", _chargingData[_index]->PresentChargingCurrent);
+					//printf("AvailableChargingPower = %f \n", _chargingData[_index]->AvailableChargingPower);
+					//printf("AvailableChargingCurrent = %f \n", _chargingData[_index]->AvailableChargingCurrent);
+					//printf("MaximumChargingVoltage = %f \n", _chargingData[_index]->MaximumChargingVoltage);
+
+					// 設定當前輸出
+					if (gun_count == 1)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[0]);
+					else if (gun_count == 2)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[1]);
+
+					if (priorityLow == 1)
+					{
+						float maxVol, maxCur;
+						// 樁端輸出能力
+						if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag != _REASSIGNED_NONE)
+						{
+							maxVol = _chargingData[_index]->MaximumChargingVoltage;
+							maxCur = _chargingData[_index]->DeratingChargingCurrent;
+						}
+						else
+						{
+							maxVol = _chargingData[_index]->MaximumChargingVoltage;
+							maxCur = _chargingData[_index]->AvailableChargingCurrent;
+						}
+						GetMaxVolAndCurMethod(_index, &maxVol, &maxCur);
+
+						printf("To EV Max_Vol = %f, Cap_Cur = %f \n", maxVol, maxCur);
+						SetChargingPermission(_index, START,
+						_chargingData[_index]->AvailableChargingPower,
+								maxCur,
+								maxVol,
+								_chargingData[_index]->Evboard_id);
+
+						// 取得車端電池資訊 : 1.AC or DC ? 2.Total battery cap, 3.Max battery vol, 4.Max battery cur
+						GetEvBatteryInfo(_index, _chargingData[_index]->Evboard_id);
+					}
+				}
+					break;
+				case S_PREPARING_FOR_EVSE:
+				case S_CCS_PRECHARGE_ST0:
+				case S_CCS_PRECHARGE_ST1:
+				{
+					// 開始確認車端是否同意開始充電
+					GetOutputReq(_index, _chargingData[_index]->Evboard_id);
+
+					// 設定當前輸出
+					if (gun_count == 1)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[0]);
+					else if (gun_count == 2)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[1]);
+
+					if (priorityLow % 5 == 1)
+					{
+						// 樁端輸出能力改變
+						if (gun_count == 1)
+							SetPresentChargingOutputCap(_chargingData[0], _chargingData[0]);
+						else if (gun_count == 2)
+							SetPresentChargingOutputCap(_chargingData[0], _chargingData[1]);
+					}
+
+					// 持續通知 Isolation 測試狀態
+					if (priorityLow == 1)
+					{
+						// 拉 500 V 如果在一秒鐘內 GFD 都符合則 PASS
+						if(_chargingData[_index]->GroundFaultStatus != GFD_WAIT)
+						{
+							SetIsolationStatus(_index, _chargingData[_index]->GroundFaultStatus, _chargingData[_index]->Evboard_id);
+						}
+
+						if(_chargingData[_index]->SystemStatus == S_CCS_PRECHARGE_ST0 &&
+							_chargingData[_index]->PrechargeStatus == PRECHARGE_READY)
+						{
+							SetEvsePrechargeInfo(_index, PRECHARGE_PRERELAY_PASS, _chargingData[_index]->Evboard_id);
+						}
+					}
+				}
+					break;
+				case S_CHARGING:
+				{
+					// 計算 Power
+					_chargingData[_index]->PresentChargingPower = ((float)((_chargingData[_index]->PresentChargingVoltage / 10) * (_chargingData[_index]->PresentChargingCurrent / 10)) / 1000);
+
+					if (chargingTime[_index] == 0)
+					{
+						chargingTime[_index] = _chargingData[_index]->RemainChargingDuration;
+					}
+					else
+					{
+						int passTime = _chargingData[_index]->RemainChargingDuration - chargingTime[_index];
+
+						if (passTime > 0)
+						{
+							_chargingData[_index]->PresentChargedEnergy += (_chargingData[_index]->PresentChargingPower) * passTime / 3600;
+							chargingTime[_index] = _chargingData[_index]->RemainChargingDuration;
+						}
+					}
+
+					// 開始確認車端是否同意開始充電
+					GetOutputReq(_index, _chargingData[_index]->Evboard_id);
+
+					// 設定當前輸出
+					if (gun_count == 1)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[0]);
+					else if (gun_count == 2)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[1]);
+
+					// for test end
+					if (priorityLow % 5 == 0)
+					{
+						// 樁端輸出能力改變
+						if (gun_count == 1)
+							SetPresentChargingOutputCap(_chargingData[0], _chargingData[0]);
+						else if (gun_count == 2)
+							SetPresentChargingOutputCap(_chargingData[0], _chargingData[1]);
+					}
+
+					// GFD 失敗再通知
+					if (priorityLow == 1)
+					{
+						if(_chargingData[_index]->GroundFaultStatus == GFD_FAIL)
+						{
+							SetIsolationStatus(_index, _chargingData[_index]->GroundFaultStatus, _chargingData[_index]->Evboard_id);
+						}
+
+						if(_chargingData[_index]->Type == _Type_CCS &&
+							_chargingData[_index]->PrechargeStatus == PRECHARGE_READY)
+						{
+							SetEvsePrechargeInfo(_index, PRECHARGE_CHARELAY_PASS, _chargingData[_index]->Evboard_id);
+						}
+					}
+				}
+					break;
+				case S_TERMINATING:
+				{
+					// 設定當前輸出
+					if (gun_count == 1)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[0]);
+					else if (gun_count == 2)
+						SetPresentChargingOutputPower(_chargingData[0], _chargingData[1]);
+
+					// 槍鎖還在,則代表是樁端要求的停止
+					if (_chargingData[_index]->GunLocked == START)
+					{
+						byte normalStop = 0x01;
+						byte stopReason[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+						if (strlen((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[_index]) > 0)
+						{
+							normalStop = 0x02;
+							GetStopChargingReasonByEvse(_index, stopReason);
+						}
+
+						EvseStopChargingEvent(normalStop, stopReason, _chargingData[_index]->Evboard_id);
+					}
+					GetOutputReq(_index, _chargingData[_index]->Evboard_id);
+				}
+					break;
+				case S_COMPLETE:
+				{
+					if (priorityLow == 1)
+					{
+						// 樁端輸出能力
+						if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag != _REASSIGNED_NONE)
+						{
+							SetChargingPermission(_index, STOP,
+									_chargingData[_index]->DeratingChargingPower,
+									_chargingData[_index]->DeratingChargingCurrent,
+									_chargingData[_index]->MaximumChargingVoltage,
+									_chargingData[_index]->Evboard_id);
+						}
+						else
+						{
+							SetChargingPermission(_index, STOP,
+									_chargingData[_index]->AvailableChargingPower,
+									_chargingData[_index]->AvailableChargingCurrent,
+									_chargingData[_index]->MaximumChargingVoltage,
+									_chargingData[_index]->Evboard_id);
+						}
+					}
+				}
+					break;
+			}
+		}
+		priorityLow >= 20 ? priorityLow = 1 : priorityLow++;
+		usleep(45000); //EV 小板通訊 (50 ms)
+	}
+#else
+#endif
+	DEBUG_INFO("Module_EvComm : Can-bus port = %d \n", CanFd);
+	return FAIL;
+}

+ 77 - 0
EVSE/Projects/DS60-120/Apps/Module_EvComm.h

@@ -0,0 +1,77 @@
+#ifndef MODULE_EVCOMM_H_
+#define MODULE_EVCOMM_H_
+
+#include 	<stdbool.h>
+
+int CanFd;
+
+typedef unsigned char 		byte;
+
+extern struct Ev_Board_Cmd
+{
+	int none;							// 0
+	int address_assignment;				// 0x00000200
+	int get_firmware_ver;				// 0x00000400
+	int get_hardware_ver;				// 0x00000500
+	int charging_permission;			// 0x00000600
+	int present_output_power;			// 0x00000700
+	int present_output_cap;				// 0x00000800
+	int get_output_req;					// 0x00000900
+	int get_battery_info;				// 0x00000A00
+	int evse_stop_charging;				// 0x00000C00
+	int get_miscellaneous_info;			// 0x00000D00
+
+	int download_req;					// 0x00000E00
+	int start_block_transfer;			// 0x00000F00
+	int data_transfer;					// 0x00001000
+	int download_finish;				// 0x00001100
+
+	int isolation_status;				// 0x00001200
+	int evse_precharge_info;			// 0x00001500
+}Ev_Cmd;
+
+extern struct Ev_Cmd_Dir
+{
+	unsigned short master_to_slave;
+	unsigned short slave_to_master;
+}Ev_Dir;
+
+struct timeval _id_assign_time;
+
+// Send msg to can-bus
+void SetTargetAddr(byte *target_number, byte index);
+
+void GetFirmwareVersion(byte gun_index, byte toId);
+void GetHardwareVersion(byte gun_index, byte toId);
+void SetChargingPermission(byte gun_index, byte permissionStatus, short aOutputPw, short aOutputVol, short aOutputCur, byte toId);
+void SetPresentOutputPower(short outputVol_b1, short outputCur_b1, short outputVol_b2, short outputCur_b2);
+void SetPresentOutputCapacity(short aOutputPw_b1, short aOutputCur_b1, short aOutputPw_b2, short aOutputCur_b2);
+void GetOutputReq(byte gun_index, byte toId);
+void GetEvBatteryInfo(byte gun_index, byte toId);
+void GetMiscellaneousInfo(byte gun_index, byte toId);
+void SetIsolationStatus(byte gun_index, byte result, byte toId);
+void SetEvsePrechargeInfo(byte gun_index, byte result, byte toId);
+// 發送電樁主動停止充電結果及原因
+void EvseStopChargingEvent(byte stopResult, byte *stopReason, byte toId);
+
+// Receive msg From can-bus.
+
+enum Receieve_PSU_msgf
+{
+	// 車端主動
+	ADDRESS_REQ = 						0x080001FF,
+	NOTIFICATION_EV_STATUS = 			0x08000300,
+	NOTIFICATION_EV_STOP = 				0x08000B00,
+
+	// 車端回應
+	ACK_EV_FW_VERSION = 				0x08000400,
+	ACK_EV_HW_VERSION = 				0x08000500,
+	ACK_GET_OUTPUT_REQ =				0x08000900,
+	ACK_GET_EV_BATTERY_INFO =			0x08000A00,
+	ACK_GET_MISCELLANEOUS_INFO = 		0x08000D00,
+	ACK_EVSE_ISOLATION_STATUS = 		0x08001200,
+	ACK_EVSE_PRECHAGE_INFO = 			0x08001500,
+};
+
+#endif /* MODULE_EVCOMM_H_ */
+

BIN
EVSE/Projects/DS60-120/Apps/Module_EvComm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_EventLogging


+ 298 - 0
EVSE/Projects/DS60-120/Apps/Module_EventLogging.c

@@ -0,0 +1,298 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include	"../../define.h"
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+
+int StoreLogMsg(const char *fmt, ...);
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+}
+
+//=================================
+// Common routine
+//=================================
+char* getTimeString(void)
+{
+	char *result=malloc(21);
+	time_t timep;
+	struct tm *p;
+	time(&timep);
+	p=gmtime(&timep);
+
+	sprintf(result, "[%04d-%02d-%02d %02d:%02d:%02d]", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, p->tm_hour, p->tm_hour, p->tm_sec);
+
+	return result;
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//creat ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmSysConfigAndInfo NG\n");
+		#endif
+    	result = FAIL;
+   	 }
+    else
+    {}
+
+   	 //creat ShmStatusCodeData
+   	 if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+   		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
+		#endif
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmStatusCodeData NG\n");
+		#endif
+    	result = FAIL;
+   	}
+    else
+    {}
+
+    return result;
+}
+
+//================================================
+// Main process
+//================================================
+void AddFaultCodeToBuf(unsigned char *Code)
+{
+	if(ShmSysConfigAndInfo->SysWarningInfo.WarningCount < 10)
+	{
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[ShmSysConfigAndInfo->SysWarningInfo.WarningCount][0], Code, 7);
+		ShmSysConfigAndInfo->SysWarningInfo.WarningCount++;
+	}
+}
+
+void RemoveFaultCodeToBuf(unsigned char *Code)
+{
+	unsigned char find = 0x00;
+	char _code[7];
+	sprintf(_code,"%s", Code);
+
+	for(unsigned char i = 0; i < ShmSysConfigAndInfo->SysWarningInfo.WarningCount; i++)
+	{
+		if (find == 0x00)
+		{
+			if(memcmp(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i][0], _code, 7) != 0)
+			{
+				find = 0x01;
+			}
+		}
+		else
+		{
+			if(i == ShmSysConfigAndInfo->SysWarningInfo.WarningCount - 1)
+			{
+				memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i][0], "", 7);
+			}
+			else
+			{
+				memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i][0],
+						&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i + 1][0], 7);
+			}
+		}
+	}
+
+	ShmSysConfigAndInfo->SysWarningInfo.WarningCount--;
+}
+
+int main(void)
+{
+	int ByteCount,BitCount;
+	unsigned char tmp, EventCodeTmp[7];
+
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if(ShmStatusCodeData!=NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	for(;;)
+	{
+		//check Fault Status
+		for(ByteCount=0;ByteCount<4;ByteCount++)
+		{
+			if(ShmStatusCodeData->FaultCode.FaultEvents.FaultVal[ByteCount] != ShmStatusCodeData->FaultCode.PreviousFaultVal[ByteCount])
+			{
+				tmp=ShmStatusCodeData->FaultCode.FaultEvents.FaultVal[ByteCount]; //prevent be modified during following process
+				for(BitCount=0;BitCount<8;BitCount++)
+				{
+					if(((tmp>>BitCount)&0x01) != ((ShmStatusCodeData->FaultCode.PreviousFaultVal[ByteCount]>>BitCount)&0x01))
+					{
+						memset(EventCodeTmp,0,sizeof(EventCodeTmp));
+						memcpy(EventCodeTmp,FaultStatusCode[ByteCount*8+BitCount],sizeof(EventCodeTmp)-1);
+						if(((tmp>>BitCount)&0x01)==0)//Recovered
+						{
+							//EventCodeTmp[0]=1;
+							DEBUG_INFO("Recovery Fault Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->FaultCode.PreviousFaultVal[ByteCount] &= ~(1<<BitCount);
+							RemoveFaultCodeToBuf(EventCodeTmp);
+						}
+						else
+						{
+							DEBUG_INFO("Fault Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->FaultCode.PreviousFaultVal[ByteCount] |= (1<<BitCount);
+							AddFaultCodeToBuf(EventCodeTmp);
+						}
+					}
+				}
+			}
+		}
+
+		//check Alarm Status
+		for(ByteCount=0;ByteCount<8;ByteCount++)
+		{
+			if(ShmStatusCodeData->AlarmCode.AlarmEvents.AlarmVal[ByteCount] != ShmStatusCodeData->AlarmCode.PreviousAlarmVal[ByteCount])
+			{
+				tmp=ShmStatusCodeData->AlarmCode.AlarmEvents.AlarmVal[ByteCount]; //prevent be modified during following process
+				for(BitCount=0;BitCount<8;BitCount++)
+				{
+					if(((tmp>>BitCount)&0x01) != ((ShmStatusCodeData->AlarmCode.PreviousAlarmVal[ByteCount]>>BitCount)&0x01))
+					{
+						memset(EventCodeTmp,0,sizeof(EventCodeTmp));
+						memcpy(EventCodeTmp,AlarmStatusCode[ByteCount*8+BitCount],sizeof(EventCodeTmp)-1);
+						if(((tmp>>BitCount)&0x01)==0)//Recovered
+						{
+							//EventCodeTmp[0]=1;
+							DEBUG_INFO("Recovery Alarm Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->AlarmCode.PreviousAlarmVal[ByteCount] &= ~(1<<BitCount);
+							RemoveFaultCodeToBuf(EventCodeTmp);
+						}
+						else
+						{
+							DEBUG_INFO("Alarm Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->AlarmCode.PreviousAlarmVal[ByteCount] |= (1<<BitCount);
+							AddFaultCodeToBuf(EventCodeTmp);
+						}
+					}
+				}
+			}
+		}
+
+		//check Info Status
+		for(ByteCount=0;ByteCount<8;ByteCount++)
+		{
+			if(ShmStatusCodeData->InfoCode.InfoEvents.InfoVal[ByteCount] != ShmStatusCodeData->InfoCode.PreviousInfoVal[ByteCount])
+			{
+				tmp=ShmStatusCodeData->InfoCode.InfoEvents.InfoVal[ByteCount]; //prevent be modified during following process
+				for(BitCount=0;BitCount<8;BitCount++)
+				{
+					if(((tmp>>BitCount)&0x01) != ((ShmStatusCodeData->InfoCode.PreviousInfoVal[ByteCount]>>BitCount)&0x01))
+					{
+						memset(EventCodeTmp,0,sizeof(EventCodeTmp));
+						memcpy(EventCodeTmp,InfoStatusCode[ByteCount*8+BitCount],sizeof(EventCodeTmp)-1);
+						if(((tmp>>BitCount)&0x01)==0)//Recovered
+						{
+							//EventCodeTmp[0]=1;
+							DEBUG_INFO("Recovery Info Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->InfoCode.PreviousInfoVal[ByteCount] &= ~(1<<BitCount);
+							RemoveFaultCodeToBuf(EventCodeTmp);
+						}
+						else
+						{
+							DEBUG_INFO("Info Code = %s\n", EventCodeTmp);
+							ShmStatusCodeData->InfoCode.PreviousInfoVal[ByteCount] |= (1<<BitCount);
+							AddFaultCodeToBuf(EventCodeTmp);
+						}
+					}
+				}
+			}
+		}
+		usleep(500000);
+	}
+
+	return FAIL;
+}

BIN
EVSE/Projects/DS60-120/Apps/Module_EventLogging.o


BIN
EVSE/Projects/DS60-120/Apps/Module_InternalComm


+ 1347 - 0
EVSE/Projects/DS60-120/Apps/Module_InternalComm.c

@@ -0,0 +1,1347 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include	"../../define.h"
+#include	"internalComm.h"
+#include 	<stdbool.h>
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+#define YES					1
+#define NO					0
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct FanModuleData			*ShmFanModuleData;
+struct RelayModuleData			*ShmRelayModuleData;
+struct CHAdeMOData				*ShmCHAdeMOData;
+struct CcsData					*ShmCcsData;
+
+#define VIN_MAX_VOLTAGE		250	// 大於該值 : OVP
+#define VIN_MIN_VOLTAGE		170	// 小於該值 : UVP
+#define VIN_DROP_VOLTAGE	150	// 小於該值 : ac drop
+
+#define VOUT_MAX_VOLTAGE	750
+#define VOUT_MIN_VOLTAGE	150
+#define IOUT_MAX_CURRENT	50
+
+#define MAX_FAN_SPEED		6000
+#define MIN_FAN_SPEED		300
+
+// GFD Status
+#define GFD_IDLE			0
+#define GFD_CABLECHK		1
+#define GFD_PRECHARGE		2
+#define GFD_CHARGING		3
+
+// 最小切換 Relay 電壓
+#define SELF_TO_CHANGE_RELAY_STATUS			600
+// 透過電壓確認 Relay 是否搭上的依據電壓
+#define CHECK_RELAY_STATUS					300
+#define CHECK_RELAY_STATUS_GAP				100
+// 安全在停止充電程序中斷開 Relay 的電流
+#define SEFETY_SWITCH_RELAY_CUR				20
+// 確認 Relay Welding 電壓
+#define RELAY_WELDING_DET					300
+
+byte gunCount = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+// 槍資訊
+struct ChargingInfoData *_chargingData[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+byte gfdChkFailCount[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+bool FindChargingInfoData(byte target, struct ChargingInfoData **chargingData);
+
+int Uart5Fd;
+char *relayRs485PortName = "/dev/ttyS5";
+unsigned short fanSpeedSmoothValue = 100;
+
+struct timeval _priority_time;
+
+Ver ver;
+PresentInputVoltage inputVoltage;
+PresentOutputVoltage outputVoltage;
+FanSpeed fanSpeed;
+Temperature temperature;
+AuxPower auxPower;
+Gfd gfd_adc;
+Gfd_config gfd_config;
+Gpio_in gpio_in;
+Gpio_out gpio_out;
+Relay outputRelay;
+Relay regRelay;
+
+int StoreLogMsg(const char *fmt, ...);
+unsigned long GetTimeoutValue(struct timeval _sour_time);
+
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+unsigned long GetTimeoutValue(struct timeval _sour_time)
+{
+	struct timeval _end_time;
+	gettimeofday(&_end_time, NULL);
+
+	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
+}
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+}
+
+unsigned short MaxValue(unsigned short value1, unsigned short value2)
+{
+	return value1 >= value2 ? value1 : value2;
+}
+
+//==========================================
+// Communication Function
+//==========================================
+void GetFwAndHwVersion_Aux()
+{
+	if (Query_FW_Ver(Uart5Fd, Addr.Aux, &ver) == PASS)
+	{
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.AuxPwrFwRev, ver.Version_FW);
+		printf("s1 = %s \n", ver.Version_FW);
+	}
+
+	if (Query_HW_Ver(Uart5Fd, Addr.Aux, &ver) == PASS)
+	{
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.AuxPwrHwRev, ver.Version_HW);
+		printf("s2 = %s \n", ver.Version_HW);
+	}
+}
+
+void GetFwAndHwVersion_Fan()
+{
+	if(Query_FW_Ver(Uart5Fd, Addr.Fan, &ver) == PASS)
+	{
+		// FanModuleData
+		strcpy((char *) ShmFanModuleData->version, ver.Version_FW);
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.FanModuleFwRev, ver.Version_FW);
+		printf("GetFwAndHwVersion_Fan s1 = %s \n", ver.Version_FW);
+	}
+
+	if (Query_HW_Ver(Uart5Fd, Addr.Fan, &ver) == PASS)
+	{
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.FanModuleHwRev, ver.Version_FW);
+		printf("GetFwAndHwVersion_Fan s2 = %s \n", ver.Version_HW);
+	}
+}
+
+void GetFwAndHwVersion_Relay()
+{
+	if (Query_FW_Ver(Uart5Fd, Addr.Relay, &ver) == PASS)
+	{
+		// FanModuleData
+		strcpy((char *) ShmRelayModuleData->version, ver.Version_FW);
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev, ver.Version_FW);
+		printf("GetFwAndHwVersion_Relay s1 = %s \n", ver.Version_FW);
+	}
+
+	if (Query_HW_Ver(Uart5Fd, Addr.Relay, &ver) == PASS)
+	{
+		// SystemInfo
+		strcpy((char *) ShmSysConfigAndInfo->SysInfo.RelayModuleHwRev, ver.Version_FW);
+		printf("GetFwAndHwVersion_Relay s2 = %s \n", ver.Version_HW);
+	}
+}
+
+void GetTemperature_Aux()
+{
+	memset(temperature.temperature, 0, ARRAY_SIZE(temperature.temperature));
+	if (Query_Temperature(Uart5Fd, Addr.Aux, &temperature) == PASS)
+	{
+		// aux temp
+		// UI 實際顯示溫度轉換
+		//char s[4];
+		//sprintf(s,"%d",(-60 + temperature[2].temperature[4])),
+		//printf("s = %s \n",s);
+
+		printf("Aux temp = %d,%d,%d,%d,%d,%d,%d,%d \n",
+				(-60 + temperature.temperature[0]),
+				(-60 + temperature.temperature[1]),
+				(-60 + temperature.temperature[2]),
+				(-60 + temperature.temperature[3]),
+				(-60 + temperature.temperature[4]),
+				(-60 + temperature.temperature[5]),
+				(-60 + temperature.temperature[6]),
+				(-60 + temperature.temperature[7]));
+	}
+}
+
+void GetTemperature_Relay()
+{
+	memset(temperature.temperature, 0, ARRAY_SIZE(temperature.temperature));
+	if (Query_Temperature(Uart5Fd, Addr.Relay, &temperature) == PASS)
+	{
+		// relay temp
+		printf("Relay temp = %d,%d,%d,%d,%d,%d,%d,%d \n",
+				(-60 + temperature.temperature[0]),
+				(-60 + temperature.temperature[1]),
+				(-60 + temperature.temperature[2]),
+				(-60 + temperature.temperature[3]),
+				(-60 + temperature.temperature[4]),
+				(-60 + temperature.temperature[5]),
+				(-60 + temperature.temperature[6]),
+				(-60 + temperature.temperature[7]));
+	}
+}
+
+// AC 三相輸入電壓
+void GetPresentInputVol()
+{
+	if (Query_Present_InputVoltage(Uart5Fd, Addr.Relay, &inputVoltage) == PASS)
+	{
+		// resolution : 0.1
+		//printf("InputVoltageR = %f \n", inputVoltage.L1N_L12);
+		//printf("InputVoltageS = %f \n", inputVoltage.L2N_L23);
+		//printf("InputVoltageT = %f \n", inputVoltage.L3N_L31);
+
+		ShmRelayModuleData->InputL1Volt = inputVoltage.L1N_L12;
+		ShmRelayModuleData->InputL2Volt = inputVoltage.L2N_L23;
+		ShmRelayModuleData->InputL3Volt = inputVoltage.L3N_L31;
+
+		//********************************************************************************************************//
+		// VIN < 170
+		if (inputVoltage.L1N_L12 < VIN_MIN_VOLTAGE)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = 0x01;
+		}
+		if (inputVoltage.L2N_L23 < VIN_MIN_VOLTAGE)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = 0x01;
+		}
+		if (inputVoltage.L3N_L31 < VIN_MIN_VOLTAGE)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = 0x01;
+		}
+
+		//********************************************************************************************************//
+		// VIN > 250
+		if (inputVoltage.L1N_L12 > VIN_MAX_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = 0x01;
+		}
+		if (inputVoltage.L2N_L23 > VIN_MAX_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = 0x01;
+		}
+		if (inputVoltage.L3N_L31 > VIN_MAX_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = 0x01;
+		}
+		//********************************************************************************************************//
+		// VIN < 150
+		if (inputVoltage.L1N_L12 < VIN_DROP_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputDrop = 0x01;
+		}
+		if (inputVoltage.L2N_L23 < VIN_DROP_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputDrop = 0x01;
+		}
+		if (inputVoltage.L3N_L31 < VIN_DROP_VOLTAGE)
+		{
+			//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputDrop = 0x01;
+		}
+
+		//********************************************************************************************************//
+		// 150 <= VIN < 160
+//		if (inputVoltage.L1N_L12 >= VIN_MIN_VOLTAGE && inputVoltage.L1N_L12 <= VIN_LOW_VOLTAGE)
+//		{
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputUVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputOVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL1InputDrop = 0x00;
+//		}
+//		if (inputVoltage.L2N_L23 >= VIN_MIN_VOLTAGE && inputVoltage.L2N_L23 <= VIN_LOW_VOLTAGE)
+//		{
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputUVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputOVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL2InputDrop = 0x00;
+//		}
+//		if (inputVoltage.L3N_L31 >= VIN_MIN_VOLTAGE && inputVoltage.L3N_L31 <= VIN_LOW_VOLTAGE)
+//		{
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputUVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputOVP = 0x00;
+//			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemL3InputDrop = 0x00;
+//		}
+	}
+}
+
+// 左右槍的 Relay 前後的輸出電壓
+void GetPersentOutputVol()
+{
+	if (Query_Present_OutputVoltage(Uart5Fd, Addr.Relay, &outputVoltage) == PASS)
+	{
+//		printf("Conn1 fuse 1 = %f \n", outputVoltage.behindFuse_Voltage_C1);
+//		printf("Conn1 relay 1 = %f \n", outputVoltage.behindRelay_Voltage_C1);
+//		printf("Conn2 fuse 2 = %f \n", outputVoltage.behindFuse_Voltage_C2);
+//		printf("Conn2 relay 2 = %f \n", outputVoltage.behindRelay_Voltage_C2);
+
+		//printf("outputVoltage.behindFuse_Voltage_C1 = %f \n", outputVoltage.behindFuse_Voltage_C1);
+		//printf("outputVoltage.behindFuse_Voltage_C2 = %f \n", outputVoltage.behindFuse_Voltage_C2);
+
+		ShmRelayModuleData->Gun1FuseOutputVolt = outputVoltage.behindFuse_Voltage_C1;
+		ShmRelayModuleData->Gun1RelayOutputVolt = outputVoltage.behindRelay_Voltage_C1;
+		ShmRelayModuleData->Gun2FuseOutputVolt = outputVoltage.behindFuse_Voltage_C2;
+		ShmRelayModuleData->Gun2RelayOutputVolt = outputVoltage.behindRelay_Voltage_C2;
+
+		for (int index = 0; index < gunCount; index++)
+		{
+			if (index == 0)
+			{
+				if (_chargingData[index]->Evboard_id == 0x01)
+				{
+					_chargingData[index]->FuseChargingVoltage = ShmRelayModuleData->Gun1FuseOutputVolt;
+					_chargingData[index]->FireChargingVoltage = ShmRelayModuleData->Gun1RelayOutputVolt;
+				}
+				else if (_chargingData[index]->Evboard_id == 0x02)
+				{
+					_chargingData[index]->FuseChargingVoltage = ShmRelayModuleData->Gun2FuseOutputVolt;
+					_chargingData[index]->FireChargingVoltage = ShmRelayModuleData->Gun2RelayOutputVolt;
+				}
+			}
+			else if (index == 1)
+			{
+				_chargingData[index]->FuseChargingVoltage = ShmRelayModuleData->Gun2FuseOutputVolt;
+				_chargingData[index]->FireChargingVoltage = ShmRelayModuleData->Gun2RelayOutputVolt;
+			}
+
+			unsigned short Ovp = 0;
+			unsigned short Ocp = 0;
+			//Ovp = MIN [VOUT_MAX_VOLTAGE, EV_BATTERY_VOLTAGE] 	// 最大輸出電壓與電池電壓最大值
+			//Ocp = MIN [IOUT_MAX_CURRENT, EV_CURRENT_REQ]		// 最大輸出電流與需求電流最小值
+			if (_chargingData[index]->Type == _Type_Chademo)
+			{
+				Ovp = MaxValue(_chargingData[index]->MaximumChargingVoltage, _chargingData[index]->EvBatteryMaxVoltage);
+				Ocp = MaxValue(_chargingData[index]->PresentChargingCurrent, ShmCHAdeMOData->ev[_chargingData[index]->type_index].ChargingCurrentRequest);
+				if (_chargingData[index]->PresentChargingVoltage >= Ovp)
+				{
+					//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemChademoOutputOVP = 0x01;
+				}
+				if (_chargingData[index]->PresentChargingCurrent >= Ocp)
+				{
+					//ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SystemChademoOutputOCP = 0x01;
+				}
+			}
+			else if (_chargingData[index]->Type == _Type_CCS)
+			{
+
+			}
+		}
+	}
+}
+
+// 風扇速度
+void GetFanSpeed()
+{
+	printf("Get fan board speed \n");
+	if (Query_Fan_Speed(Uart5Fd, Addr.Fan, &fanSpeed) == PASS)
+	{
+		ShmFanModuleData->PresentFan1Speed = fanSpeed.speed[0];
+		ShmFanModuleData->PresentFan2Speed = fanSpeed.speed[1];
+		ShmFanModuleData->PresentFan3Speed = fanSpeed.speed[2];
+		ShmFanModuleData->PresentFan4Speed = fanSpeed.speed[3];
+		printf("SystemFanRotaSpeed_1 = %d \n", fanSpeed.speed[0]);
+		printf("SystemFanRotaSpeed_2 = %d \n", fanSpeed.speed[1]);
+		printf("SystemFanRotaSpeed_3 = %d \n", fanSpeed.speed[2]);
+		printf("SystemFanRotaSpeed_4 = %d \n", fanSpeed.speed[3]);
+		// Config_Fan_Speed(Uart5Fd, Addr.Fan, &fanSpeed[0]);
+		//SysInfoData (SystemFanRotaSpeed)
+	}
+}
+
+// 讀取 Relay 狀態
+void GetRelayOutputStatus()
+{
+	if (Query_Relay_Output(Uart5Fd, Addr.Relay, &regRelay) == PASS)
+	{
+		regRelay.relay_event.bits.AC_Contactor = ShmSysConfigAndInfo->SysInfo.AcContactorStatus;
+	}
+}
+
+// 確認 K1 K2 relay 的狀態
+void CheckK1K2RelayOutput(byte index)
+{
+	if (index == 0)
+	{
+		if (_chargingData[index]->Evboard_id == 0x01)
+		{
+			if (regRelay.relay_event.bits.Gun1_N == YES && regRelay.relay_event.bits.Gun1_P == YES)
+				_chargingData[index]->RelayK1K2Status = YES;
+			else
+				_chargingData[index]->RelayK1K2Status = NO;
+
+			if(_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.Gun1_N == YES	&& regRelay.relay_event.bits.CCS_Precharge == YES)
+					_chargingData[index]->RelayKPK2Status = YES;
+				else
+					_chargingData[index]->RelayKPK2Status = NO;
+			}
+		}
+		else if (_chargingData[index]->Evboard_id == 0x02)
+		{
+			if (regRelay.relay_event.bits.Gun2_N == YES && regRelay.relay_event.bits.Gun2_P == YES)
+				_chargingData[index]->RelayK1K2Status = YES;
+			else
+				_chargingData[index]->RelayK1K2Status = NO;
+
+			if(_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.Gun2_N == YES	&& regRelay.relay_event.bits.CCS_Precharge == YES)
+					_chargingData[index]->RelayKPK2Status = YES;
+				else
+					_chargingData[index]->RelayKPK2Status = NO;
+			}
+
+		}
+	}
+	else if (index == 1)
+	{
+		if (regRelay.relay_event.bits.Gun2_N == YES && regRelay.relay_event.bits.Gun2_P == YES)
+			_chargingData[index]->RelayK1K2Status = YES;
+		else
+			_chargingData[index]->RelayK1K2Status = NO;
+
+		if(_chargingData[index]->Type == _Type_CCS)
+		{
+			if (regRelay.relay_event.bits.Gun2_N == YES && regRelay.relay_event.bits.CCS_Precharge == YES)
+				_chargingData[index]->RelayKPK2Status = YES;
+			else
+				_chargingData[index]->RelayKPK2Status = NO;
+		}
+	}
+
+	if (regRelay.relay_event.bits.Gun1_Parallel_N == YES && regRelay.relay_event.bits.Gun1_Parallel_P == YES)
+		ShmSysConfigAndInfo->SysInfo.BridgeRelayStatus = YES;
+	else
+		ShmSysConfigAndInfo->SysInfo.BridgeRelayStatus = NO;
+}
+
+void GetGfdAdc()
+{
+	// define : 每 0.2 ~ 1 秒一次
+	// occur : <= 75k 歐姆 @ 150 - 750 Vdc
+	// warning : >= 100 歐姆 && <= 500 歐姆 @ 150-750 Vdc
+	if (Query_Gfd_Adc(Uart5Fd, Addr.Relay, &gfd_adc) == PASS)
+	{
+		for (int i = 0; i < gunCount; i++)
+		{
+			if (i == 0)
+			{
+				_chargingData[i]->GroundFaultStatus = gfd_adc.result_conn1;
+				if (_chargingData[i]->GroundFaultStatus == GFD_FAIL)
+				{
+					DEBUG_ERROR("GFD Fail. index = %d, R = %d, Vol = %d \n",
+							i, gfd_adc.Resister_conn1, gfd_adc.voltage_conn1);
+				}
+			}
+			else if (i == 1)
+			{
+				_chargingData[i]->GroundFaultStatus = gfd_adc.result_conn2;
+				if (_chargingData[i]->GroundFaultStatus == GFD_FAIL)
+				{
+					DEBUG_ERROR("GFD Fail. index = %d, R = %d, Vol = %d \n",
+							i, gfd_adc.Resister_conn2, gfd_adc.voltage_conn2);
+				}
+			}
+		}
+
+		//if (gfd_adc.result_conn1 != 0)
+		{
+//			printf("******************Resister_conn1 = %d, voltage_conn1 = %d, result_conn1 = %d, step = %d \n",
+//				gfd_adc.Resister_conn1,
+//				gfd_adc.voltage_conn1,
+//				gfd_adc.result_conn1,
+//				gfd_adc.rb_step_1);
+		}
+	}
+}
+
+void GetGpioInput()
+{
+	if (Query_Gpio_Input(Uart5Fd, Addr.Aux, &gpio_in) == PASS)
+	{
+		// AC Contactor Status
+		//ShmSysConfigAndInfo->SysInfo.AcContactorStatus = gpio_in.AC_Connector;
+
+		if (gpio_in.AC_MainBreaker == 1)
+		{
+			// AC Main Breaker ON
+			printf("RB AC Main Breaker. \n");
+		}
+
+		if (gpio_in.SPD == 1)
+		{
+			// SPD (雷擊保護) ON
+			printf("RB SPD. \n");
+		}
+
+		if (gpio_in.Door_Open == 1)
+		{
+			// Door Open
+			printf("RB Door Open. \n");
+		}
+
+		if (gpio_in.GFD[0] == 1)
+		{
+			// GFD_1 Trigger
+		}
+
+		if (gpio_in.GFD[1] == 1)
+		{
+			// GFD_2 Trigger
+		}
+
+		if (gpio_in.AC_Drop == 1)
+		{
+			// AC Drop
+			printf("RB AC Drop. \n");
+		}
+
+		if (gpio_in.Emergency_IO == 1)
+		{
+			// Emergency IO ON
+			printf("RB Emergency IO ON. \n");
+		}
+
+		if (gpio_in.Button_Emergency_Press == 1)
+		{
+			// Emergency button Press
+		}
+
+		if (gpio_in.Button_On_Press == 1)
+		{
+			// On button Press
+		}
+
+		if (gpio_in.Button_Off_Press == 1)
+		{
+			// Off button Press
+		}
+
+		if (gpio_in.Key_1_Press == 1)
+		{
+			// key 1 press
+		}
+
+		if (gpio_in.Key_2_Press == 1)
+		{
+			// key 2 press
+		}
+
+		if (gpio_in.Key_3_Press == 1)
+		{
+			// key 3 press
+		}
+
+		if (gpio_in.Key_4_Press == 1)
+		{
+			// key 4 press
+		}
+	}
+}
+
+// 5V 12V 24V 48V
+void GetAuxPower()
+{
+	if (Query_Aux_PowerVoltage(Uart5Fd, Addr.Fan, &auxPower) == PASS)
+	{
+		ShmSysConfigAndInfo->SysInfo.AuxPower48V = auxPower.voltage[0];
+		ShmSysConfigAndInfo->SysInfo.AuxPower24V = auxPower.voltage[1];
+		//ShmSysConfigAndInfo->SysInfo.AuxPower12V = auxPower.voltage[4];
+		//ShmSysConfigAndInfo->SysInfo.AuxPower5V = auxPower.voltage[6];
+		// aux power voltage
+		//printf("aux1 = %x, \n", auxPower.voltage[0]);
+		//printf("aux2 = %x, \n", auxPower.voltage[1]);
+	}
+}
+
+void SetFanModuleSpeed()
+{
+	// 調整風扇速度要漸進式 : 500 rpm/p
+	if (ShmFanModuleData->PresentFan1Speed != ShmFanModuleData->SetFan1Speed ||
+			ShmFanModuleData->PresentFan2Speed != ShmFanModuleData->SetFan2Speed ||
+			ShmFanModuleData->PresentFan3Speed != ShmFanModuleData->SetFan3Speed ||
+			ShmFanModuleData->PresentFan4Speed != ShmFanModuleData->SetFan4Speed)
+	{
+		FanSpeed _fanSpeed;
+
+		unsigned short speed = ShmFanModuleData->PresentFan1Speed + fanSpeedSmoothValue;
+		if (speed >= ShmFanModuleData->SetFan1Speed)
+			speed = ShmFanModuleData->SetFan1Speed;
+		_fanSpeed.speed[0] = speed & 0xff;
+		_fanSpeed.speed[1] = (speed >> 8) & 0xff;
+
+		speed = ShmFanModuleData->PresentFan2Speed + fanSpeedSmoothValue;
+		if (speed >= ShmFanModuleData->SetFan2Speed)
+			speed = ShmFanModuleData->SetFan2Speed;
+		_fanSpeed.speed[2] = speed & 0xff;
+		_fanSpeed.speed[3] = (speed >> 8) & 0xff;
+
+		speed = ShmFanModuleData->PresentFan3Speed + fanSpeedSmoothValue;
+		if (speed >= ShmFanModuleData->SetFan3Speed)
+			speed = ShmFanModuleData->SetFan3Speed;
+		_fanSpeed.speed[4] = speed & 0xff;
+		_fanSpeed.speed[5] = (speed >> 8) & 0xff;
+
+		speed = ShmFanModuleData->PresentFan4Speed + fanSpeedSmoothValue;
+		if (speed >= ShmFanModuleData->SetFan4Speed)
+			speed = ShmFanModuleData->SetFan4Speed;
+		_fanSpeed.speed[6] = speed & 0xff;
+		_fanSpeed.speed[7] = (speed >> 8) & 0xff;
+
+		if (Config_Fan_Speed(Uart5Fd, Addr.Fan, &_fanSpeed) == PASS)
+		{
+			printf("successfully Fan\n");
+		}
+	}
+}
+
+void SetRelayModuleFanSpeed()
+{
+	// 調整風扇速度要漸進式 : 100 rpm/p
+	if (ShmFanModuleData->PresentFan1Speed != ShmFanModuleData->SetFan1Speed)
+	{
+		FanSpeed _fanSpeed;
+		unsigned short speed = 0;
+
+		if (ShmFanModuleData->SetFan1Speed > ShmFanModuleData->PresentFan1Speed)
+		{
+			speed = ShmFanModuleData->PresentFan1Speed + fanSpeedSmoothValue;
+			if (speed >= ShmFanModuleData->SetFan1Speed)
+				speed = ShmFanModuleData->SetFan1Speed;
+		}
+		else
+		{
+			speed = ShmFanModuleData->PresentFan1Speed - fanSpeedSmoothValue;
+			if (speed <= 0)
+				speed = ShmFanModuleData->SetFan1Speed;
+		}
+
+		_fanSpeed.speed[0] = speed & 0xff;
+		_fanSpeed.speed[1] = (speed >> 8) & 0xff;
+		ShmFanModuleData->PresentFan1Speed = speed;
+
+		Config_Fan_Speed(Uart5Fd, Addr.Relay, &_fanSpeed);
+	}
+}
+
+void GetRelayModuleFanSpeed()
+{
+	printf("Get fan board speed \n");
+	if (Query_Fan_Speed(Uart5Fd, Addr.Relay, &fanSpeed) == PASS)
+	{
+		ShmFanModuleData->PresentFan1Speed = fanSpeed.speed[0] + (fanSpeed.speed[1] >> 8);
+		printf("SystemFanRotaSpeed_1 = %d \n", fanSpeed.speed[0]);
+	}
+}
+
+//==========================================
+// Common Function
+//==========================================
+void SetK1K2RelayStatus(byte index)
+{
+	if (_chargingData[index]->SystemStatus < S_PREPARING_FOR_EVSE)
+	{
+		if (_chargingData[index]->Evboard_id == 0x01)
+		{
+			if(regRelay.relay_event.bits.Gun1_P == YES)
+				outputRelay.relay_event.bits.Gun1_P = NO;
+			else if (regRelay.relay_event.bits.Gun1_N == YES)
+				outputRelay.relay_event.bits.Gun1_N = NO;
+
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if(regRelay.relay_event.bits.CCS_Precharge == YES)
+					outputRelay.relay_event.bits.CCS_Precharge = NO;
+			}
+		}
+		else if (_chargingData[index]->Evboard_id == 0x02)
+		{
+			if(regRelay.relay_event.bits.Gun2_P == YES)
+				outputRelay.relay_event.bits.Gun2_P = NO;
+			else if (regRelay.relay_event.bits.Gun2_N == YES)
+				outputRelay.relay_event.bits.Gun2_N = NO;
+
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if(regRelay.relay_event.bits.CCS_Precharge == YES)
+					outputRelay.relay_event.bits.CCS_Precharge = NO;
+			}
+		}
+	}
+	else if ((_chargingData[index]->SystemStatus >= S_PREPARING_FOR_EVSE && _chargingData[index]->SystemStatus <= S_CHARGING))
+	{
+		if (_chargingData[index]->Evboard_id == 0x01)
+		{
+			if(regRelay.relay_event.bits.Gun1_N == NO)
+				outputRelay.relay_event.bits.Gun1_N = YES;
+			else if (regRelay.relay_event.bits.Gun1_P == NO)
+				outputRelay.relay_event.bits.Gun1_P = YES;
+		}
+		else if (_chargingData[index]->Evboard_id == 0x02)
+		{
+			if(regRelay.relay_event.bits.Gun2_N == NO)
+				outputRelay.relay_event.bits.Gun2_N = YES;
+			else if (regRelay.relay_event.bits.Gun2_P == NO)
+				outputRelay.relay_event.bits.Gun2_P = YES;
+		}
+	}
+	else if (_chargingData[index]->SystemStatus == S_COMPLETE)
+	{
+		if (_chargingData[index]->PresentChargingCurrent <= SEFETY_SWITCH_RELAY_CUR)
+		{
+			if (_chargingData[index]->Evboard_id == 0x01)
+			{
+				if(regRelay.relay_event.bits.Gun1_P == YES)
+					outputRelay.relay_event.bits.Gun1_P = NO;
+				else if (regRelay.relay_event.bits.Gun1_N == YES)
+					outputRelay.relay_event.bits.Gun1_N = NO;
+			}
+			else if (_chargingData[index]->Evboard_id == 0x02)
+			{
+				if(regRelay.relay_event.bits.Gun2_P == YES)
+					outputRelay.relay_event.bits.Gun2_P = NO;
+				else if (regRelay.relay_event.bits.Gun2_N == YES)
+					outputRelay.relay_event.bits.Gun2_N = NO;
+			}
+		}
+	}
+	else if (_chargingData[index]->SystemStatus == S_CCS_PRECHARGE_ST0)
+	{
+		if (_chargingData[index]->Evboard_id == 0x01)
+		{
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.CCS_Precharge == NO)
+					outputRelay.relay_event.bits.CCS_Precharge = YES;
+				else if (regRelay.relay_event.bits.CCS_Precharge == YES)
+					outputRelay.relay_event.bits.Gun1_P = NO;
+			}
+		}
+		else if (_chargingData[index]->Evboard_id == 0x02)
+		{
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.CCS_Precharge == NO)
+					outputRelay.relay_event.bits.CCS_Precharge = YES;
+				else if (regRelay.relay_event.bits.CCS_Precharge == YES)
+					outputRelay.relay_event.bits.Gun2_P = NO;
+			}
+		}
+	}
+	else if (_chargingData[index]->SystemStatus == S_CCS_PRECHARGE_ST1)
+	{
+		if (_chargingData[index]->Evboard_id == 0x01)
+		{
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.Gun1_P == NO)
+					outputRelay.relay_event.bits.Gun1_P = YES;
+				else if(regRelay.relay_event.bits.Gun1_P == YES)
+					outputRelay.relay_event.bits.CCS_Precharge = NO;
+			}
+		}
+		else if (_chargingData[index]->Evboard_id == 0x02)
+		{
+			if (_chargingData[index]->Type == _Type_CCS)
+			{
+				if (regRelay.relay_event.bits.Gun2_P == NO)
+					outputRelay.relay_event.bits.Gun2_P = YES;
+				else if(regRelay.relay_event.bits.Gun2_P == YES)
+					outputRelay.relay_event.bits.CCS_Precharge = NO;
+			}
+		}
+	}
+}
+
+void SetParalleRelayStatus()
+{
+	if (gunCount >= 2)
+	{
+		if (_chargingData[0]->SystemStatus == S_BOOTING || _chargingData[1]->SystemStatus == S_BOOTING)
+		{
+			// 初始化~ 不搭橋接
+			if (regRelay.relay_event.bits.Gun1_Parallel_P == YES)
+				outputRelay.relay_event.bits.Gun1_Parallel_P = NO;
+			else if (regRelay.relay_event.bits.Gun1_Parallel_N == YES)
+				outputRelay.relay_event.bits.Gun1_Parallel_N = NO;
+		}
+		else
+		{
+			// 單槍充電中 - 搭上橋接
+			if((_chargingData[0]->IsReadyToCharging == YES && _chargingData[1]->IsReadyToCharging == NO) ||
+					(_chargingData[0]->IsReadyToCharging == NO && _chargingData[1]->IsReadyToCharging == YES))
+			{
+				if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag >= _REASSIGNED_RELAY)
+				{
+					if (regRelay.relay_event.bits.Gun1_Parallel_P == YES)
+						outputRelay.relay_event.bits.Gun1_Parallel_P = NO;
+					else if (regRelay.relay_event.bits.Gun1_Parallel_N == YES)
+						outputRelay.relay_event.bits.Gun1_Parallel_N = NO;
+				}
+				else
+				{
+					if (regRelay.relay_event.bits.Gun1_Parallel_N == NO)
+						outputRelay.relay_event.bits.Gun1_Parallel_N = YES;
+					else if (regRelay.relay_event.bits.Gun1_Parallel_P == NO)
+						outputRelay.relay_event.bits.Gun1_Parallel_P = YES;
+				}
+			}
+			else
+			{
+				// 雙槍充電中~ 不搭橋接
+				if (regRelay.relay_event.bits.Gun1_Parallel_P == YES)
+					outputRelay.relay_event.bits.Gun1_Parallel_P = NO;
+				else if (regRelay.relay_event.bits.Gun1_Parallel_N == YES)
+					outputRelay.relay_event.bits.Gun1_Parallel_N = NO;
+			}
+		}
+	}
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//creat ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("[shmat ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	 }
+	 //creat ShmStatusCodeData
+	if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmat ShmStatusCodeData NG\n");
+		#endif
+		result = FAIL;
+	}
+
+	//creat ShmFanModuleData
+	if ((MeterSMId = shmget(ShmFanBdKey, sizeof(struct FanModuleData),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmFanModuleData NG\n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmFanModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmat ShmFanModuleData NG\n");
+		#endif
+		result = FAIL;
+	 }
+	 memset(ShmFanModuleData,0,sizeof(struct FanModuleData));
+	 //creat ShmRelayModuleData
+	if ((MeterSMId = shmget(ShmRelayBdKey, sizeof(struct RelayModuleData),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmRelayModuleData NG\n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmRelayModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmat ShmRelayModuleData NG\n");
+		#endif
+		result = FAIL;
+	}
+
+	if(CHAdeMO_QUANTITY > 0)
+	{
+		if ((MeterSMId = shmget(ShmCHAdeMOCommKey, sizeof(struct CHAdeMOData),	IPC_CREAT | 0777)) < 0)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR("[shmget ShmCHAdeMOData NG \n");
+			#endif
+			return FAIL;
+		}
+		else if ((ShmCHAdeMOData = shmat(MeterSMId, NULL, 0)) == (void *) -1) {
+			#ifdef SystemLogMessage
+			DEBUG_ERROR("shmat ShmCHAdeMOData NG \n");
+			#endif
+			return FAIL;
+		}
+	}
+
+	if(CCS_QUANTITY > 0)
+	{
+		if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData),	IPC_CREAT | 0777)) < 0)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR("shmget ShmCcsData NG \n");
+			#endif
+			return FAIL;
+		}
+		else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+		{
+			#ifdef SystemLogMessage
+		   	DEBUG_ERROR("shmat ShmCcsData NG \n");
+			#endif
+			return FAIL;
+		}
+	}
+
+
+	return result;
+}
+
+int InitComPort()
+{
+	int fd;
+	struct termios tios;
+
+	fd = open(relayRs485PortName, O_RDWR);
+	if(fd <= 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Module_InternalComm. InitComPort NG\n");
+		#endif
+		if(ShmStatusCodeData!=NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed=1;
+		}
+		sleep(5);
+		return -1;
+	}
+	ioctl (fd, TCGETS, &tios);
+	tios.c_cflag = B115200 | CS8 | CLOCAL | CREAD;
+	tios.c_lflag = 0;
+	tios.c_iflag = 0;
+	tios.c_oflag = 0;
+	tios.c_cc[VMIN]=0;
+	tios.c_cc[VTIME]=(byte)0;		// timeout 0.5 second
+	tios.c_lflag=0;
+	tcflush(fd, TCIFLUSH);
+	ioctl (fd, TCSETS, &tios);
+
+	return fd;
+}
+
+//================================================
+// Main process
+//================================================
+bool FindChargingInfoData(byte target, struct ChargingInfoData **chargingData)
+{
+	for (byte index = 0; index < CHAdeMO_QUANTITY; index++) {
+		if (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index
+				== target) {
+			chargingData[target] =
+					&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < CCS_QUANTITY; index++) {
+		if (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index
+				== target) {
+			chargingData[target] =
+					&ShmSysConfigAndInfo->SysInfo.CcsChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < GB_QUANTITY; index++) {
+		if (ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index
+				== target) {
+			chargingData[target] =
+					&ShmSysConfigAndInfo->SysInfo.GbChargingData[index];
+			return true;
+		}
+	}
+
+	return false;
+}
+
+void Initialization()
+{
+	bool isPass = false;
+
+	for (byte index = 0; index < ARRAY_SIZE(outputRelay.relay_event.relay_status); index++)
+	{
+		outputRelay.relay_event.relay_status[index] = 0x00;
+	}
+
+	while(!isPass)
+	{
+		isPass = true;
+		for (byte _index = 0; _index < gunCount; _index++)
+		{
+			if (!FindChargingInfoData(_index, &_chargingData[0]))
+			{
+				DEBUG_ERROR("EvComm (main) : FindChargingInfoData false \n");
+				isPass = false;
+				break;
+			}
+		}
+	}
+}
+
+bool IsNoneMatchRelayStatus()
+{
+	bool result = false;
+
+//	printf("Real Relay, AC = %x, g1_p = %x, g1_n = %x, g2_p = %x, g2_n = %x, pre = %x, bri_p = %x, bri_n = %x \n",
+//			regRelay.relay_event.bits.AC_Contactor,
+//			regRelay.relay_event.bits.Gun1_P,
+//			regRelay.relay_event.bits.Gun1_N,
+//			regRelay.relay_event.bits.Gun2_P,
+//			regRelay.relay_event.bits.Gun2_N,
+//			regRelay.relay_event.bits.CCS_Precharge,
+//			regRelay.relay_event.bits.Gun1_Parallel_P,
+//			regRelay.relay_event.bits.Gun1_Parallel_N);
+
+	if ((regRelay.relay_event.bits.AC_Contactor != outputRelay.relay_event.bits.AC_Contactor) ||
+		(regRelay.relay_event.bits.CCS_Precharge != outputRelay.relay_event.bits.CCS_Precharge) ||
+		(regRelay.relay_event.bits.Gun1_P != outputRelay.relay_event.bits.Gun1_P) ||
+		(regRelay.relay_event.bits.Gun1_N != outputRelay.relay_event.bits.Gun1_N) ||
+		(regRelay.relay_event.bits.Gun2_P != outputRelay.relay_event.bits.Gun2_P) ||
+		(regRelay.relay_event.bits.Gun2_N != outputRelay.relay_event.bits.Gun2_N) ||
+		(regRelay.relay_event.bits.Gun1_Parallel_P != outputRelay.relay_event.bits.Gun1_Parallel_P) ||
+		(regRelay.relay_event.bits.Gun1_Parallel_N != outputRelay.relay_event.bits.Gun1_Parallel_N))
+	{
+		result = true;
+	}
+
+	return result;
+}
+
+void MatchRelayStatus()
+{
+	// 因為 AC Contactor 沒有 Feedback,所以暫時先這樣處理
+	//regRelay.relay_event.bits.AC_Contactor = outputRelay.relay_event.bits.AC_Contactor;
+	ShmSysConfigAndInfo->SysInfo.AcContactorStatus  = regRelay.relay_event.bits.AC_Contactor = outputRelay.relay_event.bits.AC_Contactor;
+	regRelay.relay_event.bits.CCS_Precharge = outputRelay.relay_event.bits.CCS_Precharge;
+	regRelay.relay_event.bits.Gun1_P = outputRelay.relay_event.bits.Gun1_P;
+	regRelay.relay_event.bits.Gun1_N = outputRelay.relay_event.bits.Gun1_N;
+	regRelay.relay_event.bits.Gun2_P = outputRelay.relay_event.bits.Gun2_P;
+	regRelay.relay_event.bits.Gun2_N = outputRelay.relay_event.bits.Gun2_N;
+	regRelay.relay_event.bits.Gun1_Parallel_P = outputRelay.relay_event.bits.Gun1_Parallel_P;
+	regRelay.relay_event.bits.Gun1_Parallel_N = outputRelay.relay_event.bits.Gun1_Parallel_N;
+}
+
+void CheckRelayStatusByADC()
+{
+	if (ShmRelayModuleData->Gun1FuseOutputVolt > 0 && ShmRelayModuleData->Gun1RelayOutputVolt > 0 &&
+			(ShmRelayModuleData->Gun1FuseOutputVolt == ShmRelayModuleData->Gun1RelayOutputVolt))
+	{
+		// Relay 前後電壓一致
+		_chargingData[0]->RelayK1K2Status = 0x01;
+	}
+	else
+		_chargingData[0]->RelayK1K2Status = 0x00;
+
+	if (ShmRelayModuleData->Gun2FuseOutputVolt > 0 && ShmRelayModuleData->Gun2RelayOutputVolt > 0 &&
+				(ShmRelayModuleData->Gun2FuseOutputVolt == ShmRelayModuleData->Gun2RelayOutputVolt))
+	{
+		// Relay 前後電壓一致
+		_chargingData[1]->RelayK1K2Status = 0x01;
+	}
+	else
+		_chargingData[1]->RelayK1K2Status = 0x00;
+}
+
+void SetGfdConfig(byte index, byte resister)
+{
+	gfd_config.index = index;
+	gfd_config.state = resister;
+
+	//printf("************************GFD Vol = %d, GFD Res = %d \n", gfd_config.reqVol, gfd_config.resister);
+	if (Config_Gfd_Value(Uart5Fd, Addr.Relay, &gfd_config) == PASS)
+	{
+//		printf("Set reqVol = %f, resister = %d \n",
+//				gfd_config.reqVol,
+//				gfd_config.resister);
+	}
+}
+
+void CableCheckDetected(byte index)
+{
+	// Cable Check
+	// 當火線上的電壓 = 車端要求的電壓電流
+	// _chargingData[targetGun]->EvBatterytargetVoltage
+	// 才可以開始偵測 1s
+	// Warning : Rgfd <= 150 歐/V 假設電壓為 500V 則~ Rgfd <= 75000 歐
+	// Pre-Warning : 150 歐/V < Rgfd <= 500 歐/V 假設電壓為 500V 則 75000 歐 < Rgfd <= 250000
+	// SO Normal : Rgfd > 500 歐/V 假設電壓為 500 V 則 Rgfd > 250000 歐
+	if ((_chargingData[index]->SystemStatus >= S_PREPARING_FOR_EVSE && _chargingData[index]->SystemStatus <= S_CHARGING) ||
+			(_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 && _chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1))
+	{
+		if (_chargingData[index]->SystemStatus == S_PREPARING_FOR_EVSE)
+		{
+			SetGfdConfig(index, GFD_CABLECHK);
+		}
+		else if (_chargingData[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 &&
+				_chargingData[index]->SystemStatus <= S_CCS_PRECHARGE_ST1)
+		{
+			SetGfdConfig(index, GFD_PRECHARGE);
+		}
+		else if (_chargingData[index]->SystemStatus <= S_CHARGING)
+		{
+			SetGfdConfig(index, GFD_CHARGING);
+		}
+	}
+	else if(_chargingData[index]->SystemStatus == S_COMPLETE || _chargingData[index]->SystemStatus == S_PREPARNING
+			|| _chargingData[index]->SystemStatus == S_IDLE)
+	{
+		SetGfdConfig(index, GFD_IDLE);
+	}
+}
+
+int main(void)
+{
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if(ShmStatusCodeData!=NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		sleep(5);
+		return 0;
+	}
+	// Open Uart5 for RB
+	Uart5Fd = InitComPort();
+	Initialization();
+	sleep(1);
+
+	if(Uart5Fd < 0)
+	{
+		printf ("open port error. \n");
+		return 0;
+	}
+
+	outputRelay.relay_event.bits.AC_Contactor = 0x00;
+	//outputRelay.relay_event.bits.CCS_Precharge = 0x00;
+	//outputRelay.relay_event.bits.Gun1_Parallel_P = 0x01;
+	//outputRelay.relay_event.bits.Gun1_Parallel_N = 0x01;
+	//outputRelay.relay_event.bits.Gun1_N = 0x01;
+	//outputRelay.relay_event.bits.Gun2_N = 0x01;
+	//outputRelay.relay_event.bits.Gun2_P = 0x01;
+	Config_Relay_Output(Uart5Fd, Addr.Relay, &outputRelay);
+
+	gettimeofday(&_priority_time, NULL);
+	bool printRelayStatus = false;
+	for(;;)
+	{
+		bool isCharging = false;
+		// 程序開始之前~ 必須先確定 FW 版本與硬體版本,確認後!!~ 該模組才算是真正的 Initial Comp.
+		if (ShmRelayModuleData->SelfTest_Comp == NO)
+		{
+			GetFwAndHwVersion_Relay();
+			sleep(1);
+		}
+
+		if (ShmFanModuleData->SelfTest_Comp == NO)
+		{
+			//GetFwAndHwVersion_Fan();
+			sleep(1);
+		}
+
+		if (ShmRelayModuleData->SelfTest_Comp == YES)
+		{
+			// ==============優先權最高 10 ms ==============
+			// 輸出電壓
+			GetPersentOutputVol();
+
+			// 三相輸入電壓
+			GetPresentInputVol();
+
+			// 讀取當前 relay 狀態
+			GetRelayOutputStatus();
+
+			for (int i = 0; i < gunCount; i++)
+			{
+				// Cable check (Set)
+				CableCheckDetected(i);
+
+				// check k1 k2 relay 狀態
+				CheckK1K2RelayOutput(i);
+
+				// 依據當前各槍的狀態選擇 搭上/放開 Relay
+				SetK1K2RelayStatus(i);
+
+				if (_chargingData[i]->SystemStatus == S_IDLE)
+					gfdChkFailCount[i] = 0;
+
+				if (_chargingData[i]->SystemStatus == S_BOOTING	||
+					(_chargingData[i]->SystemStatus >= S_PREPARNING && _chargingData[i]->SystemStatus <= S_COMPLETE) ||
+					(_chargingData[i]->SystemStatus >= S_CCS_PRECHARGE_ST0 && _chargingData[i]->SystemStatus <= S_CCS_PRECHARGE_ST1))
+				{
+					_chargingData[i]->IsReadyToCharging = YES;
+					isCharging = true;
+				}
+				else
+					_chargingData[i]->IsReadyToCharging = NO;
+			}
+			// Cable check (Get)
+			GetGfdAdc();
+
+			SetParalleRelayStatus();
+
+			// 搭上 AC Contactor
+			if (isCharging)
+				outputRelay.relay_event.bits.AC_Contactor = YES;
+			else
+				outputRelay.relay_event.bits.AC_Contactor = NO;
+
+			// 搭上/鬆開 Relay
+			// 放開 Relay 之前要先確認輸出的電壓電流是否已經降到某個值
+			if(IsNoneMatchRelayStatus())
+			{
+				printRelayStatus = false;
+				if (Config_Relay_Output(Uart5Fd, Addr.Relay, &outputRelay))
+				{}
+			}
+			else
+			{
+				if (!printRelayStatus)
+				{
+					printf("Match Relay, AC = %x, g1_p = %x, g1_n = %x, g2_p = %x, g2_n = %x, pre = %x, bri_p = %x, bri_n = %x \n",
+							regRelay.relay_event.bits.AC_Contactor,
+							regRelay.relay_event.bits.Gun1_P,
+							regRelay.relay_event.bits.Gun1_N,
+							regRelay.relay_event.bits.Gun2_P,
+							regRelay.relay_event.bits.Gun2_N,
+							regRelay.relay_event.bits.CCS_Precharge,
+							regRelay.relay_event.bits.Gun1_Parallel_P,
+							regRelay.relay_event.bits.Gun1_Parallel_N);
+				}
+				printRelayStatus = true;
+			}
+		}
+
+		if (ShmFanModuleData->SelfTest_Comp == YES)
+		{
+			//GetFanSpeed();
+
+			if (GetTimeoutValue(_priority_time) / 1000 >= 1000)
+			{
+				gettimeofday(&_priority_time, NULL);
+				if (isCharging)
+				{
+					if (ShmFanModuleData->PresentFan1Speed < MAX_FAN_SPEED ||
+						ShmFanModuleData->PresentFan2Speed < MAX_FAN_SPEED ||
+						ShmFanModuleData->PresentFan3Speed < MAX_FAN_SPEED ||
+						ShmFanModuleData->PresentFan4Speed < MAX_FAN_SPEED)
+					{
+						ShmFanModuleData->SetFan1Speed = MAX_FAN_SPEED;
+						ShmFanModuleData->SetFan2Speed = MAX_FAN_SPEED;
+						ShmFanModuleData->SetFan3Speed = MAX_FAN_SPEED;
+						ShmFanModuleData->SetFan4Speed = MAX_FAN_SPEED;
+					}
+				}
+				else
+				{
+					if (ShmFanModuleData->PresentFan1Speed > MIN_FAN_SPEED ||
+						ShmFanModuleData->PresentFan2Speed < MAX_FAN_SPEED ||
+						ShmFanModuleData->PresentFan3Speed < MAX_FAN_SPEED ||
+						ShmFanModuleData->PresentFan4Speed < MAX_FAN_SPEED)
+					{
+						ShmFanModuleData->SetFan1Speed = MIN_FAN_SPEED;
+						ShmFanModuleData->SetFan2Speed = MIN_FAN_SPEED;
+						ShmFanModuleData->SetFan3Speed = MIN_FAN_SPEED;
+						ShmFanModuleData->SetFan4Speed = MIN_FAN_SPEED;
+					}
+				}
+				//SetFanModuleSpeed();
+			}
+		}
+
+		usleep(10000);
+	}
+
+	return FAIL;
+}

BIN
EVSE/Projects/DS60-120/Apps/Module_InternalComm.o


+ 150 - 0
EVSE/Projects/DS60-120/Apps/Module_LcmContro.h

@@ -0,0 +1,150 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<stdbool.h>
+#include	"../../define.h"
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+
+typedef unsigned char 			byte;
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct FanModuleData			*ShmFanModuleData;
+
+#define CMD_TITLE_1				0x5A
+#define CMD_TITLE_2				0xA5
+#define CMD_READ				0x80
+#define CMD_WRITE				0x81
+#define CMD_MULTI_WRITE			0x82
+#define CMD_MULTI_READ			0x83
+
+#define CMD_BACKLIGHT			0x01
+#define CMD_REGISTER			0x03
+
+int _port;
+//char* pPortName = "/dev/ttyO2";
+char* pPortName = "/dev/ttyS3";
+char* moduleName = "DMT80480T070_09WT";
+byte _totalCount = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+struct ChargingInfoData *_chargingInfoData[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+// 當前選擇的槍號
+short _currentPage = _LCM_NONE;
+byte _gunIndex = 0;
+byte _idlePageRotate = 1;
+bool _backend_conn_status = false;
+bool _wifi_conn_status = false;
+bool _net_conn_status = false;
+
+// LCM - HW
+byte _everyPageRollChange = 0;
+short __conn_status = 0x0030;
+short __ethernet_status = 0x0036;
+short __wifi_status = 0x003C;
+
+short __sel_gun_btn = 0x0040;
+short __ret_home_btn = 0x0042;
+
+short __qr_code = 0x0050;
+
+short __plug_in_arrow = 0x0060;
+
+short __conn_line = 0x0066;
+
+short __gun_type_index = 0x0070;
+short __qr_code_pre = 0x0080;
+
+short __side_top = 0x0090;
+short __side_down = 0x0092;
+
+short __conn_line_chag = 0x0096;
+short __batt_map = 0x0100;
+short __soc_value_charging = 0x0102;
+short __remain_time_map = 0x0106;
+short __power_map = 0x0108;
+short __energy_map = 0x010A;
+short __remain_time_tx = 0x0110;
+short __output_eng_tx = 0x0120;
+short __total_out_eng_tx = 0x0130;
+short __conn_line_comp = 0x0140;
+
+// ICON ID
+byte _disappear = 0;
+byte _disconnect = 1;
+byte _connect = 2;
+byte _warning = 3;
+byte _arrow_dark = 4;
+byte _arrow_light = 5;
+byte _ethernet_disconnect = 6;
+byte _ethernet_connect = 7;
+byte _wifi_disconnect = 8;
+byte _wifi_connect = 9;
+byte _logo = 10;
+byte _conn_map1 = 11;
+byte _conn_map2 = 12;
+byte _sel_gun_btn = 13;
+byte _back_home_btn = 14;
+byte _stop_charging_btn = 15;
+byte _stop_charging_btn_scan = 16;
+byte _chademo_dark = 17;
+byte _ccs_dark = 18;
+byte _actype_dark = 19;
+byte _chademo_light = 20;
+byte _ccs_light = 21;
+byte _actype_light = 22;
+byte _side_rfid_1 = 23;
+byte _side_qr_1 = 24;
+byte _side_app_1 = 25;
+byte _side_rfid_2 = 26;
+byte _side_qr_2 = 27;
+byte _side_app_2 = 28;
+byte _charging_map1 = 29;
+byte _charging_map2 = 30;
+byte _battery_cap_20 = 31;
+byte _battery_cap_40 = 32;
+byte _battery_cap_60 = 33;
+byte _battery_cap_80 = 34;
+byte _battery_cap_100 = 35;
+byte _battery_map = 36;
+byte _power_map = 37;
+byte _time_map = 38;
+byte _complete_map = 39;
+byte _battery_soc_20 = 40;
+byte _battery_soc_40 = 41;
+byte _battery_soc_60 = 42;
+byte _battery_soc_80 = 43;
+byte _battery_soc_100 = 44;
+byte _battery_eng_map = 45;
+byte _money_map = 46;
+byte _elapse_time_map = 47;
+
+

BIN
EVSE/Projects/DS60-120/Apps/Module_LcmControl


+ 871 - 0
EVSE/Projects/DS60-120/Apps/Module_LcmControl.c

@@ -0,0 +1,871 @@
+#include "Module_LcmContro.h"
+
+int StoreLogMsg(const char *fmt, ...);
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+char* getTimeString(void);
+
+//=================================
+// Common routine
+//=================================
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+char* getTimeString(void)
+{
+	char *result=malloc(21);
+	time_t timep;
+	struct tm *p;
+	time(&timep);
+	p=gmtime(&timep);
+
+	sprintf(result, "[%04d-%02d-%02d %02d:%02d:%02d]", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, p->tm_hour, p->tm_hour, p->tm_sec);
+
+	return result;
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//creat ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmSysConfigAndInfo NG\n");
+		#endif
+    	result = FAIL;
+   	 }
+    else
+    {}
+
+   	 //creat ShmStatusCodeData
+   	 if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+   		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
+		#endif
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmStatusCodeData NG\n");
+		#endif
+    	result = FAIL;
+   	}
+    else
+    {}
+
+    return result;
+}
+
+//==========================================
+// Open and Close RS232 and R/W
+//==========================================
+int CreateCommunicationLcmPort()
+{
+	int fd;
+	struct termios tios;
+
+	fd = open(pPortName, O_RDWR);
+	if (fd <= 0) {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("open /dev/ttyS3 NG \n");
+		#endif
+		return -1;
+	}
+	ioctl(fd, TCGETS, &tios);
+	tios.c_cflag = B115200 | CS8 | CLOCAL | CREAD;
+	tios.c_lflag = 0;
+	tios.c_iflag = 0;
+	tios.c_oflag = 0;
+	tios.c_cc[VMIN] = 0;
+	tios.c_cc[VTIME] = (unsigned char) 5;
+	tios.c_lflag = 0;
+	tcflush(fd, TCIFLUSH);
+	ioctl(fd, TCSETS, &tios);
+
+	return fd;
+}
+
+void CloseCommunicationLcmPort()
+{
+	close(_port);
+}
+
+void WriteCmdToLcm(byte *cmd, byte cmdLen)
+{
+	int len = write(_port, cmd, cmdLen);
+	if(len >= sizeof(cmd))
+	{
+		//printf("Write cmd to LCM successfully. \n");
+	}
+}
+
+void ReadMsgFromLcm(byte *msg, byte readLen)
+{
+	read(_port, msg, readLen);
+
+	if(*msg == CMD_TITLE_1 && *(msg + 1) == CMD_TITLE_2)
+	{
+		if(*(msg + 3) == CMD_WRITE)
+		{
+			switch (*(msg + 4))
+			{
+				case CMD_REGISTER:
+				{
+					// 頁面
+					_currentPage = (unsigned short) (*(msg + 6) << 8) + (unsigned short) *(msg + 7);
+				}
+				break;
+			}
+		}
+		else if (*(msg + 3) == CMD_MULTI_READ)
+		{
+//			switch ((unsigned short) (*(msg + 4) << 8) + (unsigned short) *(msg + 5))
+//			{
+//				case BUTTON_GUN_INDEX:
+//				{
+//					// 當前選的槍號
+//					_curGunIndex = (*(msg + 8));
+//				}
+//				break;
+//			}
+		}
+	}
+
+//	for (byte idx = 0; idx < len; idx++)
+//		printf("[system_command]-RX: %X\n", *(msg + idx));
+}
+
+//================================================
+// Function
+//================================================
+void ChangeToOtherPage(short newPage)
+{
+	byte cmd[7];
+	memset(cmd, 0x00, sizeof(cmd));
+
+	cmd[0] = CMD_TITLE_1;
+	cmd[1] = CMD_TITLE_2;
+	cmd[2] = 0x02 + sizeof(newPage);
+	cmd[3] = CMD_READ;
+	cmd[4] = CMD_REGISTER;
+	cmd[5] = newPage >> 8;
+	cmd[6] = newPage & 0x00FF;
+
+	WriteCmdToLcm(cmd, ARRAY_SIZE(cmd));
+	usleep(100000);
+}
+
+void ChangeBackLight(bool islight)
+{
+	byte value = 0x01;
+
+	if (islight)
+	{
+		value = 0x20;
+	}
+	byte 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;
+
+	WriteCmdToLcm(cmd, ARRAY_SIZE(cmd));
+	usleep(100000);
+}
+
+void GetCurrentPage()
+{
+	byte cmd[6];
+	memset(cmd, 0x00, sizeof(cmd));
+	byte msg[8];
+	memset(msg, 0x00, sizeof(msg));
+
+	cmd[0] = CMD_TITLE_1;
+	cmd[1] = CMD_TITLE_2;
+	cmd[2] = 0x03;				// 底下總長度
+	cmd[3] = CMD_WRITE;
+	cmd[4] = CMD_REGISTER;
+	cmd[5] = 0x02;
+
+	WriteCmdToLcm(cmd, ARRAY_SIZE(cmd));
+	usleep(100000);
+	ReadMsgFromLcm(msg, ARRAY_SIZE(msg));
+}
+
+void DisplayValueToLcm(short address, byte *data, byte len)
+{
+	byte cmd[256];
+	memset(cmd, 0x00, sizeof(cmd));
+
+	cmd[0] = CMD_TITLE_1;
+	cmd[1] = CMD_TITLE_2;
+	cmd[2] = 0x03 + len;
+	cmd[3] = CMD_MULTI_WRITE;
+	cmd[4] = address >> 8;
+	cmd[5] = address & 0x00FF;
+
+	for(byte count = 0; count < len; count++)
+	{
+		cmd[6 + count] = *(data + count);
+	}
+
+	WriteCmdToLcm(cmd, cmd[2] + 3);
+}
+
+void ChangeDisplay2Value(short address, short value)
+{
+	byte data[2];
+	data[0] = value >> 8;
+	data[1] = value & 0x00FF;
+
+	DisplayValueToLcm(address, data, sizeof(data));
+}
+
+void GetBtnStatus(short address, byte len)
+{
+	byte cmd[8];
+	memset(cmd, 0x00, sizeof(cmd));
+	byte msg[8];
+	memset(msg, 0x00, sizeof(msg));
+
+	cmd[0] = CMD_TITLE_1;
+	cmd[1] = CMD_TITLE_2;
+	cmd[2] = 0x03 + len;
+	cmd[3] = CMD_MULTI_READ;
+	cmd[4] = address >> 8;
+	cmd[5] = address & 0x00FF;
+	cmd[6] = 0x00 + len;
+
+	WriteCmdToLcm(cmd, cmd[2] + 3);
+	usleep(100000);
+	ReadMsgFromLcm(msg, (len * 2) + sizeof(msg));
+}
+
+//================================================
+// Warning process
+//================================================
+void string2ByteArray(unsigned char *input, byte *output)
+{
+    int loop;
+    int i;
+
+    loop = 0;
+    i = 0;
+
+    while(input[loop] != '\0')
+    {
+        output[i++] = input[loop++];
+    }
+    output[loop] = '\0';
+}
+
+void ChangeWarningFunc()
+{
+	byte cmd[7];
+	byte i = 0;
+	//printf("ChangeWarningFunc \n");
+	// 最多一次五筆
+	//printf("LCM PageIndex = %d \n", ShmSysConfigAndInfo->SysWarningInfo.PageIndex);
+	//printf("WarningCount = %d \n", ShmSysConfigAndInfo->SysWarningInfo.WarningCount);
+	for(i = 0; (i + ShmSysConfigAndInfo->SysWarningInfo.PageIndex * 5) < ShmSysConfigAndInfo->SysWarningInfo.WarningCount; i++)
+	{
+		memset(cmd, 0x00, sizeof(cmd));
+		if(i >= 5)
+		{
+			break;
+		}
+		//error code
+		string2ByteArray(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[i + ShmSysConfigAndInfo->SysWarningInfo.PageIndex * 5][0], cmd);
+		DisplayValueToLcm(0x0010 + (i * 6), cmd, sizeof(cmd));
+		//警告標示
+		memset(cmd, 0x00, sizeof(cmd));
+
+		cmd[0] = 0x00;
+		cmd[1] = 0x01;
+		DisplayValueToLcm(0x0002 + (i * 2), cmd, 2);
+	}
+
+	memset(cmd, 0x00, sizeof(cmd));
+	for(; i < 5; i++)
+	{
+		DisplayValueToLcm(0x0010 + (i * 6), cmd, sizeof(cmd));
+		DisplayValueToLcm(0x0002 + (i * 2), cmd, 2);
+	}
+}
+
+//================================================
+// QR Code process
+//================================================
+void ChangeQrCode_Idle(char *input)
+{
+	int len = strlen(input);
+	byte cmd[len];
+
+	int loop = 0;
+	int i = 0;
+
+	while(input[loop] != '\0')
+	{
+		cmd[i++] = input[loop++];
+	}
+
+	DisplayValueToLcm(__qr_code, cmd, len);
+}
+
+void ChangeQrCode_Charge(char *input)
+{
+	int len = strlen(input);
+	byte cmd[len];
+
+	int loop = 0;
+	int i = 0;
+
+	while(input[loop] != '\0')
+	{
+		cmd[i++] = input[loop++];
+	}
+
+	DisplayValueToLcm(__qr_code_pre, cmd, len);
+}
+
+//================================================
+// Change current page
+//================================================
+void ChangeCurPage()
+{
+	//printf("cur = %d, new = %d \n", _currentPage, ShmSysConfigAndInfo->SysInfo.PageIndex);
+	if (_currentPage != ShmSysConfigAndInfo->SysInfo.PageIndex)
+	{
+		_currentPage = ShmSysConfigAndInfo->SysInfo.PageIndex;
+		ChangeToOtherPage(_currentPage);
+		_everyPageRollChange = 0;
+	}
+}
+
+//================================================
+// Main process
+//================================================
+byte demoCount = 0;
+void DemoFunction()
+{
+	if (demoCount == 0)
+	{
+		ShmSysConfigAndInfo->SysWarningInfo.WarningCount = 6;
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[0][0], "000001", 7);
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[1][0], "000002", 7);
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[2][0], "000003", 7);
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[3][0], "000004", 7);
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[4][0], "000005", 7);
+		memcpy(&ShmSysConfigAndInfo->SysWarningInfo.WarningCode[5][0], "000006", 7);
+	}
+	else
+	{
+		if (demoCount == 20) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_IDLE;
+		} else if (demoCount == 80) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_AUTHORIZING;
+		} else if (demoCount == 100) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_AUTHORIZ_COMP;
+		} else if (demoCount == 120) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_AUTHORIZ_FAIL;
+		} else if (demoCount == 140) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_PRE_CHARGE;
+		} else if (demoCount == 180) {
+			ShmSysConfigAndInfo->SysInfo.PageIndex = _LCM_CHARGING;
+		}
+	}
+
+	if (demoCount < 180)
+		demoCount++;
+}
+
+//================================================
+// Main process
+//================================================
+bool FindChargingInfoData(byte target, struct ChargingInfoData **_chargingData)
+{
+	for (byte index = 0; index < CHAdeMO_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == target)
+		{
+			_chargingData[target] = &ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < CCS_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == target)
+		{
+			_chargingData[target] = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < GB_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == target)
+		{
+			_chargingData[target] = &ShmSysConfigAndInfo->SysInfo.GbChargingData[index];
+			return true;
+		}
+	}
+
+	return false;
+}
+
+void ChangeBattMapAndValue(short page, int soc)
+{
+//	srand(time(NULL));
+//	int min = 10;
+//	int max = 90;
+//	soc = rand() % (max - min + 1) + min;
+
+	if (page == _LCM_CHARGING)
+	{
+		if (soc < 20)
+			ChangeDisplay2Value(__batt_map, _battery_cap_20);
+		else if (soc >= 20 && soc < 40)
+			ChangeDisplay2Value(__batt_map, _battery_cap_40);
+		else if (soc >= 40 && soc < 60)
+			ChangeDisplay2Value(__batt_map, _battery_cap_60);
+		else if (soc >= 60 && soc < 80)
+			ChangeDisplay2Value(__batt_map, _battery_cap_80);
+		else if (soc >= 80 && soc <= 100)
+			ChangeDisplay2Value(__batt_map, _battery_cap_100);
+	}
+	else if (page == _LCM_COMPLETE)
+	{
+		if (soc < 20)
+			ChangeDisplay2Value(__batt_map, _battery_soc_20);
+		else if (soc >= 20 && soc < 40)
+			ChangeDisplay2Value(__batt_map, _battery_soc_40);
+		else if (soc >= 40 && soc < 60)
+			ChangeDisplay2Value(__batt_map, _battery_soc_60);
+		else if (soc >= 60 && soc < 80)
+			ChangeDisplay2Value(__batt_map, _battery_soc_80);
+		else if (soc >= 80 && soc <= 100)
+			ChangeDisplay2Value(__batt_map, _battery_soc_100);
+	}
+
+	byte cmd[4];
+	byte value[4];
+
+	memset(cmd, 0x00, sizeof(cmd));
+	sprintf((char *)value, "%d%%", soc);
+	string2ByteArray(value, cmd);
+	DisplayValueToLcm(__soc_value_charging, cmd, sizeof(cmd));
+}
+
+void ChangeRemainTime(int sec)
+{
+	int h, m, s;
+	byte cmd[10];
+	byte value[10];
+
+	memset(cmd, 0x00, sizeof(cmd));
+
+//	srand(time(NULL));
+//	int min = 0;
+//	int max = 65536;
+//	sec = rand() % (max - min + 1) + min;
+
+	h = (sec / 3600);
+	m = (sec - (3600 * h)) / 60;
+	s = (sec - (3600 * h) - (m * 60));
+	sprintf((char *)value, "%02d:%02d:%02d", h, m, s);
+	string2ByteArray(value, cmd);
+	DisplayValueToLcm(__remain_time_tx, cmd, sizeof(cmd));
+}
+
+void ChangeChargingPowerValue(float pow)
+{
+	byte cmd[10];
+	byte value[10];
+
+	memset(cmd, 0x00, sizeof(cmd));
+
+//	float min = 0.0;
+//	float max = 50;
+//	pow = (max - min) * rand() / (RAND_MAX + 1.0) + min;
+
+	sprintf((char *) value, "%.1f kW", pow);
+	string2ByteArray(value, cmd);
+	DisplayValueToLcm(__output_eng_tx, cmd, sizeof(cmd));
+}
+
+void RefreshPageAnimation(byte value)
+{
+	switch(_currentPage)
+	{
+		case _LCM_IDLE:
+		{
+			if (value == 0)
+			{
+				ChangeToOtherPage(_currentPage);
+			}
+			else if (value == 15)
+			{
+				ChangeToOtherPage(_currentPage + 1);
+			}
+			else if (value == 30)
+			{
+				ChangeToOtherPage(_currentPage + 2);
+			}
+
+			_everyPageRollChange > 45 ? _everyPageRollChange = 0 : _everyPageRollChange++;
+		}
+			break;
+		case _LCM_WAIT_FOR_PLUG:
+		{
+			if(_everyPageRollChange == 0)
+				ChangeDisplay2Value(__plug_in_arrow, _arrow_dark);
+			else if(_everyPageRollChange == 15)
+				ChangeDisplay2Value(__plug_in_arrow, _arrow_light);
+
+			_everyPageRollChange > 30 ? _everyPageRollChange = 0 : _everyPageRollChange++;
+		}
+			break;
+		case _LCM_PRE_CHARGE:
+		case _LCM_CHARGING:
+		case _LCM_COMPLETE:
+		{
+			if (_currentPage == _LCM_PRE_CHARGE)
+			{
+				if (_everyPageRollChange == 0 || _everyPageRollChange == 22)
+					ChangeDisplay2Value(__conn_line, _conn_map1);
+				else if (_everyPageRollChange == 11 || _everyPageRollChange == 33)
+					ChangeDisplay2Value(__conn_line, _conn_map2);
+			}
+			else if (_currentPage == _LCM_CHARGING)
+			{
+				if (_everyPageRollChange == 0 || _everyPageRollChange == 22)
+					ChangeDisplay2Value(__conn_line_chag, _charging_map1);
+				else if (_everyPageRollChange == 11 || _everyPageRollChange == 33)
+					ChangeDisplay2Value(__conn_line_chag, _charging_map2);
+			}
+			else if (_currentPage == _LCM_COMPLETE)
+			{
+				if (_everyPageRollChange == 0)
+					ChangeDisplay2Value(__conn_line_comp, _complete_map);
+			}
+
+			if (_totalCount == 2 && _currentPage != _LCM_PRE_CHARGE)
+			{
+				byte index = 0;
+				for (index = 0; index < _totalCount; index++) {
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected != index)
+					{
+						break;
+					}
+				}
+
+				if (_chargingInfoData[index]->SystemStatus == S_IDLE)
+				{
+					ChangeDisplay2Value(__sel_gun_btn, _disappear);
+					if(value == 0)
+					{
+						ChangeDisplay2Value(__side_top, _side_rfid_1);
+						ChangeDisplay2Value(__side_down, _side_rfid_2);
+					}
+					else if (value == 15)
+					{
+						ChangeDisplay2Value(__side_top, _side_qr_1);
+						ChangeDisplay2Value(__side_down, _side_qr_2);
+					}
+					else if (value == 30)
+					{
+						ChangeDisplay2Value(__side_top, _side_app_1);
+						ChangeDisplay2Value(__side_down, _side_app_2);
+					}
+				}
+				else
+				{
+					ChangeDisplay2Value(__sel_gun_btn, _sel_gun_btn);
+					ChangeDisplay2Value(__side_top, _disappear);
+					ChangeDisplay2Value(__side_down, _disappear);
+					ChangeDisplay2Value(__qr_code_pre, _disappear);
+				}
+			}
+			else
+			{
+				ChangeDisplay2Value(__sel_gun_btn, _disappear);
+				ChangeDisplay2Value(__side_top, _disappear);
+				ChangeDisplay2Value(__side_down, _disappear);
+				ChangeDisplay2Value(__qr_code_pre, _disappear);
+			}
+
+			_everyPageRollChange >= 45 ? _everyPageRollChange = 0 : _everyPageRollChange++;
+		}
+			break;
+	}
+}
+
+void RefreshConnStatus()
+{
+	// Wifi priority is higher than Ethernet
+	if (ShmSysConfigAndInfo->SysConfig.AthInterface.WifiNetworkConn == 0x01)
+	{
+		if (!_wifi_conn_status)
+		{
+			_wifi_conn_status = true;
+			ChangeDisplay2Value(__wifi_status, _wifi_connect);
+			ChangeDisplay2Value(__ethernet_status, _disappear);
+		}
+	}
+	else
+	{
+		if(_wifi_conn_status)
+		{
+			_wifi_conn_status = false;
+			ChangeDisplay2Value(__wifi_status, _disappear);
+		}
+	}
+
+	if (!_wifi_conn_status)
+	{
+		if (ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomNetworkConn == PASS)
+		{
+			if(!_net_conn_status)
+			{
+				_net_conn_status = true;
+				ChangeDisplay2Value(__ethernet_status, _ethernet_connect);
+			}
+		}
+		else
+		{
+			if(_net_conn_status)
+			{
+				_net_conn_status = false;
+				ChangeDisplay2Value(__ethernet_status, _ethernet_disconnect);
+			}
+		}
+	}
+
+	// 連線到後台
+
+}
+
+void ProcessPageInfo()
+{
+	switch(_currentPage)
+	{
+		case _LCM_IDLE:
+		{
+			// QR Code 處理
+			ChangeQrCode_Idle("http://google.com.tw");
+		}
+			break;
+		case _LCM_PRE_CHARGE:
+		case _LCM_CHARGING:
+		case _LCM_COMPLETE:
+		{
+			// gun type and charging info
+			for(byte i = 0; i < _totalCount; i++)
+			{
+				switch(_chargingInfoData[i]->Type)
+				{
+					case _Type_Chademo:
+					{
+						if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == i)
+						{
+							ChangeDisplay2Value(__gun_type_index + (i * 2), _chademo_light);
+						}
+						else
+						{
+							ChangeDisplay2Value(__gun_type_index + (i * 2), _chademo_dark);
+						}
+					}
+						break;
+					case _Type_CCS:
+					{
+						if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == i)
+						{
+							ChangeDisplay2Value(__gun_type_index + (i * 2), _ccs_light);
+						}
+						else
+						{
+							ChangeDisplay2Value(__gun_type_index + (i * 2), _ccs_dark);
+						}
+					}
+						break;
+				}
+
+				if (_currentPage == _LCM_CHARGING)
+				{
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == i)
+					{
+						ChangeBattMapAndValue(_LCM_CHARGING, _chargingInfoData[i]->EvBatterySoc);
+						if (_chargingInfoData[i]->RemainChargingDuration < 0)
+							ChangeRemainTime(_chargingInfoData[i]->RemainChargingDuration);
+						ChangeChargingPowerValue(_chargingInfoData[i]->PresentChargingPower);
+					}
+				}
+				else if (_currentPage == _LCM_COMPLETE)
+				{
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == i)
+					{
+						ChangeBattMapAndValue(_LCM_COMPLETE, _chargingInfoData[i]->EvBatterySoc);
+						if (_chargingInfoData[i]->RemainChargingDuration < 0)
+							ChangeRemainTime(_chargingInfoData[i]->RemainChargingDuration);
+						ChangeChargingPowerValue(_chargingInfoData[i]->PresentChargingPower);
+					}
+				}
+			}
+
+			// gun btn and QR code
+			if (_totalCount == 2 && _currentPage != _LCM_PRE_CHARGE)
+			{
+				byte index = 0;
+				for(index = 0; index < _totalCount; index++)
+				{
+					if(ShmSysConfigAndInfo->SysInfo.CurGunSelected != index)
+					{
+						break;
+					}
+				}
+
+				if (_chargingInfoData[index]->SystemStatus == S_IDLE || _chargingInfoData[index]->SystemStatus == S_BOOTING)
+				{
+					// QR Code 處理
+					ChangeQrCode_Charge("http://google.com.tw");
+				}
+				else
+				{
+					ChangeDisplay2Value(__sel_gun_btn, _disappear);
+				}
+			}
+		}
+			break;
+	}
+}
+
+void Initialization()
+{
+	strcpy((char *)ShmSysConfigAndInfo->SysInfo.LcmHwRev, moduleName);
+
+	bool isPass = false;
+	byte count = 5;
+	while(!isPass && count > 0)
+	{
+		isPass = true;
+		for (byte _index = 0; _index < _totalCount; _index++)
+		{
+			if (!FindChargingInfoData(_index, &_chargingInfoData[0]))
+			{
+				DEBUG_ERROR("EvComm (main) : FindChargingInfoData false \n");
+				isPass = false;
+				count--;
+				break;
+			}
+		}
+	}
+
+	if (count == 0)
+		printf("LCM Initialization Gun Fail.............\n");
+}
+
+int main(void)
+{
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if (ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory =	1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	_port = CreateCommunicationLcmPort();
+	byte changeWarningPriority = 0;
+	byte curWarningCount = 255;
+	//ChangeBackLight(true);
+	Initialization();
+
+	while(_port != -1)
+	{
+		//DemoFunction();
+
+		// Warning 處理
+		if(curWarningCount != ShmSysConfigAndInfo->SysWarningInfo.WarningCount)
+		{
+			changeWarningPriority = 0;
+			ShmSysConfigAndInfo->SysWarningInfo.PageIndex = 0;
+			curWarningCount = ShmSysConfigAndInfo->SysWarningInfo.WarningCount;
+			ChangeWarningFunc();
+		}
+		else if (ShmSysConfigAndInfo->SysWarningInfo.WarningCount > 5 && changeWarningPriority == 0)
+		{
+			// 當有兩頁 Warning 則每隔三秒改變一次
+			if(ShmSysConfigAndInfo->SysWarningInfo.PageIndex == 0)
+				ShmSysConfigAndInfo->SysWarningInfo.PageIndex = 1;
+			else
+				ShmSysConfigAndInfo->SysWarningInfo.PageIndex = 0;
+
+			ChangeWarningFunc();
+		}
+
+		// 頁面資訊處理
+		ProcessPageInfo();
+
+		// 網路 - wifi - 連線訊號處理
+		RefreshConnStatus();
+
+		// 換頁處理
+		ChangeCurPage();
+
+		RefreshPageAnimation(_everyPageRollChange);
+
+		changeWarningPriority >= 30 ? changeWarningPriority = 0 : changeWarningPriority++;
+		usleep(100000);
+	}
+
+	CloseCommunicationLcmPort();
+	return FAIL;
+}

BIN
EVSE/Projects/DS60-120/Apps/Module_LcmControl.o


BIN
EVSE/Projects/DS60-120/Apps/Module_PrimaryComm


+ 361 - 0
EVSE/Projects/DS60-120/Apps/Module_PrimaryComm.c

@@ -0,0 +1,361 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include	"../../define.h"
+#include	"PrimaryComm.h"
+#include 	<stdbool.h>
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+
+typedef unsigned char 		byte;
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct PrimaryMcuData			*ShmPrimaryMcuData;
+
+void trim(char *s);
+int mystrcmp(char *p1,char *p2);
+void substr(char *dest, const char* src, unsigned int start, unsigned int cnt);
+void split(char **arr, char *str, const char *del);
+
+int Uart1Fd;
+char *priPortName = "/dev/ttyS1";
+Ver ver;
+Gpio_in gpio_in;
+
+int StoreLogMsg(const char *fmt, ...);
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+}
+
+//=================================
+// Common routine
+//=================================
+char* getTimeString(void)
+{
+	char *result=malloc(21);
+	time_t timep;
+	struct tm *p;
+	time(&timep);
+	p=gmtime(&timep);
+
+	sprintf(result, "[%04d-%02d-%02d %02d:%02d:%02d]", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, p->tm_hour, p->tm_hour, p->tm_sec);
+
+	return result;
+}
+
+void trim(char *s)
+{
+    int i=0, j, k, l=0;
+
+    while((s[i]==' ')||(s[i]=='\t')||(s[i]=='\n'))
+        i++;
+
+    j = strlen(s)-1;
+    while((s[j]==' ')||(s[j]=='\t')||(s[j]=='\n'))
+        j--;
+
+    if(i==0 && j==strlen(s)-1) { }
+    else if(i==0) s[j+1] = '\0';
+    else {
+        for(k=i; k<=j; k++) s[l++] = s[k];
+        s[l] = '\0';
+    }
+}
+
+int mystrcmp(char *p1,char *p2)
+{
+    while(*p1==*p2)
+    {
+        if(*p1=='\0' || *p2=='\0')
+            break;
+        p1++;
+        p2++;
+    }
+    if(*p1=='\0' && *p2=='\0')
+        return(PASS);
+    else
+        return(FAIL);
+}
+
+void substr(char *dest, const char* src, unsigned int start, unsigned int cnt)
+{
+	strncpy(dest, src + start, cnt);
+	dest[cnt] = 0;
+}
+
+void split(char **arr, char *str, const char *del)
+{
+	char *s = strtok(str, del);
+
+	while(s != NULL)
+	{
+		*arr++ = s;
+		s = strtok(NULL, del);
+	}
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//creat ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG\n");
+		#endif
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmSysConfigAndInfo NG\n");
+		#endif
+    	result = FAIL;
+   	 }
+
+   	 //creat ShmStatusCodeData
+   	 if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+   		DEBUG_ERROR("shmget ShmStatusCodeData NG\n");
+		#endif
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmStatusCodeData NG\n");
+		#endif
+    	result = FAIL;
+   	}
+
+	//creat ShmStatusCodeData
+	if ((MeterSMId = shmget(ShmPrimaryMcuKey, sizeof(struct PrimaryMcuData), 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmPrimaryMcuData NG\n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmPrimaryMcuData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef ShmPrimaryMcuData
+		DEBUG_ERROR("shmat ShmPrimaryMcuData NG\n");
+		#endif
+		result = FAIL;
+	}
+
+    return result;
+}
+
+//================================================
+// Function
+//================================================
+void GetFwAndHwVersion()
+{
+	if(Query_FW_Ver(Uart1Fd, Addr.IoExtend, &ver) == PASS)
+	{
+		printf("s1 = %s \n", ver.Version_FW);
+		strcpy((char *)ShmPrimaryMcuData->version, ver.Version_FW);
+	}
+
+	if (Query_HW_Ver(Uart1Fd, Addr.IoExtend, &ver) == PASS)
+		printf("s2 = %s \n", ver.Version_HW);
+}
+
+void GetInputGpioStatus()
+{
+	//printf("GetInputGpioStatus \n");
+	if (Query_Gpio_Input(Uart1Fd, Addr.IoExtend, &gpio_in) == PASS)
+	{
+		ShmSysConfigAndInfo->SysInfo.AcContactorStatus = ShmPrimaryMcuData->InputDet.bits.AcContactorDetec = gpio_in.AC_Connector;
+		ShmPrimaryMcuData->InputDet.bits.AcMainBreakerDetec = gpio_in.AC_MainBreaker;
+		ShmPrimaryMcuData->InputDet.bits.SpdDetec = gpio_in.SPD;
+		ShmPrimaryMcuData->InputDet.bits.DoorOpen = gpio_in.Door_Open;
+
+		ShmPrimaryMcuData->InputDet.bits.Button1 = gpio_in.Button[0];
+		ShmPrimaryMcuData->InputDet.bits.Button2 = gpio_in.Button[1];
+		ShmPrimaryMcuData->InputDet.bits.EmergencyButton = gpio_in.Emergency_Btn;
+
+		//printf("left = %d \n", ShmPrimaryMcuData->InputDet.bits.Button1);
+		//printf("right = %d \n", ShmPrimaryMcuData->InputDet.bits.Button2);
+		//printf("ShmSysConfigAndInfo->SysInfo.AcContactorStatus = %d \n", ShmSysConfigAndInfo->SysInfo.AcContactorStatus);
+	}
+}
+
+void SetOutputGpio()
+{
+	Gpio_out gpio;
+	gpio.Button_LED[0] = 0x01;
+	gpio.Button_LED[1] = 0x01;
+
+	gpio.System_LED[0] = 0x00;
+	gpio.System_LED[1] = 0x00;
+	gpio.System_LED[2] = 0x00;
+	gpio.System_LED[3] = 0x00;
+
+	gpio.AC_Connector = 0x00;
+	gpio.AC_Breaker = 0x00;
+
+	if (Config_Gpio_Output(Uart1Fd, Addr.IoExtend, &gpio) == PASS)
+		printf("SetOutputGpio sucessfully. \n");
+	else
+		printf("SetOutputGpio fail. \n");
+}
+
+//================================================
+// Main process
+//================================================
+int InitComPort()
+{
+	int fd;
+	struct termios tios;
+
+	fd = open(priPortName, O_RDWR);
+	if(fd<=0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("open 407 Communication port NG \n");
+		#endif
+		return -1;
+	}
+	ioctl (fd, TCGETS, &tios);
+	tios.c_cflag = B115200| CS8 | CLOCAL | CREAD;
+	tios.c_lflag = 0;
+	tios.c_iflag = 0;
+	tios.c_oflag = 0;
+	tios.c_cc[VMIN]=0;
+	tios.c_cc[VTIME]=(unsigned char)1;
+	tios.c_lflag=0;
+	tcflush(fd, TCIFLUSH);
+	ioctl (fd, TCSETS, &tios);
+
+	return fd;
+}
+
+int main(void)
+{
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if(ShmStatusCodeData!=NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		sleep(5);
+		return 0;
+	}
+	Uart1Fd = InitComPort();
+	printf("407 Port id = %d \n", Uart1Fd);
+
+	if(Uart1Fd < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitComPort (Uart1 : AM3352 - STM32) NG");
+		#endif
+
+		if (ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	SetOutputGpio();
+	for(;;)
+	{
+		// 程序開始之前~ 必須先確定 FW 版本與硬體版本,確認後!!~ 該模組才算是真正的 Initial Comp.
+		// 模組更新 FW 後,需重新做
+		if(ShmPrimaryMcuData->SelfTest_Comp != PASS)
+		{
+			printf("(407) Get Fw and Hw Ver. \n");
+			GetFwAndHwVersion();
+			usleep(1000000);
+			ShmPrimaryMcuData->SelfTest_Comp = PASS;
+		}
+		else
+		{
+			GetInputGpioStatus();
+		}
+
+		usleep(100000);
+	}
+
+	return FAIL;
+}
+
+
+
+

BIN
EVSE/Projects/DS60-120/Apps/Module_PrimaryComm.o


BIN
EVSE/Projects/DS60-120/Apps/Module_PsuComm


+ 1221 - 0
EVSE/Projects/DS60-120/Apps/Module_PsuComm.c

@@ -0,0 +1,1221 @@
+
+#include 	"Module_PsuComm.h"
+
+#define Debug
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define PASS				1
+#define FAIL				-1
+#define YES					1
+#define NO					0
+#define DERATING			10
+
+#define SELF_TEST			0
+
+float maxChargingVol = 5000;			// 限制最大充電電壓,如依照模塊則填上 0
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct PsuData 					*ShmPsuData;
+
+void trim(char *s);
+int mystrcmp(char *p1,char *p2);
+void substr(char *dest, const char* src, unsigned int start, unsigned int cnt);
+void split(char **arr, char *str, const char *del);
+
+bool libInitialize = false;
+byte getAvailableCapOffset = 5;
+byte deratingKeepCount = 0;
+
+float carReqVol = 0;
+float carReqCur = 0;
+float evseOutVol = 0;
+float evseOutCur = 0;
+
+int cmdDelayTime = 60000;
+
+int StoreLogMsg(const char *fmt, ...);
+unsigned long GetTimeoutValue(struct timeval _sour_time);
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+unsigned long GetTimeoutValue(struct timeval _sour_time)
+{
+	struct timeval _end_time;
+	gettimeofday(&_end_time, NULL);
+
+	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
+}
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+}
+
+//=================================
+// Common routine
+//=================================
+char* getTimeString(void)
+{
+	char *result=malloc(21);
+	time_t timep;
+	struct tm *p;
+	time(&timep);
+	p=gmtime(&timep);
+
+	sprintf(result, "[%04d-%02d-%02d %02d:%02d:%02d]", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, p->tm_hour, p->tm_hour, p->tm_sec);
+
+	return result;
+}
+
+void trim(char *s)
+{
+    int i=0, j, k, l=0;
+
+    while((s[i]==' ')||(s[i]=='\t')||(s[i]=='\n'))
+        i++;
+
+    j = strlen(s)-1;
+    while((s[j]==' ')||(s[j]=='\t')||(s[j]=='\n'))
+        j--;
+
+    if(i==0 && j==strlen(s)-1) { }
+    else if(i==0) s[j+1] = '\0';
+    else {
+        for(k=i; k<=j; k++) s[l++] = s[k];
+        s[l] = '\0';
+    }
+}
+
+int mystrcmp(char *p1,char *p2)
+{
+    while(*p1==*p2)
+    {
+        if(*p1=='\0' || *p2=='\0')
+            break;
+        p1++;
+        p2++;
+    }
+    if(*p1=='\0' && *p2=='\0')
+        return(PASS);
+    else
+        return(FAIL);
+}
+
+void substr(char *dest, const char* src, unsigned int start, unsigned int cnt)
+{
+	strncpy(dest, src + start, cnt);
+	dest[cnt] = 0;
+}
+
+void split(char **arr, char *str, const char *del)
+{
+	char *s = strtok(str, del);
+
+	while(s != NULL)
+	{
+		*arr++ = s;
+		s = strtok(NULL, del);
+	}
+}
+
+//=================================
+// Alarm code mapping to share memory Function
+//=================================
+void AbnormalStopAnalysis(byte gun_index, byte *errCode)
+{
+	char string[7];
+	sprintf(string, "%d%d%d%d%d%d", *(errCode + 5), *(errCode + 4), *(errCode + 3), *(errCode + 2), *(errCode + 1), *(errCode + 0));
+
+//	if (gun_index < _gunCount)
+//	{
+//		if (strlen((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index]) <= 0)
+//		{
+//			memcpy(&ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index][0], string, 7);
+//			ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level = 0x00;
+//		}
+//	}
+	printf("PSU Alarm code = %s \n", errCode);
+}
+//=================================
+// ReAssigned PSU Function
+//=================================
+void ReAssignedResource()
+{
+	int index = 0;
+	struct PsuModuleData PsuModule[ShmPsuData->SystemPresentPsuQuantity];
+
+	for (byte i = 0; i < 4; i++)
+	{
+		for(byte psuCount = 0; psuCount < ShmPsuData->PsuGroup[i].GroupPresentPsuQuantity; psuCount++)
+		{
+			memcpy(&PsuModule[index], &ShmPsuData->PsuGroup[i].PsuModule[psuCount], sizeof(struct PsuModuleData));
+			index++;
+		}
+		ShmPsuData->PsuGroup[i].GroupPresentPsuQuantity = 0;
+	}
+
+	for(int i = 0; i < ShmPsuData->SystemPresentPsuQuantity; i++)
+	{
+		byte group = PsuModule[i].FireWireIndex;
+
+		memcpy(&ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity],
+				&PsuModule[i], sizeof(struct PsuModuleData));
+
+		printf("ReAssignedResource : PhysicalID = %d, Address = %d, group = %d \n",
+				ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].PhysicalID,
+				ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].Address,
+				group);
+
+		PsuAddressAssignment(ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].PhysicalID,
+				(char *)ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].SerialNumber,
+				ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].Address,
+				group);
+		ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity++;
+	}
+}
+
+//=================================
+// Save data to share memory Function
+//=================================
+bool FindChargingInfoData(byte target, struct ChargingInfoData **chargingData)
+{
+	for (byte index = 0; index < CHAdeMO_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < CCS_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < GB_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.GbChargingData[index];
+			return true;
+		}
+	}
+
+	return false;
+}
+
+void GetPsuRequestCallback(byte phy_id, char *serial_number)
+{
+	if (ShmSysConfigAndInfo->SysInfo.AcContactorStatus == NO)
+		return;
+
+	// ********************** 每次送電後,需判斷要把所有的模塊分配到哪個 Group **********************
+	byte group = 0;
+	if(ShmSysConfigAndInfo->SysInfo.BootingStatus == BOOTTING || _gunCount == 1)
+	{
+		// 初始化狀態,則直接先分配到同個群
+		group = 0;
+	}
+	else
+	{
+		group = ShmSysConfigAndInfo->SysInfo.CurGunSelected;
+	}
+
+	bool isNewPsu = true;
+
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].PhysicalID == phy_id &&
+			strncmp((char *)ShmPsuData->PsuGroup[group].PsuModule[index].SerialNumber, serial_number, 7) == 0)
+		{
+			isNewPsu = false;
+		}
+	}
+
+	if (isNewPsu)
+	{
+		ShmPsuData->SystemPresentPsuQuantity++;
+		printf("get psu********id = %d, group = %d \n", ShmPsuData->SystemPresentPsuQuantity, group);
+
+		if (ShmPsuData->Work_Step >= _TEST_LINE_STEP && ShmPsuData->Work_Step <= _TEST_COMPLETE)
+		{
+			// 已經進入火線上的驗證動作
+			ShmPsuData->NeedBackTest = YES;
+		}
+		else if (ShmPsuData->Work_Step == _WORK_CHARGING)
+		{
+			// 一旦進入火線,分配一個不會用到的給該模塊
+			group = 0x03;
+		}
+
+		ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].Address = ShmPsuData->SystemPresentPsuQuantity;
+		ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].PhysicalID = phy_id;
+		ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].AssignID = (group >> 6) + ShmPsuData->SystemPresentPsuQuantity;
+		strcpy((char *)ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].SerialNumber, serial_number);
+
+		byte isFind = false;
+		for (byte index = 0; index < conn_1_count; index++)
+		{
+			printf("connector_1[%d] = %d, phy_id = %d \n", index, connector_1[index], phy_id);
+			if (connector_1[index] == phy_id)
+			{
+				isFind = true;
+				ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].FireWireIndex = 0;
+				break;
+			}
+		}
+
+		if (!isFind)
+		{
+			for (byte index = 0; index < conn_2_count; index++)
+			{
+				printf("connector_2[%d] = %d, phy_id = %d \n", index, connector_2[index], phy_id);
+				if (connector_2[index] == phy_id)
+				{
+					isFind = true;
+					ShmPsuData->PsuGroup[group].PsuModule[ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity].FireWireIndex = 1;
+					break;
+				}
+			}
+		}
+
+		ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity++;
+		PsuAddressAssignment(phy_id, serial_number, ShmPsuData->SystemPresentPsuQuantity, group);
+		ShmPsuData->GroupCount = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+	}
+}
+
+void SaveStatusCallback(byte group, byte address, int alarm, int fault)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].AlarmCode = alarm;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FaultCode = fault;
+			//printf("index = %d, alarm = %d, fault = %d \n", index, alarm, fault);
+			break;
+		}
+	}
+}
+
+void SaveAlarmNotifyCallback(byte group, byte address, unsigned char *alarm)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			AbnormalStopAnalysis(group, alarm);
+			break;
+		}
+	}
+}
+
+void SaveFaultNotifyCallback(byte group, byte address, int fault)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].FaultCode = fault;
+			break;
+		}
+	}
+}
+
+void SaveFirmwareVersion(byte group, byte address, unsigned char packageIndex, unsigned char type , unsigned char *data)
+{
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			if (packageIndex == 0 || packageIndex == 1)
+				strncpy((char *)ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion + (packageIndex * 6), (char *)data, 6);
+			else
+				strncpy((char *)ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion + (packageIndex * 6), (char *)data, 4);
+		}
+	}
+
+	if (packageIndex == 1)
+	{
+		char string[3];
+
+		memcpy(string, (data + 2), 2);
+		string[2] = '\0';
+
+		for (byte i = 0; i < _gunCount; i++)
+		{
+			if (maxChargingVol != 0)
+			{
+				chargingInfo[i]->MaximumChargingVoltage = maxChargingVol;
+			}
+			else
+			{
+				if (strcmp(string, "50") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 5000;
+				else if (strcmp(string, "70") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 7000;
+				else if (strcmp(string, "75") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 7500;
+				else if (strcmp(string, "80") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 8000;
+				else if (strcmp(string, "95") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 9500;
+				else if (strcmp(string, "A0") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 10000;
+				else if (strcmp(string, "C0") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 12000;
+				else if (strcmp(string, "F0") == 0)
+					chargingInfo[i]->MaximumChargingVoltage = 15000;
+			}
+			printf("index = %d, max vol = %f \n", i, chargingInfo[i]->MaximumChargingVoltage);
+		}
+	}
+}
+
+void SaveFanSpeedCallback(byte group, byte address, byte fan1, byte fan2, byte fan3, byte fan4)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].FanSpeed_1 = fan1;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FanSpeed_2 = fan2;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FanSpeed_3 = fan3;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FanSpeed_4 = fan4;
+			break;
+		}
+	}
+}
+
+void SaveTemperatureCallback(byte group, byte address, char cri_temp1, char cri_temp2, char cri_temp3, char ex_temp, char in_temp1, char in_temp2, char out_temp)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].CriticalTemp1 = cri_temp1;
+			ShmPsuData->PsuGroup[group].PsuModule[index].CriticalTemp2 = cri_temp2;
+			ShmPsuData->PsuGroup[group].PsuModule[index].CriticalTemp3 = cri_temp3;
+			ShmPsuData->PsuGroup[group].PsuModule[index].ExletTemp = ex_temp;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InletTemp_1 = in_temp1;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InletTemp_2 = in_temp2;
+			ShmPsuData->PsuGroup[group].PsuModule[index].OutletTemp = out_temp;
+			break;
+		}
+	}
+}
+
+void SavePresentInputVoltageCallback(byte group, byte address, byte vol_type, unsigned short vol1, unsigned short vol2, unsigned short vol3)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputVoltage_Type = vol_type;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputVoltageL1 = vol1;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputVoltageL2 = vol2;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputVoltageL3 = vol3;
+			break;
+		}
+	}
+}
+
+// 模塊輸出的電壓電流
+void SavePresentOutputCallback(byte group, byte address, unsigned short out_vol, unsigned short out_cur)
+{
+	unsigned short outputVol = 0;
+	unsigned short outputCur = 0;
+	bool isChange = false;
+
+	// PSU
+	for (int index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputVoltage = out_vol;
+			ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputCurrent = out_cur;
+			isChange = true;
+		}
+
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputVoltage > outputVol)
+			outputVol = ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputVoltage;
+
+		outputCur += ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputCurrent;
+	}
+
+	if (isChange)
+	{
+		// PSU Group
+		// 電壓
+		ShmPsuData->PsuGroup[group].GroupPresentOutputVoltage = outputVol;
+		// 電流
+		ShmPsuData->PsuGroup[group].GroupPresentOutputCurrent = outputCur;
+
+		//EVSE - 槍端的輸出電壓
+		chargingInfo[group]->PresentChargingVoltage = ShmPsuData->PsuGroup[group].GroupPresentOutputVoltage;
+		//EVSE - 槍端的輸出電流
+		chargingInfo[group]->PresentChargingCurrent = ShmPsuData->PsuGroup[group].GroupPresentOutputCurrent;
+	}
+
+	printf("group = %d, GroupPresentOutputVoltage = %d \n", group, ShmPsuData->PsuGroup[group].GroupPresentOutputVoltage);
+	printf("group = %d, GroupPresentOutputCurrent = %d \n", group, ShmPsuData->PsuGroup[group].GroupPresentOutputCurrent);
+}
+
+void SaveAvailableCapCallback(byte group, byte address, unsigned short able_power, unsigned short able_cur)
+{
+	unsigned int power = 0;
+	unsigned int current = 0;
+	unsigned int power_derating = 0;
+	unsigned int current_derating = 0;
+	bool isChange = false;
+
+	for (int index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].AvailablePower = able_power;
+			ShmPsuData->PsuGroup[group].PsuModule[index].AvailableCurrent =	able_cur;
+			isChange = true;
+		}
+
+		// 降載
+		if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag >= _REASSIGNED_GET_NEW_CAP)
+		{
+			if (ShmPsuData->PsuGroup[group].PsuModule[index].FireWireIndex == group)
+			{
+				power_derating += ShmPsuData->PsuGroup[group].PsuModule[index].AvailablePower;
+				current_derating += ShmPsuData->PsuGroup[group].PsuModule[index].AvailableCurrent;
+			}
+		}
+
+		power += ShmPsuData->PsuGroup[group].PsuModule[index].AvailablePower;
+		current += ShmPsuData->PsuGroup[group].PsuModule[index].AvailableCurrent;
+	}
+
+	if (current_derating == 0)
+		current_derating = current;
+	if (power_derating == 0)
+		power_derating = power;
+
+	if (isChange)
+	{
+		// PSU Group
+		// Available Power
+		ShmPsuData->PsuGroup[group].GroupAvailablePower = power;
+		// Available Current
+		ShmPsuData->PsuGroup[group].GroupAvailableCurrent = current;
+
+		chargingInfo[group]->AvailableChargingCurrent =	ShmPsuData->PsuGroup[group].GroupAvailableCurrent;
+		chargingInfo[group]->AvailableChargingPower = ShmPsuData->PsuGroup[group].GroupAvailablePower;
+		chargingInfo[group]->DeratingChargingCurrent = current_derating;
+		chargingInfo[group]->DeratingChargingPower = power_derating;
+
+		printf("group = %d, AvailableChargingCurrent = %f, GroupAvailablePower = %f, DeratingChargingCurrent = %f, DeratingChargingPower = %f \n",
+					group, chargingInfo[group]->AvailableChargingCurrent, chargingInfo[group]->AvailableChargingPower,
+					chargingInfo[group]->DeratingChargingCurrent, chargingInfo[group]->DeratingChargingPower);
+	}
+}
+
+void SavePresentInputCurrentCallback(byte group, byte address, unsigned short in_cur1, unsigned short in_cur2, unsigned short in_cur3)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputCurrentL1 = in_cur1;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputCurrentL2 = in_cur2;
+			ShmPsuData->PsuGroup[group].PsuModule[index].InputCurrentL3 = in_cur3;
+			break;
+		}
+	}
+}
+
+void SaveHardwareVersion(byte group, byte address, int hw_ver)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion[0] = (hw_ver >> 24) & 0xFF;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion[1] = (hw_ver >> 16) & 0xFF;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion[2] = (hw_ver >> 8) & 0xFF;
+			ShmPsuData->PsuGroup[group].PsuModule[index].FwVersion[3] = hw_ver & 0xFF;
+			break;
+		}
+	}
+}
+
+void SaveStatusNotifyCallback(byte group, byte address, byte st_machine, unsigned short out_vol, unsigned short out_cur)
+{
+	//EVSE
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			ShmPsuData->PsuGroup[group].PsuModule[index].StateMachine = st_machine;
+			//ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputVoltage = out_vol;
+			//ShmPsuData->PsuGroup[group].PsuModule[index].PresentOutputCurrent = out_cur;
+			//printf("psu state = %d, vol = %d, cur = %d \n", st_machine, out_vol, out_cur);
+			break;
+		}
+	}
+}
+
+void GetSerialNumberCallback(byte group, byte address, unsigned char packageIndex, unsigned char *data)
+{
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			strcpy((char *)ShmPsuData->PsuGroup[group].PsuModule[index].SerialNumber + (packageIndex * 7), (char *)data);
+			break;
+		}
+	}
+}
+
+void GetOutputPowerSwitchStatusCallback(byte group, byte address, unsigned char value)
+{
+	for (byte index = 0; index < ShmPsuData->PsuGroup[group].GroupPresentPsuQuantity; index++)
+	{
+		if (ShmPsuData->PsuGroup[group].PsuModule[index].Address == address)
+		{
+			//printf("PowerSwitch = %d, group = %d, address = %d \n", value, group, address);
+			ShmPsuData->PsuGroup[group].PsuModule[index].OutputPowerSwitch = value;
+			break;
+		}
+	}
+}
+
+//==========================================
+// Init all share memory
+//==========================================
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//creat ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmSysConfigAndInfo NG %d \n");
+		#endif
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmSysConfigAndInfo NG \n");
+		#endif
+    	result = FAIL;
+   	 }
+    else
+    {}
+
+   	//creat ShmStatusCodeData
+   	if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+		#ifdef SystemLogMessage
+   		DEBUG_ERROR("shmget ShmStatusCodeData NG \n");
+		#endif
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	#ifdef SystemLogMessage
+    	DEBUG_ERROR("shmat ShmStatusCodeData NG \n");
+		#endif
+    	result = FAIL;
+   	}
+    else
+    {}
+
+   	//creat ShmPsuData
+	if ((MeterSMId = shmget(ShmPsuKey, sizeof(struct PsuData),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmPsuData NG \n");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmPsuData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmat ShmPsuData NG \n");
+		#endif
+		result = FAIL;
+	 }
+	memset(ShmPsuData,0,sizeof(struct PsuData));
+
+    return result;
+}
+
+//================================================
+// Main process
+//================================================
+void InitialPsuData()
+{
+	ShmPsuData->SystemPresentPsuQuantity = 0;
+
+	for (byte _groupCount = 0; _groupCount < ARRAY_SIZE(ShmPsuData->PsuGroup);	_groupCount++)
+	{
+		ShmPsuData->PsuGroup[_groupCount].GroupPresentPsuQuantity = 0;
+		ShmPsuData->PsuGroup[_groupCount].GroupAvailablePower = 0;
+		ShmPsuData->PsuGroup[_groupCount].GroupAvailableCurrent = 0;
+	}
+}
+
+void Initialization()
+{
+	bool isPass = false;
+	while(!isPass)
+	{
+		isPass = true;
+		for (byte _index = 0; _index < _gunCount; _index++)
+		{
+			if (!FindChargingInfoData(_index, &chargingInfo[0]))
+			{
+				DEBUG_ERROR("EvComm (main) : FindChargingInfoData false \n");
+				isPass = false;
+				break;
+			}
+		}
+	}
+	conn_1_count = sizeof(connector_1)/sizeof(connector_1[0]);
+	conn_2_count = sizeof(connector_2)/sizeof(connector_2[0]);
+}
+
+int main(void)
+{
+	printf("Psu Task boot .... \n");
+	if(InitShareMemory() == FAIL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("InitShareMemory NG\n");
+		#endif
+		if(ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory = 1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	printf("InitShareMemory OK\n");
+
+	// register callback function
+	GetPsuAddressReq(&GetPsuRequestCallback);
+	RefreshStatus(&SaveStatusCallback);
+	RefreshFanSpeed(&SaveFanSpeedCallback);
+	RefreshTemp(&SaveTemperatureCallback);
+	RefreshInputVol(&SavePresentInputVoltageCallback);
+	RefreshGetOutput(&SavePresentOutputCallback);
+	RefreshAvailableCap(&SaveAvailableCapCallback);
+	RefreshInputCur(&SavePresentInputCurrentCallback);
+
+	RefreshAlarmNotify(&SaveAlarmNotifyCallback);
+	RefreshFaultNotify(&SaveFaultNotifyCallback);
+	RefreshStatusNotify(&SaveStatusNotifyCallback);
+
+	RefreshSerialNumber(&GetSerialNumberCallback);
+	RefreshOutputPowerSwitch(&GetOutputPowerSwitchStatusCallback);
+	RefreshFWVersion(&SaveFirmwareVersion);
+	//RefreshHWVersion(&SaveHardwareVersion);
+
+	// initial object
+	InitialPsuData();
+	Initialization();
+	libInitialize = InitialCommunication();
+
+	byte priorityLow = 1;
+	//main loop
+	while (libInitialize)
+	{
+		// 斷電狀態
+		if (ShmSysConfigAndInfo->SysInfo.AcContactorStatus == NO)
+		{
+			InitialPsuData();
+			sleep(1);
+			ShmPsuData->Work_Step = ASSIGN_START;
+			continue;
+		}
+
+		// update psu fw req
+//		if(psu update req ?)
+//		{
+//
+//			continue;
+//		}
+
+		// 自檢失敗
+		if (ShmPsuData->Work_Step == _NO_WORKING)
+		{
+			DEBUG_ERROR("(PSU) self test fail. \n");
+			printf("(PSU) self test fail. \n");
+			sleep(5);
+		}
+
+		switch(ShmPsuData->Work_Step)
+		{
+			case ASSIGN_START:
+			{
+				printf("PSU ASSIGN_START........ \n");
+				gettimeofday(&_id_assign_time, NULL);
+				ShmPsuData->Work_Step = ASSIGN_COMP;
+			}
+				break;
+			case ASSIGN_COMP:
+			{
+				if (priorityLow == 1)
+				{
+					for (byte psuIndex = 0;	psuIndex < ShmPsuData->PsuGroup[0].GroupPresentPsuQuantity;	psuIndex++)
+					{
+						if (ShmPsuData->PsuGroup[0].PsuModule[psuIndex].Address == NONE_CARE_ADDRESS)
+							continue;
+
+						GetStatus(0, ShmPsuData->PsuGroup[0].PsuModule[psuIndex].Address);
+						usleep(cmdDelayTime);
+						if (strlen((char *)ShmPsuData->PsuGroup[0].PsuModule[psuIndex].FwVersion) == 0 &&
+								ShmPsuData->PsuGroup[0].PsuModule[psuIndex].FwVersion[0] == '\0')
+						{
+							GetFwVersion(0, ShmPsuData->PsuGroup[0].PsuModule[psuIndex].Address, 0x02);
+							usleep(cmdDelayTime);
+						}
+
+						if (strlen((char *)ShmPsuData->PsuGroup[0].PsuModule[psuIndex].SerialNumber) == 0 &&
+								ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev[0] == '\0')
+						{
+							GetSerialNumber(0, ShmPsuData->PsuGroup[0].PsuModule[psuIndex].Address);
+							usleep(cmdDelayTime);
+						}
+					}
+				}
+
+				priorityLow >= 20 ? priorityLow = 1 : priorityLow++;
+				// 等待十秒
+				if (GetTimeoutValue(_id_assign_time) >= 15000000)
+				{
+					ShmPsuData->Work_Step = ENABLE_POW;
+				}
+			}
+				break;
+			case ENABLE_POW:
+			{
+				if (ShmSysConfigAndInfo->SysInfo.BootingStatus == BOOTTING)
+				{
+					// 電樁在 Booting 的狀態 - 自檢
+					ShmPsuData->Work_Step = _TEST_LINE_STEP;
+				}
+				else
+				{
+					ShmPsuData->Work_Step = _WORK_CHARGING;
+					gettimeofday(&_workModePriority_time, NULL);
+				}
+			}
+				break;
+			case _TEST_LINE_STEP:
+			{
+				printf("cur total psu count = %d \n", ShmPsuData->SystemPresentPsuQuantity);
+				if (ShmPsuData->PsuGroup[0].GroupPresentPsuQuantity <= 0)
+				{
+					sleep(1);
+					continue;
+				}
+
+#if (SELF_TEST)
+				// 對整個 Group 保持通訊
+				bool isFind = false;
+				while(ShmPsuData->Work_Step != _NO_WORKING &&
+						_curCheckPsuIndexForFireLine < ShmPsuData->PsuGroup[0].GroupPresentPsuQuantity)
+				{
+					GetStatus(0, NONE_CARE_ADDRESS);
+					usleep(cmdDelayTime);
+					GetAvailableCap(0, NONE_CARE_ADDRESS, getAvailableCapOffset);
+					usleep(cmdDelayTime);
+					EnableOutputPower(0, NONE_CARE_ADDRESS, OUTPUT_POWER_SWITCH_ON);
+					usleep(cmdDelayTime);
+
+					if (ShmPsuData->NeedBackTest == YES)
+					{
+						ShmPsuData->NeedBackTest = NO;
+						_curCheckPsuIndexForFireLine = 0x00;
+					}
+
+					if (isFind)
+					{
+						GetPresentOutput(0, ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].Address);
+						usleep(cmdDelayTime);
+						//printf("stop vor = %d \n", ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage);
+						if (ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage <= 200)
+						{
+							// 檢查下一個
+							_curCheckPsuIndexForFireLine++;
+							isFind = false;
+						}
+						SetPresentOutput(0, ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].Address,
+								ZERO_VOL, ZERO_CUR, chargingInfo[0]->AvailableChargingCurrent, 0x00);
+						usleep(cmdDelayTime);
+					}
+					else
+					{
+						printf("AvailableCurrent = %d \n", ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].AvailableCurrent);
+						if (ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].AvailableCurrent > 0)
+						{
+							if (ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage == 0)
+							{
+								//printf("set output vol = %d, cur = %d \n", SELF_TEST_VOL, SELF_TEST_CUR);
+								SetPresentOutput(0, ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].Address,
+									SELF_TEST_VOL, SELF_TEST_CUR, chargingInfo[0]->AvailableChargingCurrent, 0x00);
+								usleep(cmdDelayTime);
+							}
+
+							if(!isCheckOutputTimeStart)
+							{
+								gettimeofday(&_chk_output_time, NULL);
+								isCheckOutputTimeStart = true;
+							}
+							else
+							{
+								// 如果五秒內火線上都沒有偵測到電壓,則代表異常
+								if (GetTimeoutValue(_chk_output_time) >= 10000000)
+								{
+									// 自檢失敗
+									printf("self test timeout \n");
+									EnableOutputPower(0, NONE_CARE_ADDRESS, OUTPUT_POWER_SWITCH_OFF);
+									usleep(cmdDelayTime);
+									ShmPsuData->Work_Step = _NO_WORKING;
+									continue;
+								}
+							}
+
+							for (byte gunIndex = 0; gunIndex < _gunCount; gunIndex ++)
+							{
+								GetPresentOutput(0, ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].Address);
+								usleep(cmdDelayTime);
+								printf("Cur psu output voltage = %d \n", ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage);
+								printf("Fire voltage = %f \n", chargingInfo[gunIndex]->FuseChargingVoltage);
+								// 該模組的輸出電壓與火線上的電壓一致
+								if (chargingInfo[gunIndex]->FuseChargingVoltage >= 50 &&
+									((chargingInfo[gunIndex]->FuseChargingVoltage >= ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage - 300) &&
+									(chargingInfo[gunIndex]->FuseChargingVoltage <= ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PresentOutputVoltage + 300)))
+								{
+									// 找到火線上的電壓了,這邊紀錄火線是紀錄屬於哪一把槍的火線
+									if (_curCheckPsuIndexForFireLine < ShmPsuData->PsuGroup[0].GroupPresentPsuQuantity)
+									{
+										// 紀錄當前 PSU 是哪個火線上的
+										ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].FireWireIndex = gunIndex;
+
+										//recordPsuData[_curCheckPsuIndexForFireLine]._fire_index = gunIndex;
+										//recordPsuData[_curCheckPsuIndexForFireLine]._phy_addr = ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].PhysicalID;
+										//strcpy(recordPsuData[_curCheckPsuIndexForFireLine]._serial_num, (char *)ShmPsuData->PsuGroup[0].PsuModule[_curCheckPsuIndexForFireLine].SerialNumber);
+										printf("Find Fire Line Number end~~~~~~~~~~~~~~~ = %d \n", gunIndex);
+										usleep(100000);
+										isCheckOutputTimeStart = false;
+										isFind = true;
+										break;
+									}
+								}
+							}
+						}
+					}
+
+					usleep(100000);
+				}
+
+				if (ShmPsuData->Work_Step != _NO_WORKING)
+					ShmPsuData->Work_Step = _TEST_POWER_STEP;
+
+				EnableOutputPower(0, NONE_CARE_ADDRESS, OUTPUT_POWER_SWITCH_OFF);
+				usleep(cmdDelayTime);
+#else
+				ShmPsuData->Work_Step = _TEST_POWER_STEP;
+#endif
+			}
+				break;
+			case _TEST_POWER_STEP:
+			{
+				if(!_chkTotalCapStart)
+				{
+					_chkTotalCapStart = true;
+					gettimeofday(&_chk_cap_time, NULL);
+				}
+
+				for (byte groupIndex = 0; groupIndex < ShmPsuData->GroupCount; groupIndex++)
+				{
+					GetStatus(groupIndex, NONE_CARE_ADDRESS);
+					usleep(cmdDelayTime);
+					GetAvailableCap(groupIndex, NONE_CARE_ADDRESS, getAvailableCapOffset);
+					usleep(cmdDelayTime);
+				}
+
+				if (GetTimeoutValue(_chk_cap_time) >= 2000000)
+				{
+					printf("AvailableChargingCurrent = %f, AvailableChargingPower = %f \n",
+							chargingInfo[0]->AvailableChargingCurrent, chargingInfo[0]->AvailableChargingPower);
+					for (byte index = 0; index < ShmPsuData->PsuGroup[0].GroupPresentPsuQuantity; index++)
+					{
+						printf("index = %d, fire index = %d, phy addr = %s \n",
+								index, ShmPsuData->PsuGroup[0].PsuModule[index].FireWireIndex, ShmPsuData->PsuGroup[0].PsuModule[index].SerialNumber);
+					}
+					ShmPsuData->Work_Step = _TEST_COMPLETE;
+				}
+			}
+				break;
+			case _TEST_COMPLETE:
+			{
+				priorityLow = 1;
+				sleep(1);
+			}
+				break;
+			case _WORK_CHARGING:
+			{
+				int time = GetTimeoutValue(_workModePriority_time) / 1000;
+				// 智能分配 : 檢查該槍是否有模塊有用,有則無須重新分配直接進入充電
+				if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_PREPARE)
+				{
+					if (ShmPsuData->PsuGroup[ShmSysConfigAndInfo->SysInfo.CurGunSelected].GroupPresentPsuQuantity > 0)
+					{
+						printf("=============Smart Charging : _REASSIGNED_NONE============= Step 0 \n");
+						ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_NONE;
+					}
+					else
+					{
+						printf("=============Smart Charging : _REASSIGNED_GET_NEW_CAP============= Step 2 \n");
+						ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_GET_NEW_CAP;
+					}
+				}
+
+				//printf("cur total psu count = %d \n", ShmPsuData->SystemPresentPsuQuantity);
+				for (byte groupIndex = 0; groupIndex < ShmPsuData->GroupCount; groupIndex++)
+				{
+					// 每秒
+					if (time > 1000)
+					{
+						GetStatus(groupIndex, NONE_CARE_ADDRESS);
+						usleep(cmdDelayTime);
+						GetAvailableCap(groupIndex, NONE_CARE_ADDRESS, getAvailableCapOffset);
+						usleep(cmdDelayTime);
+
+						// 智能分配 : 檢查車端需求電流是否有降低至新的輸出值
+						if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_GET_NEW_CAP)
+						{
+							if (groupIndex != ShmSysConfigAndInfo->SysInfo.CurGunSelected)
+							{
+								if (chargingInfo[groupIndex]->SystemStatus >= S_CHARGING &&	chargingInfo[groupIndex]->SystemStatus <= S_COMPLETE)
+								{
+									if (chargingInfo[groupIndex]->DeratingChargingCurrent < chargingInfo[groupIndex]->AvailableChargingCurrent)
+									{
+										// 車端需求電流降低至降載的電流
+										printf("Smart Charging : index = %d, EvBatterytargetCurrent = %f, DeratingChargingCurrent = %f \n",
+											groupIndex, chargingInfo[groupIndex]->EvBatterytargetCurrent, chargingInfo[groupIndex]->DeratingChargingCurrent);
+
+										if ((chargingInfo[groupIndex]->EvBatterytargetCurrent <= chargingInfo[groupIndex]->DeratingChargingCurrent) ||
+											deratingKeepCount >= DERATING)
+										{
+											// 車端降載完成
+											printf("=============Smart Charging : _REASSIGNED_MAIN============= Step 3 \n");
+											ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_MAIN;
+										}
+										else
+										{
+											deratingKeepCount++;
+										}
+									}
+
+								}
+							}
+						}
+						else
+							deratingKeepCount = 0;
+
+						if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_MAIN)
+						{
+							printf("=============Smart Charging : _REASSIGNED_ADJUST============= Step 4 \n");
+							//重新分配模組
+							ReAssignedResource();
+							gettimeofday(&_derating_time, NULL);
+							ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_ADJUST;
+						}
+
+						gettimeofday(&_workModePriority_time, NULL);
+					}
+
+					GetPresentOutput(groupIndex, NONE_CARE_ADDRESS);
+					usleep(cmdDelayTime);
+					if (carReqVol != chargingInfo[groupIndex]->EvBatterytargetVoltage)
+					{
+						carReqVol = chargingInfo[groupIndex]->EvBatterytargetVoltage;
+						DEBUG_INFO("ev need vol = %f \n", chargingInfo[groupIndex]->EvBatterytargetVoltage);
+					}
+
+					if (carReqCur != chargingInfo[groupIndex]->EvBatterytargetCurrent)
+					{
+						carReqCur = chargingInfo[groupIndex]->EvBatterytargetCurrent;
+						DEBUG_INFO("ev need cur = %f \n", chargingInfo[groupIndex]->EvBatterytargetCurrent);
+					}
+
+					if (evseOutVol != chargingInfo[groupIndex]->FireChargingVoltage)
+					{
+						evseOutVol = chargingInfo[groupIndex]->FireChargingVoltage;
+						printf("evse output v index = %d, vol = %f \n",	groupIndex, chargingInfo[groupIndex]->FireChargingVoltage);
+					}
+
+					if (evseOutCur != chargingInfo[groupIndex]->PresentChargingCurrent)
+					{
+						evseOutCur = chargingInfo[groupIndex]->PresentChargingCurrent;
+						printf("evse output c index = %d, cur = %f \n", groupIndex, chargingInfo[groupIndex]->PresentChargingCurrent);
+					}
+
+					if (chargingInfo[groupIndex]->AvailableChargingCurrent <= 0)
+						continue;
+
+					// 針對各槍當前狀態,傳送需要回傳的資料指令
+					if (((chargingInfo[groupIndex]->SystemStatus >= S_PREPARING_FOR_EVSE && chargingInfo[groupIndex]->SystemStatus <= S_CHARGING) && chargingInfo[groupIndex]->RelayK1K2Status) ||
+							chargingInfo[groupIndex]->SystemStatus == S_REASSIGN ||
+							(chargingInfo[groupIndex]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[groupIndex]->SystemStatus <= S_CCS_PRECHARGE_ST1)
+						)
+					{
+						EnableOutputPower(groupIndex, NONE_CARE_ADDRESS, OUTPUT_POWER_SWITCH_ON);
+						usleep(cmdDelayTime);
+						if (ShmPsuData->PsuGroup[groupIndex].GroupAvailableCurrent > 0)
+						{
+							if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag >= _REASSIGNED_ADJUST)
+							{
+								// 如果車端要求的電流超過降載,則以降載電流為主
+								if (chargingInfo[groupIndex]->EvBatterytargetCurrent >= chargingInfo[groupIndex]->DeratingChargingCurrent)
+								{
+									chargingInfo[groupIndex]->EvBatterytargetCurrent = chargingInfo[groupIndex]->DeratingChargingCurrent;
+								}
+
+								if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_ADJUST)
+								{
+									deratingTime = GetTimeoutValue(_derating_time) / 1000;
+									if (deratingTime > 3000)
+									{
+										deratingTime = 0;
+										printf("=============Smart Charging : _REASSIGNED_RELAY============= Step 5 \n");
+										ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_RELAY;
+									}
+								}
+
+								if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_ADJUST)
+								{
+									for(int i = 0; i < ShmPsuData->PsuGroup[groupIndex].GroupPresentPsuQuantity; i++)
+									{
+										printf("*********_REASSIGNED_ADJUST : groupIndex = %d, outputCur = %d, outputVol = %d \n",
+												groupIndex,
+												ShmPsuData->PsuGroup[groupIndex].PsuModule[i].PresentOutputCurrent,
+												ShmPsuData->PsuGroup[groupIndex].PsuModule[i].PresentOutputVoltage);
+									}
+								}
+
+								float targetVol = chargingInfo[groupIndex]->EvBatterytargetVoltage;
+								float targetCur = chargingInfo[groupIndex]->EvBatterytargetCurrent;
+
+								if (targetVol != 0)
+								{
+									if (targetCur <= 10)
+										targetCur = 10;
+								}
+								else
+								{
+									targetVol = 0;
+									targetCur = 0;
+								}
+
+								// 該充電槍的目標電壓與目標電流
+								SetPresentOutput(groupIndex, NONE_CARE_ADDRESS,
+									targetVol, targetCur,
+									chargingInfo[groupIndex]->DeratingChargingCurrent,
+									0x00);
+							}
+							else
+							{
+								printf("Set Present Output index = %d, V = %f, C = %f \n", groupIndex,
+										chargingInfo[groupIndex]->EvBatterytargetVoltage, chargingInfo[groupIndex]->EvBatterytargetCurrent);
+
+								float targetVol = chargingInfo[groupIndex]->EvBatterytargetVoltage;
+								float targetCur = chargingInfo[groupIndex]->EvBatterytargetCurrent;
+
+								if (targetVol != 0)
+								{
+									if (targetCur <= 10)
+										targetCur = 10;
+								}
+								else
+								{
+									targetVol = 0;
+									targetCur = 0;
+								}
+
+								// 該充電槍的目標電壓與目標電流
+								SetPresentOutput(groupIndex, NONE_CARE_ADDRESS,
+									targetVol,
+									targetCur,
+									chargingInfo[groupIndex]->AvailableChargingCurrent,
+									0x00);
+							}
+
+							usleep(cmdDelayTime);
+						}
+					}
+					else if (chargingInfo[groupIndex]->SystemStatus >= S_TERMINATING &&
+							chargingInfo[groupIndex]->SystemStatus <= S_COMPLETE)
+					{
+						SetPresentOutput(groupIndex, NONE_CARE_ADDRESS, ZERO_VOL, ZERO_CUR,
+								chargingInfo[groupIndex]->AvailableChargingCurrent, 0x00);
+						usleep(cmdDelayTime);
+					}
+				}
+				priorityLow >= 200 ? priorityLow = 1 : priorityLow++;
+				break;
+			}
+		}
+		usleep(45000);
+	}
+	return FAIL;
+}

+ 83 - 0
EVSE/Projects/DS60-120/Apps/Module_PsuComm.h

@@ -0,0 +1,83 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<linux/can.h>
+#include 	<linux/can/raw.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include   <stdio.h>      /*標準輸入輸出定義*/
+#include   <stdlib.h>     /*標準函數庫定義*/
+#include   <unistd.h>     /*Unix 標準函數定義*/
+#include   <fcntl.h>      /*檔控制定義*/
+#include   <termios.h>    /*PPSIX 終端控制定義*/
+#include   <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include	<math.h>
+#include	"../../define.h"
+#include 	<stdbool.h>
+
+typedef unsigned char 		byte;
+
+#define SELF_TEST_VOL				1600
+#define SELF_TEST_CUR				10
+#define ZERO_VOL					0
+#define ZERO_CUR					0
+#define NONE_CARE_ADDRESS			0
+#define OUTPUT_POWER_SWITCH_ON		2
+#define OUTPUT_POWER_SWITCH_OFF		0
+
+enum _FIRMWARE_TYPE
+{
+	_Fw_pri_app = 		0,
+	_Fw_sec_app,
+	_Fw_pri_bootload,
+	_Fw_sec_bootload
+};
+
+struct _RecordPsuData
+{
+	byte 				_phy_addr;
+	char 				_serial_num[32];
+	byte 				_fire_index;
+
+};
+
+unsigned char _gunCount = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+struct ChargingInfoData *chargingInfo[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+bool rework = false;
+
+struct timeval _id_assign_time;
+struct timeval _chk_output_time;
+bool isCheckOutputTimeStart = false;
+
+byte _curCheckPsuIndexForFireLine = 0x00;
+
+struct timeval _chk_cap_time;
+bool _chkTotalCapStart = false;
+
+bool isUpgradeFlag = false;
+
+struct timeval _workModePriority_time;
+struct timeval _derating_time;
+int deratingTime = 0;
+
+int connector_1[] = {1, 2};
+int connector_2[] = {3, 4};
+int conn_1_count = 0;
+int conn_2_count = 0;

BIN
EVSE/Projects/DS60-120/Apps/Module_PsuComm.o


+ 332 - 0
EVSE/Projects/DS60-120/Apps/PrimaryComm.c

@@ -0,0 +1,332 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include 	"PrimaryComm.h"
+
+#define PASS				1
+#define FAIL				-1
+
+struct Address Addr={0x01,0x02,0x03,0x04,0xFF};
+struct Command Cmd={0x01,0x02,0x0a,0x86,0xe0,0xe1,0xe2,0xe3};
+
+int tranceive(int fd, unsigned char* cmd, unsigned char cmd_len, unsigned char* rx)
+{
+	int len;
+	//sleep(2); //required to make flush work, for some reason
+	tcflush(fd,TCIOFLUSH);
+	if(write(fd, cmd, cmd_len) >= cmd_len)
+	{
+		usleep(50000);
+		len = read(fd, rx, 512);
+	}
+	else
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Serial command %s response fail.\n", cmd);
+		#endif
+	}
+
+	return len;
+}
+
+unsigned char Query_FW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_FW_Ver, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 0)
+	{
+		for(int idx = 0; idx < (rx[4] | rx[5]<<8); idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			memcpy(Ret_Buf->Version_FW, (char *)rx+6, (rx[4] | rx[5]<<8));
+			*(Ret_Buf->Version_FW + 8) = 0x00;
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_HW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_HW_Ver, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	if(tranceive(fd, tx, sizeof(tx), rx) >0)
+	{
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			memcpy(Ret_Buf->Version_HW, (char *)rx+6, (rx[4] | rx[5]<<8));
+			//*(Ret_Buf->Version_HW + 8) = 0x00;
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Gpio_Input(unsigned char fd, unsigned char targetAddr, Gpio_in *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Gpio_In, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 0)
+	{
+		for (int idx = 0; idx < (rx[4] | rx[5] << 8); idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			Ret_Buf->AC_Connector 		= (rx[6] >> 0) & 0x01;
+			Ret_Buf->AC_MainBreaker 	= (rx[6] >> 1) & 0x01;
+			Ret_Buf->SPD 				= (rx[6] >> 2) & 0x01;
+			Ret_Buf->Door_Open 			= (rx[6] >> 3) & 0x01;
+			Ret_Buf->GFD[0] 			= (rx[6] >> 4) & 0x01;
+			Ret_Buf->GFD[1] 			= (rx[6] >> 5) & 0x01;
+			Ret_Buf->AC_Drop 			= (rx[6] >> 6) & 0x01;
+			Ret_Buf->Emergency_IO 		= (rx[6] >> 7) & 0x01;
+
+			Ret_Buf->Emergency_Btn		= (rx[7] >> 0) & 0x01;
+			Ret_Buf->Button[0] 			= (rx[7] >> 1) & 0x01;
+			Ret_Buf->Button[1] 			= (rx[7] >> 2) & 0x01;
+			Ret_Buf->Key[0]				= (rx[7] >> 3) & 0x01;
+			Ret_Buf->Key[1]				= (rx[7] >> 4) & 0x01;
+			Ret_Buf->Key[2]				= (rx[7] >> 5) & 0x01;
+			Ret_Buf->Key[3]				= (rx[7] >> 6) & 0x01;
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Config_Gpio_Output(unsigned char fd, unsigned char targetAddr, Gpio_out *Set_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[9] = {0xaa, 0x00, targetAddr, Cmd.config_Gpio_Output, 0x01, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for (int idx = 0; idx < 2; idx++)
+		tx[6] |= (Set_Buf->Button_LED[idx] ? 0x01:0x00) << (0+idx);
+
+	for (int idx = 0; idx < 4; idx++)
+			tx[6] |= (Set_Buf->System_LED[idx] ? 0x01:0x00) << (2+idx);
+
+	tx[6] |= (Set_Buf->AC_Connector ? 0x01:0x00) << 6;
+	tx[6] |= (Set_Buf->AC_Breaker ? 0x01:0x00) << 7;
+
+	for (int idx = 0; idx < (tx[4] | tx[5] << 8); idx++)
+		chksum ^= tx[6+idx];
+	tx[7] = chksum;
+
+	if (tranceive(fd, tx, sizeof(tx), rx) > 0)
+	{
+		chksum = 0x00;
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == tx[6]))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Start(unsigned char fd, unsigned char targetAddr, unsigned int crc32)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[11] = {0xaa, 0x00, targetAddr, Cmd.update_Start, 0x04, 0x00, (crc32>>0)&0xff, (crc32>>8)&0xff, (crc32>>16)&0xff, (crc32>>24)&0xff, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for (int idx = 0; idx < (tx[4] | tx[5] << 8); idx++)
+		chksum ^= tx[6+idx];
+	tx[10] = chksum;
+
+
+	if(tranceive(fd, tx, sizeof(tx), rx) > 0)
+	{
+		for(int rr = 0; rr < 8; rr++)
+			printf("rx = %x \n", rx[rr]);
+
+		chksum = 0x00;
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Abord(unsigned char fd, unsigned char targetAddr)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.update_Start, 0x04, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	if(tranceive(fd, tx, sizeof(tx), rx) >0)
+	{
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Transfer(unsigned char fd, unsigned char targetAddr, unsigned int startAddr, unsigned char *data, unsigned short int length)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[11 + length];
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	tx[0] = 0xaa;
+	tx[1] = 0x00;
+	tx[2] = targetAddr;
+	tx[3] = Cmd.update_Transfer;
+	tx[4] = (4 + length) & 0xff;
+	tx[5] = ((4 + length)>>8) & 0xff;
+	tx[6] = (startAddr>>0) & 0xff;
+	tx[7] = (startAddr>>8) & 0xff;
+	tx[8] = (startAddr>>16) & 0xff;
+	tx[9] = (startAddr>>24) & 0xff;
+	memcpy(tx+10, data, length);
+
+	for (int idx = 0; idx < (tx[4] | tx[5] << 8); idx++)
+		chksum ^= tx[6+idx];
+	tx[sizeof(tx)-1] = chksum;
+
+	if(tranceive(fd, tx, sizeof(tx), rx) >0)
+	{
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Finish(unsigned char fd, unsigned char targetAddr)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.update_Finish, 0x04, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	if(tranceive(fd, tx, sizeof(tx), rx) >0)
+	{
+		for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+

+ 80 - 0
EVSE/Projects/DS60-120/Apps/PrimaryComm.h

@@ -0,0 +1,80 @@
+#ifndef PRIMARYCOMM_H_
+#define PRIMARYCOMM_H_
+
+extern struct Address
+{
+	unsigned char Aux;
+	unsigned char Fan;
+	unsigned char Relay;
+	unsigned char IoExtend;
+	unsigned char Broadcast;
+}Addr;
+
+extern struct Command
+{
+	unsigned char query_FW_Ver; 		//0x01
+	unsigned char query_HW_Ver;		//0x02
+	unsigned char query_Gpio_In;		//0x0a
+
+	unsigned char config_Gpio_Output;	//0x86
+
+	unsigned char update_Start;		//0xe0
+	unsigned char update_Abort;		//0xe1
+	unsigned char update_Transfer;		//0xe2
+	unsigned char update_Finish;		//0xe3
+
+}Cmd;
+
+typedef struct Verion
+{
+	char Version_FW[16];
+	char Version_HW[16];
+}Ver;
+
+typedef struct GPIO_IN
+{
+	unsigned char AC_Connector;
+	unsigned char AC_MainBreaker;
+	unsigned char SPD;
+	unsigned char Door_Open;
+	unsigned char GFD[2];
+	unsigned char AC_Drop;
+	unsigned char Emergency_IO;
+
+	unsigned char Emergency_Btn;
+	unsigned char Button[2];
+	unsigned char Key[4];
+}Gpio_in;
+
+typedef struct GPIO_OUT
+{
+	unsigned char Button_LED[2];
+	unsigned char System_LED[4];
+	unsigned char AC_Connector;
+	unsigned char AC_Breaker;
+}Gpio_out;
+
+typedef struct RTC
+{
+	unsigned char AC_Connector;
+	unsigned char Button_LED[2];
+	unsigned char System_LED[4];
+	unsigned char AC_Breaker;
+}Rtc;
+
+extern unsigned char Query_FW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf);
+extern unsigned char Query_HW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf);
+extern unsigned char Query_Gpio_Input(unsigned char fd, unsigned char targetAddr, Gpio_in *Ret_Buf);
+
+extern unsigned char Config_Gpio_Output(unsigned char fd, unsigned char targetAddr, Gpio_out *Set_Buf);
+// 13 bytes
+// year : 4, month : 2, day : 2, hour : 2, min : 2, sec : 2
+//extern unsigned char Config_RTC();
+
+extern unsigned char Update_Start(unsigned char fd, unsigned char targetAddr, unsigned int crc32);
+extern unsigned char Update_Abord(unsigned char fd, unsigned char targetAddr);
+extern unsigned char Update_Transfer(unsigned char fd, unsigned char targetAddr, unsigned int startAddr, unsigned char *data, unsigned short int length);
+extern unsigned char Update_Finish(unsigned char fd, unsigned char targetAddr);
+
+
+#endif /* PRIMARYCOMM_H_ */

BIN
EVSE/Projects/DS60-120/Apps/PrimaryComm.o


BIN
EVSE/Projects/DS60-120/Apps/ReadCmdline


+ 497 - 0
EVSE/Projects/DS60-120/Apps/ReadCmdline.c

@@ -0,0 +1,497 @@
+/*
+ * Main.c
+ *
+ *  Created on: 201986
+ *      Author: 7564
+ */
+
+
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include 	<stdbool.h>
+#include 	"../../define.h"
+
+typedef unsigned char			byte;
+#define PASS				1
+#define FAIL				-1
+#define ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct PrimaryMcuData			*ShmPrimaryMcuData;
+struct CHAdeMOData				*ShmCHAdeMOData;
+struct CcsData					*ShmCcsData;
+struct FanModuleData			*ShmFanModuleData;
+struct RelayModuleData			*ShmRelayModuleData;
+
+struct ChargingInfoData 		*_chargingData[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+int gunCount = CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY;
+
+char *msg = "state : get gun state (index) \n"
+		"card : scanning card (x) : \n"
+		"gun : get gun plugit state (index) \n"
+		"lock : get gun locked state (index) \n"
+		"self : self test state (x) \n"
+		"ver : ver of board (407 or index or rb or fan) \n"
+		"ac : get ac relay state (x) \n";
+
+bool FindChargingInfoData(byte target, struct ChargingInfoData **chargingData)
+{
+	for (byte index = 0; index < CHAdeMO_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.ChademoChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < CCS_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.CcsChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[index];
+			return true;
+		}
+	}
+
+	for (byte index = 0; index < GB_QUANTITY; index++)
+	{
+		if (ShmSysConfigAndInfo->SysInfo.GbChargingData[index].Index == target)
+		{
+			chargingData[target] = &ShmSysConfigAndInfo->SysInfo.GbChargingData[index];
+			return true;
+		}
+	}
+
+	return false;
+}
+
+int InitShareMemory()
+{
+	int result = PASS;
+	int MeterSMId;
+
+	//initial ShmSysConfigAndInfo
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo),  0777)) < 0)
+    {
+		result = FAIL;
+	}
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	result = FAIL;
+   	 }
+    else
+    {}
+
+   	//initial ShmStatusCodeData
+   	if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  0777)) < 0)
+    {
+   		result = FAIL;
+	}
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	result = FAIL;
+   	}
+    else
+    {}
+
+   	if(CHAdeMO_QUANTITY > 0)
+   	{
+		if ((MeterSMId = shmget(ShmCHAdeMOCommKey, sizeof(struct CHAdeMOData),
+				IPC_CREAT | 0777)) < 0) {
+			result = FAIL;
+		} else if ((ShmCHAdeMOData = shmat(MeterSMId, NULL, 0))
+				== (void *) -1) {
+			result = FAIL;
+		} else {
+		}
+   	}
+
+   	if(CCS_QUANTITY > 0)
+   	{
+		if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData),
+				IPC_CREAT | 0777)) < 0) {
+			result = FAIL;
+		} else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1) {
+			result = FAIL;
+		} else {
+		}
+   	}
+
+   	if ((MeterSMId = shmget(ShmPrimaryMcuKey, sizeof(struct PrimaryMcuData), IPC_CREAT | 0777)) < 0)
+   	{
+   		result = FAIL;
+   	}
+   	else if ((ShmPrimaryMcuData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+   	{
+   		result = FAIL;
+   	}
+
+   	if ((MeterSMId = shmget(ShmFanBdKey, sizeof(struct FanModuleData),	IPC_CREAT | 0777)) < 0)
+   	{
+   		result = FAIL;
+   	}
+   	else if ((ShmFanModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+   	{
+   		result = FAIL;
+   	}
+
+   	if ((MeterSMId = shmget(ShmRelayBdKey, sizeof(struct RelayModuleData),	IPC_CREAT | 0777)) < 0)
+   	{
+   		result = FAIL;
+   	}
+   	else if ((ShmRelayModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+   	{
+   		result = FAIL;
+   	}
+
+    return result;
+}
+
+void RunStatusProc(char *v1, char *v2)
+{
+	int _index = atoi(v1);
+	if (!FindChargingInfoData(_index, &_chargingData[0]))
+	{
+		printf ("FindChargingInfoData error\n");
+		return;
+	}
+
+	if (strcmp(v2, "-1") == 0 || strcmp(v2, "") == 0)
+	{
+		// get
+		printf ("index = %x, status = %x\n", _index, _chargingData[_index]->SystemStatus);
+	}
+	else
+	{
+		// set
+		_chargingData[_index]->SystemStatus = atoi(v2);
+	}
+}
+
+void RunCardProc(char *v1, char *v2)
+{
+	if (ShmSysConfigAndInfo->SysInfo.WaitForPlugit)
+	{
+		ShmSysConfigAndInfo->SysInfo.WaitForPlugit = 0x00;
+		printf ("SysInfo.WaitForPlugit = %x \n", ShmSysConfigAndInfo->SysInfo.WaitForPlugit);
+	}
+	else
+	{
+		ShmSysConfigAndInfo->SysInfo.WaitForPlugit = 0x01;
+		printf ("SysInfo.WaitForPlugit = %x \n", ShmSysConfigAndInfo->SysInfo.WaitForPlugit);
+	}
+}
+
+void RunGunPlugitProc(char *v1, char *v2)
+{
+	int _index = atoi(v1);
+	if (!FindChargingInfoData(_index, &_chargingData[0]))
+	{
+		printf("FindChargingInfoData error\n");
+		return;
+	}
+
+	if (strcmp(v2, "-1") == 0 || strcmp(v2, "") == 0)
+	{
+		// get
+		printf("index = %x, plug it = %x\n", _index, _chargingData[_index]->ConnectorPlugIn);
+	}
+	else
+	{
+		// set
+		_chargingData[_index]->ConnectorPlugIn = atoi(v2);
+	}
+}
+
+void GetGunLockStatusProc(char *v1, char *v2)
+{
+	if (strcmp(v1, "0") == 0)
+	{
+		printf("Gun Locked Status = %x \n", _chargingData[0]->GunLocked);
+	}
+
+	if (strcmp(v1, "1") == 0)
+	{
+		printf("Gun Locked Status = %x \n", _chargingData[1]->GunLocked);
+	}
+}
+
+void SetSystemIDProc()
+{
+	char *systemId = "Alston_Test";
+	memcpy(&ShmSysConfigAndInfo->SysConfig.SystemId, systemId, strlen(systemId));
+}
+
+void RunSelfProc()
+{
+	printf("self test status = %x\n", ShmSysConfigAndInfo->SysInfo.SelfTestSeq);
+}
+
+void GetFwVerProc(char *v1)
+{
+	if (strcmp(v1, "407") == 0)
+	{
+		printf("407 FW Version = %s \n", ShmPrimaryMcuData->version);
+	}
+	else if (strcmp(v1, "0") == 0)
+	{
+		printf("Ev board 1 FW Version = %s \n", ShmCHAdeMOData->evse[0].version);
+		printf("Ev board 1 FW Version = %s \n", ShmCcsData->V2GMessage_DIN70121->version);
+	}
+	else if (strcmp(v1, "1") == 0)
+	{
+		printf("Ev board 2 FW Version = %s \n", ShmCHAdeMOData->evse[1].version);
+		printf("Ev board 2 FW Version = %s \n", ShmCcsData->V2GMessage_DIN70121->version);
+	}
+	else if (strcmp(v1, "rb") == 0)
+	{
+		printf("RB Version = %s \n", ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev);
+	}
+	else if (strcmp(v1, "fan") == 0)
+	{
+		printf("FAN Version = %s \n", ShmSysConfigAndInfo->SysInfo.FanModuleFwRev);
+	}
+}
+
+void FwUpdateFlagProc()
+{
+	ShmSysConfigAndInfo->SysInfo.FirmwareUpdate = 0x01;
+}
+
+void CheckAcStatus(char *v1)
+{
+	if (strcmp(v1, "-1") == 0|| strcmp(v1, "") == 0)
+	{
+		printf("AC Status = %d \n", ShmSysConfigAndInfo->SysInfo.AcContactorStatus);
+	}
+}
+
+void SetCableChkStatus(char *v1, char *v2)
+{
+	int _index = atoi(v1);
+	if (!FindChargingInfoData(_index, &_chargingData[0]))
+	{
+		printf ("FindChargingInfoData error\n");
+		return;
+	}
+
+	_chargingData[_index]->GroundFaultStatus = atoi(v2);
+}
+
+void SetPowerValue(char *v1, char *v2)
+{
+//	int _index = atoi(v1);
+//	if (!FindChargingInfoData(_index, &_chargingData[0])) {
+//		printf("FindChargingInfoData error\n");
+//		return;
+//	}
+//
+//	if (strcmp(v2, "-1") == 0 || strcmp(v2, "") == 0) {
+//		// get
+//		printf("index = %x, max cur = %f\n", _index,
+//				_chargingData[_index]->MaxChargingCurrentForTest);
+//	} else {
+//		// set
+//		_chargingData[_index]->MaxChargingCurrentForTest = atoi(v2);
+//	}
+}
+
+void GetGunSelectedNum(char *v1)
+{
+	if (strcmp(v1, "-1") == 0 || strcmp(v1, "") == 0)
+		printf("connector selected = %d \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+	else
+	{
+		int _index = atoi(v1);
+		ShmSysConfigAndInfo->SysInfo.CurGunSelected = _index;
+		printf("connector select changed = %d \n", _index);
+	}
+}
+
+void ChangeToSpMode()
+{
+	unsigned char _index = 0;
+	if (gunCount <= 0)
+		return;
+
+	for (int i = 0; i < gunCount; i++)
+	{
+		_chargingData[i]->SystemStatus = 20;
+	}
+
+	if (!FindChargingInfoData(_index, &_chargingData[0]))
+	{
+		printf ("FindChargingInfoData error\n");
+		return;
+	}
+
+	_chargingData[_index]->SystemStatus = 19;
+}
+
+int main(void)
+{
+	if(InitShareMemory() == FAIL)
+	{
+		printf ("InitShareMemory = FAIL \n");
+		if(ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		sleep(5);
+		return 0;
+	}
+
+	for(;;)
+	{
+		char word[128];
+		char newString[7][10];
+		int i,j,ctr;
+
+		fgets(word, sizeof(word), stdin);
+
+		j=0; ctr=0;
+		strcpy(newString[1], "-1");
+		strcpy(newString[2], "-1");
+		for (i = 0; i <= (strlen(word)); i++)
+		{
+			if (word[i] == ' ' || word[i] == '\0' || word[i] == 10)
+			{
+				newString[ctr][j] = '\0';
+				ctr++;
+				j = 0;
+			}
+			else
+			{
+				newString[ctr][j] = word[i];
+				j++;
+			}
+		}
+
+		if(strcmp(newString[0], "state") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0 || strcmp(newString[1], "") == 0)
+				continue;
+
+			// 槍狀態
+			RunStatusProc(newString[1], newString[2]);
+			continue;
+		}
+		else if(strcmp(newString[0], "card") == 0)
+		{
+			// 刷卡狀態
+			RunCardProc(newString[1], newString[2]);
+			continue;
+		}
+		else if(strcmp(newString[0], "gun") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0	|| strcmp(newString[1], "") == 0)
+				continue;
+
+			// 插槍狀態
+			RunGunPlugitProc(newString[1], newString[2]);
+			continue;
+		}
+		else if(strcmp(newString[0], "lock") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0	|| strcmp(newString[1], "") == 0)
+				continue;
+
+			// 插槍狀態
+			GetGunLockStatusProc(newString[1], newString[2]);
+			continue;
+		}
+		else if(strcmp(newString[0], "sysid") == 0)
+		{
+			// 測試 sys id
+			SetSystemIDProc();
+			continue;
+		}
+		else if(strcmp(newString[0], "self") == 0)
+		{
+			// CSU 自我檢測狀態
+			RunSelfProc(newString[1]);
+			continue;
+		}
+		else if(strcmp(newString[0], "ver") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0	|| strcmp(newString[1], "") == 0)
+				continue;
+			// 取 FW 版號
+			GetFwVerProc(newString[1]);
+			continue;
+		}
+		else if (strcmp(newString[0], "update") == 0)
+		{
+			// 更新
+			FwUpdateFlagProc(newString[1]);
+			continue;
+		}
+		else if (strcmp(newString[0], "ac") == 0)
+		{
+			// AC contactor 狀態
+			CheckAcStatus(newString[1]);
+			continue;
+		}
+		else if (strcmp(newString[0], "cable") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0 || strcmp(newString[1], "") == 0)
+				continue;
+			// cable check pass
+			SetCableChkStatus(newString[1], newString[2]);
+			continue;
+		}
+		else if (strcmp(newString[0], "pow") == 0)
+		{
+			if (strcmp(newString[1], "-1") == 0 || strcmp(newString[1], "") == 0)
+				continue;
+			// cable check pass
+			SetPowerValue(newString[1], newString[2]);
+			continue;
+		}
+		else if(strcmp(newString[0], "select") == 0)
+		{
+			// 取得當前選的槍號
+			GetGunSelectedNum(newString[1]);
+			continue;
+		}
+		else if(strcmp(newString[0], "spmode") == 0)
+		{
+			// 改變系統模式到特殊測試模式
+			//ChangeToSpMode();
+			continue;
+		}
+		printf ("%s\n", msg);
+		usleep(100000);
+	}
+
+	return 0;
+}

BIN
EVSE/Projects/DS60-120/Apps/ReadCmdline.o


+ 10 - 0
EVSE/Projects/DS60-120/Apps/init.sh

@@ -0,0 +1,10 @@
+chmod 777 Module_CSU
+chmod 777 Module_PrimaryComm
+chmod 777 Module_LcmControl
+chmod 777 Module_InternalComm
+chmod 777 Module_EventLogging
+chmod 777 Module_EvComm
+chmod 777 Module_PsuComm
+chmod 777 kill.sh
+chmod 777 ReadCmdline
+

+ 753 - 0
EVSE/Projects/DS60-120/Apps/internalComm.c

@@ -0,0 +1,753 @@
+/*
+ * internalComm.c
+ *
+ *  Created on: 201957
+ *      Author: foluswen
+ */
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include 	"internalComm.h"
+
+#define PASS				1
+#define FAIL				-1
+
+struct Address Addr={0x01,0x02,0x03,0xFF};
+struct Command Cmd={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x81,0x85,0x86,0x87,0xe0,0xe1,0xe2,0xe3};
+
+int tranceive(int fd, unsigned char* cmd, unsigned char cmd_len, unsigned char* rx)
+{
+	int len;
+	//sleep(2); //required to make flush work, for some reason
+	tcflush(fd,TCIOFLUSH);
+	if(write(fd, cmd, cmd_len) >= cmd_len)
+	{
+		usleep(10000);
+		len = read(fd, rx, 512);
+	}
+	else
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("Serial command %s response fail.\n", cmd);
+		#endif
+	}
+
+	return len;
+}
+
+unsigned char Query_FW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_FW_Ver, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			memcpy(Ret_Buf->Version_FW, (char *)rx+6, (rx[4] | rx[5]<<8));
+			*(Ret_Buf->Version_FW + 8) = 0x00;
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_HW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_HW_Ver, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			memcpy(Ret_Buf->Version_HW, (char *)rx+6, (rx[4] | rx[5]<<8));
+			*(Ret_Buf->Version_HW + 8) = 0x00;
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Present_InputVoltage(unsigned char fd, unsigned char targetAddr, PresentInputVoltage *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Present_InputVoltage, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			Ret_Buf->inputType = rx[6];
+			Ret_Buf->L1N_L12 =(rx[7] | (rx[8]<<8))/10.0;
+			Ret_Buf->L2N_L23 =(rx[9] | (rx[10]<<8))/10.0;
+			Ret_Buf->L3N_L31 =(rx[11] | (rx[12]<<8))/10.0;
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Present_OutputVoltage(unsigned char fd, unsigned char targetAddr, PresentOutputVoltage *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Present_OutputVoltage, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+
+			Ret_Buf->behindFuse_Voltage_C1 =(rx[6] | (rx[7]<<8));
+			Ret_Buf->behindRelay_Voltage_C1 =(rx[8] | (rx[9]<<8));
+			if((rx[4] | rx[5]<<8) > 4)
+			{
+				Ret_Buf->behindFuse_Voltage_C2 =(rx[10] | (rx[11]<<8));
+				Ret_Buf->behindRelay_Voltage_C2 =(rx[12] | (rx[13]<<8));
+			}
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Fan_Speed(unsigned char fd, unsigned char targetAddr, FanSpeed *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Fan_Speed, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+		for (int i = 0; i < 7; i++)
+			printf("tx = %x \n", tx[i]);
+		for (int i = 0; i < len; i++)
+			printf("rx = %x \n", rx[i]);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			for(int idx=0;idx < 4;idx++)
+				Ret_Buf->speed[idx] = (rx[6+(2*idx)] | (rx[6+(2*idx)+1]<<8));
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Temperature(unsigned char fd, unsigned char targetAddr, Temperature *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Temperature, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			for(int idx=0;idx < 4;idx++)
+				Ret_Buf->temperature[idx] = rx[6+idx] - 60;
+
+			result = PASS;
+		}
+	}
+
+
+	return result;
+}
+
+unsigned char Query_Aux_PowerVoltage(unsigned char fd, unsigned char targetAddr, AuxPower *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Aux_PowerVoltage, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			for(int idx=0;idx<(rx[4] | rx[5]<<8);idx++)
+				Ret_Buf->voltage[idx] = rx[6+idx];
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Relay_Output(unsigned char fd, unsigned char targetAddr, Relay *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Relay_Output, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+//	for (int i = 0; i < 7; i++)
+//		printf("tx = %x \n", tx[i]);
+//	for (int i = 0; i < len; i++)
+//		printf("rx = %x \n", rx[i]);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			Ret_Buf->relay_event.bits.AC_Contactor = (rx[6] >> 0) & 0x01;
+			Ret_Buf->relay_event.bits.CCS_Precharge = (rx[6] >> 1) & 0x01;
+
+			Ret_Buf->relay_event.bits.Gun1_N = (rx[7] >> 0) & 0x01;
+			Ret_Buf->relay_event.bits.Gun1_P = (rx[7] >> 1) & 0x01;
+			Ret_Buf->relay_event.bits.Gun1_Parallel_N = (rx[7] >> 2) & 0x01;
+			Ret_Buf->relay_event.bits.Gun1_Parallel_P = (rx[7] >> 3) & 0x01;
+
+			Ret_Buf->relay_event.bits.Gun2_N = (rx[8] >> 0) & 0x01;
+			Ret_Buf->relay_event.bits.Gun2_P = (rx[8] >> 1) & 0x01;
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Gfd_Adc(unsigned char fd, unsigned char targetAddr, Gfd *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Gfd_Adc, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+//	for(int i = 0; i < 7; i++)
+//		printf ("tx = %d \n", tx[i]);
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+		{
+			printf("Query_Gfd_Adc fail \n");
+			return result;
+		}
+
+//		for(int i = 0; i < len; i++)
+//			printf ("rx = %d \n", rx[i]);
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			Ret_Buf->Resister_conn1 = (rx[6] | (rx[7] << 8));
+			Ret_Buf->voltage_conn1 = (rx[8] | (rx[9] << 8));
+			Ret_Buf->result_conn1 = rx[10];
+			Ret_Buf->rb_step_1 = rx[11];
+
+			Ret_Buf->Resister_conn2 = (rx[12] | (rx[13] << 8));
+			Ret_Buf->voltage_conn2 = (rx[14] | (rx[15] << 8));
+			Ret_Buf->result_conn2 = rx[16];
+			Ret_Buf->rb_step_2 = rx[17];
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Query_Gpio_Input(unsigned char fd, unsigned char targetAddr, Gpio_in *Ret_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.query_Gpio_In, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			Ret_Buf->AC_Connector 		= (rx[6] >> 0) & 0x01;
+			Ret_Buf->AC_MainBreaker 	= (rx[6] >> 1) & 0x01;
+			Ret_Buf->SPD 				= (rx[6] >> 2) & 0x01;
+			Ret_Buf->Door_Open 			= (rx[6] >> 3) & 0x01;
+			Ret_Buf->GFD[0] 			= (rx[6] >> 4) & 0x01;
+			Ret_Buf->GFD[1] 			= (rx[6] >> 5) & 0x01;
+			Ret_Buf->AC_Drop 			= (rx[6] >> 6) & 0x01;
+
+			Ret_Buf->Emergency_IO		= (rx[7] >> 0) & 0x01;
+
+			Ret_Buf->Button_Emergency_Press	= (rx[8] >> 0) & 0x01;
+			Ret_Buf->Button_On_Press 	= (rx[8] >> 1) & 0x01;
+			Ret_Buf->Button_Off_Press	= (rx[8] >> 2) & 0x01;
+			Ret_Buf->Key_1_Press 		= (rx[8] >> 3) & 0x01;
+			Ret_Buf->Key_2_Press 		= (rx[8] >> 4) & 0x01;
+			Ret_Buf->Key_3_Press 		= (rx[8] >> 5) & 0x01;
+			Ret_Buf->Key_4_Press 		= (rx[8] >> 6) & 0x01;
+
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Config_Fan_Speed(unsigned char fd, unsigned char targetAddr, FanSpeed *Set_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[15] = {0xaa, 0x00, targetAddr, Cmd.config_Fan_Speed, 0x08, 0x00, Set_Buf->speed[0]&0xff, (Set_Buf->speed[0]>>8)&0xff, Set_Buf->speed[1]&0xff, (Set_Buf->speed[1]>>8)&0xff, Set_Buf->speed[2]&0xff, (Set_Buf->speed[2]>>8)&0xff, Set_Buf->speed[3]&0xff, (Set_Buf->speed[3]>>8)&0xff, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for(int idx = 0;idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[14] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		chksum = 0x00;
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Config_Relay_Output(unsigned char fd, unsigned char targetAddr, Relay *Set_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[10] = {0xaa, 0x00, targetAddr, Cmd.config_Relay_Output, 0x03, 0x00, Set_Buf->relay_event.relay_status[0], Set_Buf->relay_event.relay_status[1], Set_Buf->relay_event.relay_status[2]};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for(int idx = 6;idx<8;idx++)
+		chksum ^= tx[idx];
+	tx[9] = chksum;
+
+//	for (int i = 0; i < 10; i++)
+//		printf("set relay cmd : tx = %x \n", tx[i]);
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+//		for (int i = 0; i < len; i++)
+//			printf("set relay cmd : rx = %x \n", rx[i]);
+
+		chksum = 0x00;
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x01))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Config_Gpio_Output(unsigned char fd, unsigned char targetAddr, Gpio_out *Set_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[9] = {0xaa, 0x00, targetAddr, Cmd.config_Gpio_Output, 0x01, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	tx[6] |= (Set_Buf->AC_Connector?0x01:0x00);
+
+	for(int idx = 0;idx<2;idx++)
+		tx[6] |= (Set_Buf->Button_LED[idx]?0x01:0x00)<<(1+idx);
+
+	for(int idx = 0;idx<4;idx++)
+			tx[6] |= (Set_Buf->System_LED[idx]?0x01:0x00)<<(3+idx);
+
+	for(int idx = 0;idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[14] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		chksum = 0x00;
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == tx[6]))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Config_Gfd_Value(unsigned char fd, unsigned char targetAddr, Gfd_config *Set_Buf)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[9] = {0xaa, 0x00, targetAddr, Cmd.config_Gfd_Value, 0x02, 0x00, 0x00, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	tx[6] = Set_Buf->index;
+	tx[7] = Set_Buf->state;
+
+	for(int idx = 0; idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[8] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		chksum = 0x00;
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == tx[6]))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Start(unsigned char fd, unsigned char targetAddr, unsigned int crc32)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[11] = {0xaa, 0x00, targetAddr, Cmd.update_Start, 0x04, 0x00, (crc32>>0)&0xff, (crc32>>8)&0xff, (crc32>>16)&0xff, (crc32>>24)&0xff, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	for(int idx = 0;idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[10] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		chksum = 0x00;
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Abord(unsigned char fd, unsigned char targetAddr)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.update_Start, 0x04, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Transfer(unsigned char fd, unsigned char targetAddr, unsigned int startAddr, unsigned char *data, unsigned short int length)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[11 + length];
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+
+	tx[0] = 0xaa;
+	tx[1] = 0x00;
+	tx[2] = targetAddr;
+	tx[3] = Cmd.update_Transfer;
+	tx[4] = (4 + length) & 0xff;
+	tx[5] = ((4 + length)>>8) & 0xff;
+	tx[6] = (startAddr>>0) & 0xff;
+	tx[7] = (startAddr>>8) & 0xff;
+	tx[8] = (startAddr>>16) & 0xff;
+	tx[9] = (startAddr>>24) & 0xff;
+	memcpy(tx+10, data, length);
+
+	for(int idx = 0;idx<(tx[4] | tx[5]<<8);idx++)
+		chksum ^= tx[6+idx];
+	tx[sizeof(tx)-1] = chksum;
+
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}
+
+unsigned char Update_Finish(unsigned char fd, unsigned char targetAddr)
+{
+	unsigned char result = FAIL;
+	unsigned char tx[7] = {0xaa, 0x00, targetAddr, Cmd.update_Finish, 0x04, 0x00, 0x00};
+	unsigned char rx[512];
+	unsigned char chksum = 0x00;
+	unsigned char len = tranceive(fd, tx, sizeof(tx), rx);
+
+	if(len > 6)
+	{
+		if (len < 6+(rx[4] | rx[5]<<8))
+			return result;
+
+		for(int idx = 0;idx<(rx[4] | rx[5]<<8);idx++)
+		{
+			chksum ^= rx[6+idx];
+		}
+
+		if((chksum == rx[6+(rx[4] | rx[5]<<8)]) &&
+		   (rx[2] == tx[1]) &&
+		   (rx[1] == tx[2]) &&
+		   (rx[3] == tx[3]) &&
+		   (rx[6] == 0x00))
+		{
+			result = PASS;
+		}
+	}
+
+	return result;
+}

+ 185 - 0
EVSE/Projects/DS60-120/Apps/internalComm.h

@@ -0,0 +1,185 @@
+/*
+ * internalComm.h
+ *
+ *  Created on: 2019¦~5¤ë7¤é
+ *      Author: foluswen
+ */
+
+#ifndef INTERNALCOMM_H_
+#define INTERNALCOMM_H_
+
+extern struct Address
+{
+	unsigned char Aux;
+	unsigned char Fan;
+	unsigned char Relay;
+	unsigned char Broadcast;
+}Addr;
+
+extern struct Command
+{
+	unsigned char query_FW_Ver; 				//0x01
+	unsigned char query_HW_Ver; 				//0x02
+	unsigned char query_Present_InputVoltage;	//0x03
+	unsigned char query_Present_OutputVoltage;	//0x04
+	unsigned char query_Fan_Speed;				//0x05
+	unsigned char query_Temperature;			//0x06
+	unsigned char query_Aux_PowerVoltage;		//0x07
+	unsigned char query_Relay_Output;			//0x08
+	unsigned char query_Gfd_Adc;				//0x09
+	unsigned char query_Gpio_In;				//0x0a
+
+	unsigned char config_Fan_Speed;			//0x81
+	unsigned char config_Relay_Output;			//0x85
+	unsigned char config_Gpio_Output;			//0x86
+	unsigned char config_Gfd_Value;			//0x87
+
+	unsigned char update_Start;				//0xe0
+	unsigned char update_Abort;				//0xe1
+	unsigned char update_Transfer;				//0xe2
+	unsigned char update_Finish;				//0xe3
+
+}Cmd;
+
+typedef struct Verion
+{
+	char Version_FW[9];
+	char Version_HW[9];
+}Ver;
+
+typedef struct PRESENTINPUTVOLTAGE
+{
+	unsigned char inputType;	// 0x00: Line to Line       0x01: Line to Neutral
+	double L1N_L12;
+	double L2N_L23;
+	double L3N_L31;
+}PresentInputVoltage;
+
+typedef struct PRESENTOUTPUTVOLTAGE
+{
+	double behindFuse_Voltage_C1;
+	double behindRelay_Voltage_C1;
+	double behindFuse_Voltage_C2;
+	double behindRelay_Voltage_C2;
+}PresentOutputVoltage;
+
+typedef struct FANSPEED
+{
+	unsigned short int speed[8];
+}FanSpeed;
+
+typedef struct TEMPERATURE
+{
+	unsigned char temperature[8];
+}Temperature;
+
+typedef struct AUXPOWER
+{
+	unsigned char voltage[8];
+}AuxPower;
+
+typedef struct RELAY
+{
+	union
+	{
+		unsigned char relay_status[8];
+		struct
+		{
+			unsigned char AC_Contactor :1;		//bit 0
+			unsigned char CCS_Precharge :1;	//bit 1
+			unsigned char :1;  				//bit 2 reserved
+			unsigned char :1;					//bit 3 reserved
+			unsigned char :1;					//bit 4 reserved
+			unsigned char :1;					//bit 5 reserved
+			unsigned char :1;					//bit 6 reserved
+			unsigned char :1;					//bit 7 reserved
+
+			unsigned char Gun1_N :1;			//bit 0
+			unsigned char Gun1_P :1;			//bit 1
+			unsigned char Gun1_Parallel_N :1;  //bit 2
+			unsigned char Gun1_Parallel_P :1;	//bit 3
+			unsigned char :1;					//bit 4 reserved
+			unsigned char :1;					//bit 5 reserved
+			unsigned char :1;					//bit 6 reserved
+			unsigned char :1;					//bit 7 reserved
+
+			unsigned char Gun2_N :1;			//bit 0
+			unsigned char Gun2_P :1;			//bit 1
+			unsigned char :1; 					//bit 2 reserved
+			unsigned char :1;					//bit 3 reserved
+			unsigned char :1;					//bit 4 reserved
+			unsigned char :1;					//bit 5 reserved
+			unsigned char :1;					//bit 6 reserved
+			unsigned char :1;					//bit 7 reserved
+		}bits;
+	}relay_event;
+}Relay;
+
+typedef struct GFD
+{
+	unsigned short Resister_conn1;
+	unsigned short voltage_conn1;
+	unsigned char result_conn1;
+	unsigned char rb_step_1;
+
+	unsigned short Resister_conn2;
+	unsigned short voltage_conn2;
+	unsigned char result_conn2;
+	unsigned char rb_step_2;
+}Gfd;
+
+typedef struct Gfd_CONFIG
+{
+	unsigned char index;
+	unsigned char state;
+}Gfd_config;
+
+typedef struct GPIO_IN
+{
+	unsigned char AC_Connector;			// bit 0
+	unsigned char AC_MainBreaker;			// bit 1
+	unsigned char SPD;						// bit 2
+	unsigned char Door_Open;				// bit 3
+	unsigned char GFD[2];					// bit 4,5
+	unsigned char AC_Drop;					// bit 6
+
+	unsigned char Emergency_IO;			// bit 0
+
+	unsigned char Button_Emergency_Press;	// bit 0
+	unsigned char Button_On_Press;			// bit 1
+	unsigned char Button_Off_Press;		// bit 2
+	unsigned char Key_1_Press;				// bit 3
+	unsigned char Key_2_Press;				// bit 4
+	unsigned char Key_3_Press;				// bit 5
+	unsigned char Key_4_Press;				// bit 6
+}Gpio_in;
+
+typedef struct GPIO_OUT
+{
+	unsigned char AC_Connector;
+	unsigned char Button_LED[2];
+	unsigned char System_LED[4];
+}Gpio_out;
+
+extern unsigned char Query_FW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf);
+extern unsigned char Query_HW_Ver(unsigned char fd, unsigned char targetAddr, Ver *Ret_Buf);
+extern unsigned char Query_Present_InputVoltage(unsigned char fd, unsigned char targetAddr, PresentInputVoltage *Ret_Buf);
+extern unsigned char Query_Present_OutputVoltage(unsigned char fd, unsigned char targetAddr, PresentOutputVoltage *Ret_Buf);
+extern unsigned char Query_Fan_Speed(unsigned char fd, unsigned char targetAddr, FanSpeed *Ret_Buf);
+extern unsigned char Query_Temperature(unsigned char fd, unsigned char targetAddr, Temperature *Ret_Buf);
+extern unsigned char Query_Aux_PowerVoltage(unsigned char fd, unsigned char targetAddr, AuxPower *Ret_Buf);
+extern unsigned char Query_Relay_Output(unsigned char fd, unsigned char targetAddr, Relay *Ret_Buf);
+extern unsigned char Query_Gfd_Adc(unsigned char fd, unsigned char targetAddr, Gfd *Ret_Buf);
+extern unsigned char Query_Gpio_Input(unsigned char fd, unsigned char targetAddr, Gpio_in *Ret_Buf);
+
+extern unsigned char Config_Fan_Speed(unsigned char fd, unsigned char targetAddr, FanSpeed *Set_Buf);
+extern unsigned char Config_Relay_Output(unsigned char fd, unsigned char targetAddr, Relay *Set_Buf);
+extern unsigned char Config_Gpio_Output(unsigned char fd, unsigned char targetAddr, Gpio_out *Set_Buf);
+extern unsigned char Config_Gfd_Value(unsigned char fd, unsigned char targetAddr, Gfd_config *Set_Buf);
+
+extern unsigned char Update_Start(unsigned char fd, unsigned char targetAddr, unsigned int crc32);
+extern unsigned char Update_Abord(unsigned char fd, unsigned char targetAddr);
+extern unsigned char Update_Transfer(unsigned char fd, unsigned char targetAddr, unsigned int startAddr, unsigned char *data, unsigned short int length);
+extern unsigned char Update_Finish(unsigned char fd, unsigned char targetAddr);
+
+#endif /* INTERNALCOMM_H_ */

BIN
EVSE/Projects/DS60-120/Apps/internalComm.o


+ 8 - 0
EVSE/Projects/DS60-120/Apps/kill.sh

@@ -0,0 +1,8 @@
+killall Module_CSU
+killall Module_PrimaryComm
+killall Module_LcmControl
+killall Module_InternalComm
+killall Module_EventLogging
+killall Module_EvComm
+killall Module_PsuComm
+

BIN
EVSE/Projects/DS60-120/Apps/main


+ 2825 - 0
EVSE/Projects/DS60-120/Apps/main.c

@@ -0,0 +1,2825 @@
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>      /*標準輸入輸出定義*/
+#include    <stdlib.h>     /*標準函數庫定義*/
+#include    <unistd.h>     /*Unix 標準函數定義*/
+#include    <fcntl.h>      /*檔控制定義*/
+#include    <termios.h>    /*PPSIX 終端控制定義*/
+#include    <errno.h>      /*錯誤號定義*/
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include 	<math.h>
+#include 	"../../define.h"
+#include 	"Config.h"
+#include 	<stdbool.h>
+#include 	<dirent.h>
+#include	"timeout.h"
+
+#define 	Debug
+#define 	ARRAY_SIZE(A)		(sizeof(A) / sizeof(A[0]))
+#define 	PASS				1
+#define 	FAIL				-1
+#define 	BUFFER_SIZE			128
+#define 	YES					1
+#define 	NO					0
+#define 	NORMAL				0
+#define		ABNORMAL			1
+#define 	EQUAL				0
+#define 	BTN_RELEASE			0
+#define 	BTN_PRESS			1
+#define 	MAX_BUF 			64
+#define 	SYSFS_GPIO_DIR 		"/sys/class/gpio"
+
+unsigned char mask_table[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
+int whileLoopTime = 10000; // 10 ms
+
+bool IsAuthorizingMode();
+void ClearAuthorizedFlag();
+bool isDetectPlugin();
+void ClearDetectPluginFlag();
+int mystrcmp(unsigned char *p1, unsigned char *p2);
+
+unsigned char DetectBitValue(unsigned char _byte, unsigned char _bit);
+void SetBitValue(unsigned char *_byte, unsigned char _bit, unsigned char value);
+void ChargingTerminalProcess(byte gunIndex);
+void ChkPrimaryStatus();
+void StartSystemTimeoutDet(unsigned char flag);
+void StopSystemTimeoutDet();
+void StartGunInfoTimeoutDet(unsigned char gunIndex, unsigned char flag);
+void StopGunInfoTimeoutDet(unsigned char gunIndex);
+int StoreLogMsg_1(const char *fmt, ...);
+unsigned long GetTimeoutValue(struct timeval _sour_time);
+
+#define DEBUG_INFO_1(format, args...) StoreLogMsg_1("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN_1(format, args...) StoreLogMsg_1("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR_1(format, args...) StoreLogMsg_1("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+struct SysConfigAndInfo			*ShmSysConfigAndInfo;
+struct StatusCodeData 			*ShmStatusCodeData;
+struct PsuData 					*ShmPsuData;
+struct CHAdeMOData				*ShmCHAdeMOData;
+struct CcsData					*ShmCcsData;
+struct PrimaryMcuData			*ShmPrimaryMcuData;
+struct FanModuleData			*ShmFanModuleData;
+struct RelayModuleData			*ShmRelayModuleData;
+struct OCPP16Data				*ShmOCPP16Data;
+
+struct ChargingInfoData			*chargingInfo[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+struct timeb 					startChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+struct timeb 					endChargingTime[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY];
+
+byte _gunCount = 0;
+// for initial index to check EV board type is correct
+byte _gunIndex = 0;
+byte _chademoIndex = 0;
+byte _ccsIndex = 0;
+byte _gb_Index = 0;
+byte bd0_1_status = 0;
+byte bd0_2_status = 0;
+byte bd1_1_status = 0;
+byte bd1_2_status = 0;
+
+bool isCardScan = false;
+
+int rfidFd = -1;
+char* rfidPortName = "/dev/ttyS2";
+byte autoReturnTimeoutFlag = 0x00;
+
+//================================================
+// initial can-bus
+//================================================
+int InitCanBus()
+{
+	int 					s0,nbytes;
+	struct timeval			tv;
+	struct ifreq 			ifr0;
+	struct sockaddr_can		addr0;
+
+	system("/sbin/ip link set can0 down");
+	system("/sbin/ip link set can0 type can bitrate 500000 restart-ms 100");
+	system("/sbin/ip link set can0 up");
+
+	s0 = socket(PF_CAN, SOCK_RAW, CAN_RAW);
+
+	tv.tv_sec = 0;
+	tv.tv_usec = 10000;
+   	if (setsockopt(s0, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("Set SO_RCVTIMEO NG");
+		#endif
+	}
+	nbytes=40960;
+	if (setsockopt(s0, SOL_SOCKET,  SO_RCVBUF, &nbytes, sizeof(int)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("Set SO_RCVBUF NG");
+		#endif
+	}
+	nbytes=40960;
+	if (setsockopt(s0, SOL_SOCKET, SO_SNDBUF, &nbytes, sizeof(int)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("Set SO_SNDBUF NG");
+		#endif
+	}
+
+   	strcpy(ifr0.ifr_name, "can0" );
+	ioctl(s0, SIOCGIFINDEX, &ifr0); /* ifr.ifr_ifindex gets filled with that device's index */
+	addr0.can_family = AF_CAN;
+	addr0.can_ifindex = ifr0.ifr_ifindex;
+	bind(s0, (struct sockaddr *)&addr0, sizeof(addr0));
+	return s0;
+}
+
+//================================================
+// initial uart port
+//================================================
+char *priPortName = "/dev/ttyS1";
+
+int InitComPort(byte id)
+{
+	int fd;
+	struct termios tios;
+
+	if (id == 0x04)
+		fd = open(priPortName, O_RDWR);
+
+	if(fd<=0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("open 407 Communication port NG \n");
+		#endif
+		return -1;
+	}
+	ioctl (fd, TCGETS, &tios);
+	tios.c_cflag = B115200| CS8 | CLOCAL | CREAD;
+	tios.c_lflag = 0;
+	tios.c_iflag = 0;
+	tios.c_oflag = 0;
+	tios.c_cc[VMIN]=0;
+	tios.c_cc[VTIME]=(unsigned char)1;
+	tios.c_lflag=0;
+	tcflush(fd, TCIFLUSH);
+	ioctl (fd, TCSETS, &tios);
+
+	return fd;
+}
+
+//=================================
+// Common routine
+//=================================
+int StoreLogMsg_1(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	sprintf(Buf,"echo \"%04d-%02d-%02d %02d:%02d:%02d - %s\" >> /Storage/SystemLog/[%04d.%02d]SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+	system(Buf);
+
+	return rc;
+}
+
+unsigned long GetTimeoutValue(struct timeval _sour_time)
+{
+	struct timeval _end_time;
+	gettimeofday(&_end_time, NULL);
+
+	return 1000000 * (_end_time.tv_sec - _sour_time.tv_sec) + _end_time.tv_usec - _sour_time.tv_usec;
+}
+
+int mystrcmp(unsigned char *p1, unsigned char *p2)
+{
+    while(*p1==*p2)
+    {
+        if(*p1=='\0' || *p2=='\0')
+            break;
+        p1++;
+        p2++;
+    }
+    if(*p1=='\0' && *p2=='\0')
+        return(PASS);
+    else
+        return(FAIL);
+}
+
+int DiffTimeb(struct timeb ST, struct timeb ET)
+{
+	//return milli-second
+	unsigned int StartTime,StopTime;
+
+	StartTime=(unsigned int)ST.time;
+	StopTime=(unsigned int)ET.time;
+	//return (StopTime-StartTime)*1000+ET.millitm-ST.millitm;
+	return (StopTime-StartTime);
+}
+
+void setChargerMode(byte gun_index, byte mode)
+{
+	chargingInfo[gun_index]->SystemStatus = mode;
+}
+
+//==========================================
+// Check interface status
+//==========================================
+int isInterfaceUp(const char *interface)
+{
+	int result = FAIL;
+
+	FILE *fp;
+	char cmd[256];
+	char buf[512];
+
+	strcpy(cmd, "ifconfig");
+	fp = popen(cmd, "r");
+	if(fp != NULL)
+	{
+		while(fgets(buf, sizeof(buf), fp) != NULL)
+		{
+			if(strstr(buf, interface) > 0)
+			{
+				result = PASS;
+			}
+		}
+	}
+	pclose(fp);
+
+	return result;
+}
+
+//=================================
+// Create all share memory
+//=================================
+int CreateShareMemory()
+{
+	int MeterSMId;
+
+	if ((MeterSMId = shmget(ShmSysConfigAndInfoKey,	sizeof(struct SysConfigAndInfo), IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmSysConfigAndInfo NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0))	== (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmSysConfigAndInfo NG \n");
+		#endif
+		return 0;
+	}
+	memset(ShmSysConfigAndInfo, 0, sizeof(struct SysConfigAndInfo));
+
+	if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData), IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmStatusCodeData NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmStatusCodeData NG \n");
+		#endif
+		return 0;
+	}
+
+	memset(ShmStatusCodeData, 0, sizeof(struct StatusCodeData));
+
+	//creat ShmPsuData
+	if ((MeterSMId = shmget(ShmPsuKey, sizeof(struct PsuData), IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmPsuData NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmPsuData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmPsuData NG \n");
+		#endif
+		return 0;
+	}
+	memset(ShmPsuData, 0, sizeof(struct PsuData));
+
+	if(CHAdeMO_QUANTITY > 0)
+	{
+		if ((MeterSMId = shmget(ShmCHAdeMOCommKey, sizeof(struct CHAdeMOData),	IPC_CREAT | 0777)) < 0)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmCHAdeMOData NG \n");
+			#endif
+			return 0;
+		}
+		else if ((ShmCHAdeMOData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmCHAdeMOData NG \n");
+			#endif
+			return 0;
+		}
+		memset(ShmCHAdeMOData, 0, sizeof(struct CHAdeMOData));
+	}
+
+	//creat ShmCcsData
+	if(CCS_QUANTITY > 0)
+	{
+		if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData),	IPC_CREAT | 0777)) < 0)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmCcsData NG \n");
+			#endif
+			return 0;
+		}
+		else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmCcsData NG \n");
+			#endif
+			return 0;
+		}
+		memset(ShmCcsData, 0, sizeof(struct CcsData));
+	}
+
+	//creat ShmPrimaryMcuData
+	if ((MeterSMId = shmget(ShmPrimaryMcuKey, sizeof(struct PrimaryMcuData), IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmPrimaryMcuData NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmPrimaryMcuData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmPrimaryMcuData NG \n");
+		#endif
+		return 0;
+	}
+	memset(ShmPrimaryMcuData, 0, sizeof(struct PrimaryMcuData));
+
+	//creat ShmFanModuleData
+	if ((MeterSMId = shmget(ShmFanBdKey, sizeof(struct FanModuleData),	IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmFanModuleData NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmFanModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmFanModuleData NG \n");
+		#endif
+		return 0;
+	}
+	memset(ShmFanModuleData, 0, sizeof(struct FanModuleData));
+
+	//creat ShmRelayModuleData
+	if ((MeterSMId = shmget(ShmRelayBdKey, sizeof(struct RelayModuleData),	IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmRelayModuleData NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmRelayModuleData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmRelayModuleData NG \n");
+		#endif
+		return 0;
+	}
+	memset(ShmRelayModuleData, 0, sizeof(struct RelayModuleData));
+
+	//creat ShmOCPP16Data
+	if ((MeterSMId = shmget(ShmOcppModuleKey, sizeof(struct OCPP16Data), IPC_CREAT | 0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmget ShmOCPP16Data NG \n");
+		#endif
+		return 0;
+	}
+	else if ((ShmOCPP16Data = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]CreatShareMemory:shmat ShmOCPP16Data NG \n");
+		#endif
+		return 0;
+	}
+	// memset(ShmOCPP16Data,0,sizeof(struct OCPP16Data));
+	return 1;
+}
+
+//=================================
+// LCM Page
+//=================================
+void ChangeLcmByIndex(byte page_index)
+{
+	if (ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level != 2 ||
+			page_index == _LCM_COMPLETE || page_index == _LCM_FIX)
+	{
+		ShmSysConfigAndInfo->SysInfo.PageIndex = page_index;
+	}
+}
+
+//======================================================
+// Peripheral initial
+//======================================================
+void InitGPIO()
+{
+	/*****************0~3, 4 bank, bank x 32+ num*********************/
+	/***************************************************************/
+	/*************** GPIO 0 ***************************************/
+	/***************************************************************/
+	/* GPMC_AD8			=> 	GPIO0_22 *//*ID BD1_1*/
+	system("echo 22 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio22/direction");
+	/* GPMC_AD9			=>	GPIO0_23 *//*ID BD1_2*/
+	system("echo 23 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio23/direction");
+	/* GPMC_AD10		=>	GPIO0_26 *//*IO BD1_1*/
+	system("echo 26 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio26/direction");
+	system("echo 1 > /sys/class/gpio/gpio26/value");
+	/* GPMC_AD11		=>	GPIO0_27 *//*IO BD1_2*/
+	system("echo 27 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio27/direction");
+	/* RMII1_REF_CLK		=>	GPIO0_29 *//*USB 0 OCP detection*/
+	system("echo 29 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio29/direction");
+	/*XDMA_EVENT_INTR0	=>	GPIO0_19 *//*AM_RFID_RST*/
+	system("echo 19 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio19/direction");
+	system("echo 0 > /sys/class/gpio/gpio19/value");
+	/*XDMA_EVENT_INTR1	=>	GPIO0_20 *//*AM_RFID_ICC*/
+	system("echo 20 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio20/direction");
+	/***************************************************************/
+	/*************** GPIO 1 ***************************************/
+	/***************************************************************/
+	/* GPMC_AD12	=> 	GPIO1_12 *//*ID BD2_1*/
+	system("echo 44 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio44/direction");
+	/* GPMC_AD13	=>	GPIO1_13 *//*ID BD2_2*/
+	system("echo 45 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio45/direction");
+	/* GPMC_AD14	=>	GPIO1_14 *//*IO BD2_1*/
+	system("echo 46 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio46/direction");
+	system("echo 0 > /sys/class/gpio/gpio46/value");
+	/* GPMC_AD15	=>	GPIO1_15 *//*IO BD2_2*/
+	system("echo 47 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio47/direction");
+	/***************************************************************/
+	/*************** GPIO 2 ***************************************/
+	/***************************************************************/
+	/*LCD_AC_BIAS_EN	=>	GPIO2_25*//*RS-485 for module DE control*/
+	system("echo 89 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio89/direction");
+	system("echo 1 > /sys/class/gpio/gpio89/value");
+	/*LCD_HSYNC		=>	GPIO2_23*//*RS-485 for module RE control*/
+	system("echo 87 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio87/direction");
+	system("echo 0 > /sys/class/gpio/gpio87/value");
+	/*LCD_PCLK		=>	GPIO2_24*//*CCS communication board 1 proximity*/
+	system("echo 88 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio88/direction");
+	/*LCD_VSYNC		=>	GPIO2_22*//*CCS communication board 2 proximity*/
+	system("echo 86 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio86/direction");
+	/***************************************************************/
+	/*************** GPIO 3 ***************************************/
+	/***************************************************************/
+	/*MCASP0_FSX		=>	GPIO3_15*//*Emergency Stop button detect*/
+	system("echo 111 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio111/direction");
+	/*MCASP0_ACLKR	=>	GPIO3_18*//*USB1 OCP detect*/
+	system("echo 114 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio114/direction");
+	/*MCASP0_AHCLKR	=>	GPIO3_17*//*Emergency IO for AM3352 and STM32F407*/
+	system("echo 113 > /sys/class/gpio/export");
+	system("echo \"in\" > /sys/class/gpio/gpio113/direction");
+	/*MCASP0_ACLKX	=>	GPIO3_14*//*Ethernet PHY reset*/
+	system("echo 110 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio110/direction");
+	system("echo 0 > /sys/class/gpio/gpio110/value");
+	/* MCASP0_FSR		=>	GPIO3_19 *//*SMR Enable control_1 for Pskill_1*/
+	system("echo 115 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio115/direction");
+	system("echo 0 > /sys/class/gpio/gpio115/value");
+	/* MCASP0_AXR0	=>	GPIO3_16 *//*CSU board function OK indicator.*/
+	system("echo 112 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio112/direction");
+	system("echo 0 > /sys/class/gpio/gpio112/value");
+	/* MCASP0_AXR1	=>	GPIO3_20 *//*SMR Enable control_2 for Pskill_2*/
+	system("echo 116 > /sys/class/gpio/export");
+	system("echo \"out\" > /sys/class/gpio/gpio116/direction");
+	system("echo 0 > /sys/class/gpio/gpio116/value");
+#ifdef SystemLogMessage
+	DEBUG_ERROR_1("[main]InitGPIO: Initial GPIO OK");
+#endif
+}
+
+int LoadSysConfigAndInfo(struct SysConfigData *ptr)
+{
+	int fd,wrd;
+	struct SysConfigData *buf;
+	byte *PtrBuf;
+	unsigned int ChkSum, ChkSumOrg;
+
+	if ((buf = malloc(sizeof(struct SysConfigData))) == NULL)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]LoadSysConfigAndInfo:malloc buffer NG,rebooting..");
+		#endif
+		if (ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+		}
+		sleep(5);
+		system("reboot -f");
+		sleep(5);
+		system("reboot -f");
+	}
+	memset(buf, 0, sizeof(struct SysConfigData));
+
+	fd = open("/dev/mtdblock10", O_RDWR);
+	if (fd < 0)
+	{
+		free(buf);
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]LoadSysConfigAndInfo:open mtdblock10 NG,rebooting..");
+		#endif
+		if (ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+		}
+		sleep(5);
+		system("reboot -f");
+		sleep(5);
+		system("reboot -f");
+	}
+	wrd = read(fd, buf, sizeof(struct SysConfigData));
+	close(fd);
+	if (wrd != (sizeof(struct SysConfigData)))
+	{
+		free(buf);
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: read SysConfigData data NG,rebooting..");
+		#endif
+		if (ShmStatusCodeData != NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+		}
+		sleep(5);
+		system("reboot -f");
+		sleep(5);
+		system("reboot -f");
+	}
+	PtrBuf = (byte *) buf;
+	ChkSum = 0;
+	for (wrd = 0; wrd < (sizeof(struct SysConfigData) - 4); wrd++)
+	{
+		ChkSum += PtrBuf[wrd];
+	}
+	ChkSumOrg = buf->Checksum;
+
+	if (ChkSum != ChkSumOrg)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: Primary SysConfigData checksum NG, read backup");
+		#endif
+		fd = open("/dev/mtdblock11", O_RDWR);
+		if (fd < 0)
+		{
+			free(buf);
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: open mtdblock11 (backup) NG,rebooting..");
+			#endif
+			if (ShmStatusCodeData != NULL)
+			{
+				ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+			}
+			sleep(5);
+			system("reboot -f");
+			sleep(5);
+			system("reboot -f");
+		}
+		memset(buf, 0, sizeof(struct SysConfigData));
+		wrd = read(fd, buf, sizeof(struct SysConfigData));
+		close(fd);
+		if (wrd != sizeof(struct SysConfigData))
+		{
+			free(buf);
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: read backup SysConfigData data NG,rebooting..");
+			#endif
+			if (ShmStatusCodeData != NULL)
+			{
+				ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+			}
+			sleep(5);
+			system("reboot -f");
+			sleep(5);
+			system("reboot -f");
+		}
+		PtrBuf = (byte *) buf;
+		ChkSum = 0;
+		for (wrd = 0; wrd < (sizeof(struct SysConfigData) - 4); wrd++)
+		{
+			ChkSum += PtrBuf[wrd];
+		}
+		ChkSumOrg = buf->Checksum;
+		if (ChkSum != ChkSumOrg)
+		{
+			#ifdef SystemLogMessage
+			DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: backup SysConfigData checksum NG, read Factory default");
+			#endif
+			fd = open("/dev/mtdblock12", O_RDWR);
+			if (fd < 0)
+			{
+				free(buf);
+				#ifdef SystemLogMessage
+				DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: open mtdblock12 (Factory default) NG,rebooting..");
+				#endif
+				if (ShmStatusCodeData != NULL)
+				{
+					ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+				}
+				sleep(5);
+				system("reboot -f");
+				sleep(5);
+				system("reboot -f");
+			}
+			memset(buf, 0, sizeof(struct SysConfigData));
+			wrd = read(fd, buf, sizeof(struct SysConfigData));
+			close(fd);
+			if (wrd != sizeof(struct SysConfigData))
+			{
+				free(buf);
+				#ifdef SystemLogMessage
+				DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: read factory default  SysConfigData data NG,rebooting..");
+				#endif
+				if (ShmStatusCodeData != NULL)
+				{
+					ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CsuInitFailed = 1;
+				}
+				sleep(5);
+				system("reboot -f");
+				sleep(5);
+				system("reboot -f");
+			}
+			PtrBuf = (byte *) buf;
+			ChkSum = 0;
+			for (wrd = 0; wrd < (sizeof(struct SysConfigData) - 4); wrd++)
+			{
+				ChkSum += PtrBuf[wrd];
+			}
+			ChkSumOrg = buf->Checksum;
+			if (ChkSum != ChkSumOrg)
+			{
+				#ifdef SystemLogMessage
+				DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: factory default  SysConfigData checksum NG, restore factory default");
+				#endif
+				goto DefaultShm;
+			}
+		}
+	}
+	//load OK
+	memcpy((struct SysConfigData *) ptr, (struct SysConfigData *) buf,	sizeof(struct SysConfigData));
+	free(buf);
+	#ifdef SystemLogMessage
+	DEBUG_ERROR_1("[main]LoadSysConfigAndInfo: Load SysConfigData OK");
+	#endif
+	return 1;
+
+	DefaultShm: system("cd /root;./FactoryConfig");
+	system("sync");
+	sleep(5);
+	system("reboot -f");
+	sleep(5);
+	system("reboot -f");
+	return FAIL;
+}
+
+void InitEthernet()
+{
+	char tmpbuf[256];
+	// /sbin/ifconfig eth0 192.168.1.10 netmask 255.255.255.0 down
+	system("echo 1 > /sys/class/gpio/gpio110/value");//reset PHY
+	sleep(2);
+	//Init Eth0 for internet
+	return;
+	memset(tmpbuf,0,256);
+	sprintf(tmpbuf,"/sbin/ifconfig eth0 %s netmask %s up",
+	ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,
+	ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
+	system(tmpbuf);
+	memset(tmpbuf,0,256);
+	sprintf(tmpbuf,"route add default gw %s eth0 ",
+	ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
+    system(tmpbuf);
+
+    //Init Eth1 for administrator tool
+	memset(tmpbuf,0,256);
+	sprintf(tmpbuf,"/sbin/ifconfig eth1 %s netmask %s up",
+	ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthIpAddress,
+	ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthSubmaskAddress);
+	system(tmpbuf);
+
+    //Run DHCP client if enabled
+	system("killall udhcpc");
+	system("rm -rf /etc/resolv.conf");
+	system("echo nameserver 8.8.8.8 > /etc/resolv.conf");		//Google DNS server
+	system("echo nameserver 180.76.76.76 > /etc/resolv.conf");	//Baidu DNS server
+	if(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient==0)
+		system("/sbin/udhcpc -i eth0 -s /root/simple.script > /dev/null &");
+
+	#ifdef SystemLogMessage
+	DEBUG_ERROR_1("[main]InitEthernet: Initial Ethernet OK");
+	#endif
+}
+
+int InitialRfidPort()
+{
+	int uartO2 = open(rfidPortName, O_RDWR);
+	struct termios tios;
+
+	if (uartO2 != FAIL)
+	{
+		ioctl (uartO2, TCGETS, &tios);
+		tios.c_cflag = B19200 | CS8 | CLOCAL | CREAD;
+		tios.c_lflag = 0;
+		tios.c_iflag = 0;
+		tios.c_oflag = 0;
+		tios.c_cc[VMIN] = 0;
+		tios.c_cc[VTIME] = (unsigned char) 1;
+		tios.c_lflag = 0;
+		tcflush(uartO2, TCIFLUSH);
+		ioctl(uartO2, TCSETS, &tios);
+	}
+
+	if (uartO2 < 0)
+	{
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.RfidModuleCommFail = 1;
+	}
+
+	return uartO2;
+}
+
+int Initialization()
+{
+	//InitGPIO();
+	//LoadSysConfigAndInfo(&ShmSysConfigAndInfo->SysConfig);
+	//InitEthernet();
+
+	sprintf((char *)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn, "Internet");
+	sprintf((char *)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId, " ");
+	sprintf((char *)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd, " ");
+
+	// 初始化卡號驗證的 Flag
+	ClearAuthorizedFlag();
+	// 初始化插槍驗證的 Flag
+	ClearDetectPluginFlag();
+
+	// UART 2 for Rfid
+	rfidFd = InitialRfidPort();
+
+	memset(ShmSysConfigAndInfo->SysInfo.FanModuleFwRev, 0, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.FanModuleFwRev));
+	memset(ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev, 0, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev));
+	ShmPrimaryMcuData->SelfTest_Comp = NO;
+	ShmRelayModuleData->SelfTest_Comp = NO;
+	ShmFanModuleData->SelfTest_Comp = NO;
+	ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_NONE;
+
+	for (byte count = 0; count < _gunCount; count++)
+	{
+		if (chargingInfo[count]->Type == _Type_Chademo)
+		{
+			ShmCHAdeMOData->evse[chargingInfo[count]->type_index].SelfTest_Comp = NO;
+		}
+		else if (chargingInfo[count]->Type == _Type_CCS)
+		{
+			if (ShmCcsData->CommProtocol == 0x01)
+			{
+				ShmCcsData->V2GMessage_DIN70121[chargingInfo[count]->type_index].SelfTest_Comp = NO;
+			}
+		}
+	}
+
+	#ifdef SystemLogMessage
+	printf("Initialization OK \n");
+	#endif
+
+	return PASS;
+}
+
+void SelfTestRun()
+{
+	bool evInitFlag = false;
+
+	StartSystemTimeoutDet(Timeout_SelftestChk);
+	ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_VERSION;
+	while (ShmSysConfigAndInfo->SysInfo.SelfTestSeq != _STEST_COMPLETE)
+	{
+		ChkPrimaryStatus();
+		if (ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level == 2)
+		{
+			ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_FAIL;
+			return;
+		}
+
+		if (_gunCount > 0)
+		{
+			if (ShmPsuData->Work_Step == _NO_WORKING)
+			{
+				ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_FAIL;
+				break;
+			}
+
+			switch(ShmSysConfigAndInfo->SysInfo.SelfTestSeq)
+			{
+				case _STEST_VERSION:
+				{
+					if (strlen((char *)ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev) != 0 ||
+							ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev[0] != '\0')
+					{
+						//printf("RB pass \n");
+						ShmRelayModuleData->SelfTest_Comp = YES;
+					}
+
+					//if  (strlen((char *)ShmSysConfigAndInfo->SysInfo.FanModuleFwRev) != 0 ||
+					//		ShmSysConfigAndInfo->SysInfo.FanModuleFwRev[0] != '\0')
+					{
+						//printf("Fan pass \n");
+						ShmFanModuleData->SelfTest_Comp = YES;
+					}
+
+					if (strlen((char *)ShmPrimaryMcuData->version) != 0 ||
+							ShmPrimaryMcuData->version[0] != '\0')
+					{
+						//printf("407 pass \n");
+						ShmPrimaryMcuData->SelfTest_Comp = YES;
+					}
+					// EV 小板
+					if (!evInitFlag)
+					{
+						evInitFlag = YES;
+						for (byte index = 0; index < _gunCount; index++)
+						{
+							if (chargingInfo[index]->Type == _Type_Chademo)
+							{
+								if (strlen((char *)ShmCHAdeMOData->evse[chargingInfo[index]->type_index].version) != 0 ||
+										ShmCHAdeMOData->evse[chargingInfo[index]->type_index].version[0] != '\0')
+								{
+									//printf("chademo pass \n");
+									ShmCHAdeMOData->evse[chargingInfo[index]->type_index].SelfTest_Comp = YES;
+								}
+								else
+								{
+									printf("chademo fw lose...... \n");
+									evInitFlag = NO;
+								}
+							}
+							else if (chargingInfo[index]->Type == _Type_CCS)
+							{
+								if (ShmCcsData->CommProtocol == 0x01)
+								{
+									if (strlen((char *)ShmCcsData->V2GMessage_DIN70121[chargingInfo[index]->type_index].version) != 0 ||
+										ShmCcsData->V2GMessage_DIN70121[chargingInfo[index]->type_index].version[0] != '\0')
+									{
+										ShmCcsData->V2GMessage_DIN70121[chargingInfo[index]->type_index].SelfTest_Comp = YES;
+									}
+									else
+									{
+										printf("ccs fw lose \n");
+										evInitFlag = NO;
+									}
+								}
+							}
+						}
+					}
+
+					if (ShmFanModuleData->SelfTest_Comp &&
+							ShmRelayModuleData->SelfTest_Comp &&
+							ShmPrimaryMcuData->SelfTest_Comp &&
+							evInitFlag)
+					{
+						ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_AC_CONTACTOR;
+					}
+				}
+					break;
+				case _STEST_AC_CONTACTOR:
+				{
+					//ShmPsuData->Work_Step = _TEST_COMPLETE;
+					// 因為 30KW 以下沒有 Relay feedback 功能,所以暫時先直接跳過
+					if (ShmSysConfigAndInfo->SysInfo.AcContactorStatus == YES)
+					{
+						ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_PSU_DETECT;
+						printf("Communication board pass. \n");
+					}
+				}
+					break;
+				case _STEST_PSU_DETECT:
+				{
+					// 此測試主要測試 PSU 對應是否為正確的火線上電壓
+					// 如果沒有 PSU 模組請 bypass
+					if (ShmPsuData->Work_Step == _TEST_POWER_STEP || ShmPsuData->Work_Step == _TEST_COMPLETE)
+					{
+						ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_PSU_CAP;
+					}
+				}
+					break;
+				case _STEST_PSU_CAP:
+				{
+					// 此測試是要確認當前總輸出能力
+					// 如果沒有 PSU 模組請 bypass
+					if (ShmPsuData->Work_Step == _TEST_COMPLETE)
+					{
+						sleep(1);
+						ShmSysConfigAndInfo->SysInfo.SelfTestSeq = _STEST_COMPLETE;
+						ShmSysConfigAndInfo->SysInfo.BootingStatus = BOOT_COMPLETE;
+					}
+				}
+					break;
+			}
+		}
+		else
+			break;
+
+		usleep(100000);
+	}
+}
+
+int SpawnTask()
+{
+	system("/root/Module_EventLogging &");
+	system("/root/Module_PrimaryComm &");
+	system("/root/Module_EvComm &");
+	system("/root/Module_LcmControl &");
+	system("/root/Module_InternalComm &");
+	system("/root/Module_PsuComm &");
+
+	//system("/root/OcppBackend &");
+	//system("/root/Module_4g &");
+	//system("/root/Module_Wifi &");
+	//system("/root/Module_PsuComm &");
+	//system("/root/InfyPowerPsu_Comm &");
+
+	// 加入參數
+//	char str[64];
+//	memset(str, '\0', sizeof(65));
+//	sprintf(str, "/root/Module_EvComm %x &", (CHAdeMO_QUANTITY + CCS_QUANTITY));
+//	printf("%s \n", str);
+//	system(str);
+
+	return PASS;
+}
+
+int StoreUsrConfigData(struct SysConfigData *UsrData)
+{
+	int fd,wrd;
+	unsigned int i, Chk;
+	byte *ptr;
+
+	Chk = 0;
+	ptr = (byte *) UsrData;
+	for (i = 0; i < sizeof(struct SysConfigData) - 4; i++)
+	{
+		Chk += *(ptr + i);
+	}
+	UsrData->Checksum = Chk;
+
+	fd = open("/dev/mtdblock10", O_RDWR);
+	if (fd < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]StoreUsrConfigData: open /dev/mtdblock10 NG");
+		#endif
+		return 0;
+	}
+	wrd = write(fd, UsrData, sizeof(struct SysConfigData));
+	close(fd);
+	if (wrd != (sizeof(struct SysConfigData)))
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]StoreUsrConfigData: write /dev/mtdblock10 NG");
+		#endif
+		return 0;
+	}
+
+	fd = open("/dev/mtdblock11", O_RDWR);
+	if (fd < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]StoreUsrConfigData: open /dev/mtdblock11(backup) NG");
+		#endif
+		return 0;
+	}
+	wrd = write(fd, UsrData, sizeof(struct SysConfigData));
+	close(fd);
+	if (wrd != (sizeof(struct SysConfigData)))
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("[main]StoreUsrConfigData: write /dev/mtdblock11(backup) NG");
+		#endif
+		return 0;
+	}
+	return 1;
+}
+
+//===============================================
+// Common Detect Chk - Stop Charging ?
+//===============================================
+bool isEvBoardStopChargeFlag(byte gunIndex)
+{
+	return chargingInfo[gunIndex]->StopChargeFlag;
+}
+
+//===============================================
+// Common Detect Chk - Chademo
+//===============================================
+bool isEvGunLocked_chademo(byte gunIndex)
+{
+	return (DetectBitValue(chargingInfo[gunIndex]->GunLocked , 0) == 0)? NO : YES;
+}
+
+bool isEvContactorWelding_chademo(byte gunIndex)
+{
+	return DetectBitValue(ShmCHAdeMOData->ev[chargingInfo[gunIndex]->type_index].EvDetection, 3);
+}
+
+bool isEvStopReq_chademo(byte gunIndex)
+{
+	return DetectBitValue(ShmCHAdeMOData->ev[chargingInfo[gunIndex]->type_index].EvDetection, 4);
+}
+
+bool isEvStopCharging_chademo(byte gunIndex)
+{
+	if (isEvGunLocked_chademo(gunIndex) == NO)
+	{
+		// 無鎖槍 = 停止
+		printf("gun locked none. \n");
+		return YES;
+	}
+
+	return NO;
+}
+
+byte isPrechargeStatus_chademo(byte gunIndex)
+{
+	byte result = 0x00;
+
+	result = ShmCHAdeMOData->ev[chargingInfo[gunIndex]->type_index].PresentMsgFlowStatus;
+
+	return result;
+}
+//===============================================
+// Common Detect Chk - CCS
+//===============================================
+bool isEvGunLocked_ccs(byte gunIndex)
+{
+	return (DetectBitValue(chargingInfo[gunIndex]->GunLocked , 0) == 0)? NO : YES;
+}
+
+byte isPrechargeStatus_ccs(byte gunIndex)
+{
+	byte result = 0x00;
+
+	if (ShmCcsData->CommProtocol == 0x01)
+	{
+		result = ShmCcsData->V2GMessage_DIN70121[chargingInfo[gunIndex]->type_index].PresentMsgFlowStatus;
+	}
+
+	return result;
+}
+
+bool isEvStopCharging_ccs(byte gunIndex)
+{
+	if (isEvGunLocked_ccs(gunIndex) == NO)
+	{
+		// 無鎖槍 = 停止
+		printf("gun locked none. \n");
+		return YES;
+	}
+
+	return NO;
+}
+
+//===============================================
+// Callback
+//===============================================
+void _AutoReturnTimeout()
+{
+	if (ShmSysConfigAndInfo->SysInfo.PageIndex == _LCM_WAIT_FOR_PLUG)
+	{
+		ClearDetectPluginFlag();
+	}
+
+	ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_NONE;
+//
+//	for (byte i = 0; i < CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY; i++)
+//	{
+//		if (chargingInfo[i]->SystemStatus > S_IDLE)
+//		{
+//			switch(chargingInfo[i]->SystemStatus)
+//			{
+//				case S_PREPARNING:
+//				case S_PREPARING_FOR_EV:
+//				case S_PREPARING_FOR_EVSE:
+//				{
+//					ChangeLcmByIndex(i, _LCM_PRE_CHARGE);
+//				}
+//					break;
+//				case S_CHARGING:
+//				{
+//					ChangeLcmByIndex(i, _LCM_CHARGING);
+//				}
+//					break;
+//				case S_TERMINATING:
+//				{
+//					ChangeLcmByIndex(i, _LCM_COMPLETE);
+//				}
+//					break;
+//			}
+//			return;
+//		}
+//	}
+
+//	if (!IsAuthorizingMode())
+//		ChangeLcmByIndex(255, _LCM_IDLE);
+}
+
+void _SelfTestTimeout()
+{
+	if (ShmSysConfigAndInfo->SysInfo.BootingStatus != BOOT_COMPLETE)
+	{
+		for (byte gun_index = 0; gun_index < _gunCount; gun_index++)
+		{
+			setChargerMode(gun_index, MODE_ALARM);
+		}
+		ShmPsuData->Work_Step = _NO_WORKING;
+	}
+}
+
+void _AuthorizedTimeout()
+{
+	if(IsAuthorizingMode())
+	{
+		printf("_AuthorizedTimeout \n");
+		ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_AUTHORIZ_FAIL;
+		//ChangeLcmByIndex(_LCM_AUTHORIZ_FAIL);
+		ClearAuthorizedFlag();
+	}
+}
+
+void _DetectPlugInTimeout()
+{
+	if(isDetectPlugin())
+	{
+		printf("_DetectPlugInTimeout \n");
+		ClearDetectPluginFlag();
+	}
+	ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_NONE;
+}
+
+void _DetectEvChargingEnableTimeout(byte gunIndex)
+{
+	if (chargingInfo[gunIndex]->Type == _Type_Chademo)
+	{
+		if(!isEvGunLocked_chademo(gunIndex))
+		{
+			printf("_DetectEvChargingEnableTimeout (chademo) \n");
+			ChargingTerminalProcess(gunIndex);
+			_AutoReturnTimeout();
+		}
+	}
+	else if (chargingInfo[gunIndex]->Type == _Type_CCS)
+	{
+		if(!isEvGunLocked_ccs(gunIndex))
+		{
+			printf("_DetectEvChargingEnableTimeout (ccs) \n");
+			ChargingTerminalProcess(gunIndex);
+			_AutoReturnTimeout();
+		}
+	}
+}
+
+void _DetectEvseChargingEnableTimeout(byte gunIndex)
+{
+	printf("_DetectEvseChargingEnableTimeout (GFD timeout) \n");
+	if (chargingInfo[gunIndex]->GroundFaultStatus != GFD_PASS)
+	{
+		setChargerMode(gunIndex, MODE_IDLE);
+		_AutoReturnTimeout();
+	}
+}
+
+void _PrepareTimeout(byte gunIndex)
+{
+	printf("_PrechargeTimeout \n");
+	setChargerMode(gunIndex, MODE_IDLE);
+	_AutoReturnTimeout();
+}
+
+void _CompleteTimeout(byte gunIndex)
+{
+	printf("_CompleteTimeout ====> %d \n", gunIndex);
+	setChargerMode(gunIndex, MODE_IDLE);
+}
+
+void _CcsPrechargeTimeout(byte gunIndex)
+{
+	printf("_CcsPrechargeTimeout \n");
+	setChargerMode(gunIndex, MODE_IDLE);
+}
+
+//===============================================
+// 取得卡號與卡號驗證
+//===============================================
+bool canStartCharging()
+{
+	char buf2[16] = "";
+	memset(buf2, 0, ARRAY_SIZE(buf2));
+
+	for (byte index = 0; index < strlen((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status); index++)
+	{
+		sprintf(buf2 + (index - 1) * 2, "%02X",	ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status[index]);
+	}
+	sprintf(buf2, "%s",	ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status);
+
+	// 因為無法得知實際的長度,所以只能用搜尋的方式
+	if(strstr(buf2, "Accepted") != 0)
+		return true;
+	else
+	{
+
+	}
+
+	return false;
+}
+
+void AuthorizingStart()
+{
+	ShmOCPP16Data->SpMsg.bits.AuthorizeReq = YES;
+}
+
+void ClearAuthorizedFlag()
+{
+	ShmOCPP16Data->SpMsg.bits.AuthorizeReq = NO;
+	ShmOCPP16Data->SpMsg.bits.AuthorizeConf = NO;
+}
+
+bool isAuthorizedComplete()
+{
+	if (ShmOCPP16Data->SpMsg.bits.AuthorizeConf == NO)
+		return false;
+
+	return true;
+}
+
+bool IsAuthorizingMode()
+{
+	if(ShmOCPP16Data->SpMsg.bits.AuthorizeReq == NO)
+		return false;
+
+	return true;
+}
+
+byte GetCardNumber()
+{
+	byte card_number[16];
+
+	if (strlen((char *)ShmSysConfigAndInfo->SysConfig.UserId) == 0)
+	{
+		if(getRequestCardSN(rfidFd, 0, card_number))
+		{
+			//Get Card Number
+			byte len = card_number[0];
+			char buf2[32] = "";
+
+			memcpy(buf2, (card_number + 1), len);
+			memset(ShmSysConfigAndInfo->SysConfig.UserId, 0x0, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId));
+			for (byte index = 0; index < len; index++)
+			{
+				sprintf((char *)ShmSysConfigAndInfo->SysConfig.UserId + (index * 2), "%02X", buf2[index]);
+			}
+
+			printf("card number = %s\n", ShmSysConfigAndInfo->SysConfig.UserId);
+			return PASS;
+		}
+	}
+
+	return FAIL;
+}
+
+//===============================================
+// 掃描插槍狀況
+//===============================================
+void ClearDetectPluginFlag()
+{
+	ShmSysConfigAndInfo->SysInfo.WaitForPlugit = NO;
+}
+
+void DetectPluginStart()
+{
+	ShmSysConfigAndInfo->SysInfo.WaitForPlugit = YES;
+}
+
+bool isDetectPlugin()
+{
+	if(ShmSysConfigAndInfo->SysInfo.WaitForPlugit == YES)
+		return YES;
+
+	return NO;
+}
+
+//===============================================
+// EmergencyStop and Charging Stop
+//===============================================
+void ChargingTerminalProcess(byte gunIndex)
+{
+	setChargerMode(gunIndex, MODE_TERMINATING);
+}
+
+void StopChargingProcessByString(byte level, byte gun_index, char *string)
+{
+	if (strlen((char *)ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index]) == 0 ||
+		level > ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level)
+	{
+		memcpy(&ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index][0], string, 7);
+		ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level = level;
+	}
+}
+
+void ReleaseChargingProcessByString(byte gun_index, char *code)
+{
+	memcpy(&ShmSysConfigAndInfo->SysStopChargingAlarmCode.StopCode[gun_index][0], "", 7);
+	ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level = 0;
+}
+
+// 各小板的停止充電處理函式
+void EmcOccureByString(byte index, char *code)
+{
+	bool isStopCharger = false;
+	if (strncmp(code, "012251", 6) == 0 || strncmp(code, "012252", 6) == 0 ||
+			strncmp(code, "012237", 6) == 0 || strncmp(code, "012238", 6) == 0)
+	{
+		isStopCharger = true;
+	}
+
+	if (isStopCharger)
+	{
+		for (byte gun = 0; gun < _gunCount; gun++)
+		{
+			if ((chargingInfo[gun]->SystemStatus > S_IDLE && chargingInfo[gun]->SystemStatus < S_TERMINATING) ||
+					(chargingInfo[gun]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[gun]->SystemStatus <= S_CCS_PRECHARGE_ST1))
+			{
+				ChargingTerminalProcess(gun);
+			}
+
+			StopChargingProcessByString(2, gun, code);
+		}
+	}
+	else
+	{
+		if ((chargingInfo[index]->SystemStatus > S_IDLE && chargingInfo[index]->SystemStatus < S_TERMINATING) ||
+				(chargingInfo[index]->SystemStatus >= S_CCS_PRECHARGE_ST0 && chargingInfo[index]->SystemStatus <= S_CCS_PRECHARGE_ST1))
+		{
+			ChargingTerminalProcess(index);
+		}
+
+		StopChargingProcessByString(2, index, code);
+	}
+}
+
+void ReleaseEmsOccureByString(byte index, char *code)
+{
+	bool isReleaseCharger = false;
+	bool isTrigger = false;
+
+	if (strncmp(code, "012251", 6) == 0 && ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip == YES)
+	{
+		isTrigger = true;
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = NO;
+		isReleaseCharger = true;
+	}
+	else if (strncmp(code, "012252", 6) == 0 && ShmStatusCodeData->AlarmCode.AlarmEvents.bits.DoorOpen == YES)
+	{
+		isTrigger = true;
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.DoorOpen = NO;
+		isReleaseCharger = true;
+	}
+	else if (strncmp(code, "012237", 6) == 0 && ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SpdTrip == YES)
+	{
+		isTrigger = true;
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SpdTrip = NO;
+		isReleaseCharger = true;
+	}
+	else if (strncmp(code, "012238", 6) == 0 && ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MainPowerBreakerTrip == YES)
+	{
+		isTrigger = true;
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MainPowerBreakerTrip = NO;
+		isReleaseCharger = true;
+	}
+	else if (strncmp(code, "023730", 6) == 0 && ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetEmergencyStop == YES)
+	{
+		isTrigger = true;
+		ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetEmergencyStop = NO;
+	}
+
+	if (isTrigger)
+	{
+		if (isReleaseCharger)
+		{
+			for (byte gun = 0; gun < _gunCount; gun++)
+			{
+				ReleaseChargingProcessByString(gun, code);
+			}
+		}
+		else
+		{
+			ReleaseChargingProcessByString(index, code);
+		}
+	}
+}
+
+//===============================================
+// 確認硬體 (按鈕) 狀態
+//===============================================
+bool leftBtnPush = false;
+bool rightBtnPush = false;
+
+void ChkPrimaryStatus()
+{
+	if (ShmPrimaryMcuData->InputDet.bits.EmergencyButton == ABNORMAL)
+	{
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.EmergencyStopTrip = YES;
+		EmcOccureByString(0, "012251");
+	}
+	else
+		ReleaseEmsOccureByString(0, "012251");
+
+	if (ShmPrimaryMcuData->InputDet.bits.AcMainBreakerDetec == ABNORMAL)
+	{
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.MainPowerBreakerTrip = YES;
+		EmcOccureByString(0, "012238");
+	}
+	else
+		ReleaseEmsOccureByString(0, "012238");
+
+	if (ShmPrimaryMcuData->InputDet.bits.SpdDetec == ABNORMAL)
+	{
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.SpdTrip = YES;
+		EmcOccureByString(0, "012237");
+	}
+	else
+		ReleaseEmsOccureByString(0, "012237");
+
+	if (ShmPrimaryMcuData->InputDet.bits.DoorOpen == ABNORMAL)
+	{
+		ShmStatusCodeData->AlarmCode.AlarmEvents.bits.DoorOpen = YES;
+		EmcOccureByString(0, "012252");
+	}
+	else
+		ReleaseEmsOccureByString(0, "012252");
+
+	if (ShmPrimaryMcuData->InputDet.bits.Button1 == BTN_PRESS && !leftBtnPush)
+	{
+		if(!leftBtnPush)
+		{
+			printf("left btn down............................... \n");
+			ShmSysConfigAndInfo->SysInfo.CurGunSelected = 0;
+			switch(chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus)
+			{
+				case S_IDLE:
+				{
+					ShmSysConfigAndInfo->SysInfo.WaitForPlugit = 0x01;
+				}
+				break;
+				case S_CHARGING:
+				{
+					// 停止充電
+					printf("To Stop = %d --------- \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+					chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus = 9;
+					//ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+				}
+					break;
+				case S_COMPLETE:
+				{
+					// 回 IDLE
+					printf("Back to IDLE = %d --------- \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+					chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus = 1;
+				}
+					break;
+			}
+		}
+
+		leftBtnPush = true;
+		// 左邊的選槍按鈕,只有在雙槍都在充電時候才有用 : 30KW 以下該按鈕無作用
+	}
+	else if (ShmPrimaryMcuData->InputDet.bits.Button1 == BTN_RELEASE)
+	{
+		if(leftBtnPush)
+			printf("left btn up............................... \n");
+		leftBtnPush = false;
+	}
+
+	if (ShmPrimaryMcuData->InputDet.bits.Button2 == BTN_PRESS && !rightBtnPush)
+	{
+		if(!rightBtnPush)
+		{
+			printf("right btn down............................... \n");
+			if (_gunCount > 1)
+			{
+				ShmSysConfigAndInfo->SysInfo.CurGunSelected = 1;
+				switch(chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus)
+				{
+					case S_IDLE:
+					{
+						//ShmSysConfigAndInfo->SysInfo.WaitForPlugit = 0x01;
+					}
+					break;
+					case S_CHARGING:
+					{
+						// 停止充電
+						printf("To Stop = %d --------- \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+						//chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus = 9;
+						//ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+					}
+						break;
+					case S_COMPLETE:
+					{
+						// 回 IDLE
+						printf("Back to IDLE = %d --------- \n", ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+						//chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus = 1;
+					}
+						break;
+				}
+			}
+		}
+
+		rightBtnPush = true;
+		// 右邊的按鈕,只作用在當前頁面,當前頁面如果在可以回 Home 與 停止充電的狀態為可用
+//		switch(chargingInfo[ShmSysConfigAndInfo->SysInfo.CurGunSelected]->SystemStatus)
+//		{
+//			case S_IDLE: {}break;
+//			case S_AUTHORIZING: {}break;
+//			case S_PREPARING_FOR_EV: {}break;
+//			case S_PREPARING_FOR_EVSE: {}break;
+//			case S_CCS_PRECHARGE_ST0: {}break;
+//			case S_CCS_PRECHARGE_ST1: {}break;
+//			case S_CHARGING:
+//			{
+//				// 停止充電
+//				printf("Stop --------------------------------------------------- \n");
+//				//ChargingTerminalProcess(ShmSysConfigAndInfo->SysInfo.CurGunSelected);
+//			}
+//				break;
+//			case S_COMPLETE:
+//			{
+//				//setChargerMode(ShmSysConfigAndInfo->SysInfo.CurGunSelected, MODE_IDLE);
+//			}
+//				break;
+//		}
+	}
+	else if (ShmPrimaryMcuData->InputDet.bits.Button2 == BTN_RELEASE)
+	{
+		if(rightBtnPush)
+			printf("right btn up............................... \n");
+		rightBtnPush = false;
+	}
+}
+
+//===============================================
+// 確認各小板偵測的錯誤狀況
+//===============================================
+void CheckErrorOccurStatus(byte index)
+{
+	// 小板
+	if (chargingInfo[index]->Type == _Type_Chademo)
+	{
+		if (ShmStatusCodeData->InfoCode.InfoEvents.bits.ChademoChargerGetEmergencyStop == YES)
+			EmcOccureByString(index, "023730");
+		else if (ShmStatusCodeData->FaultCode.FaultEvents.bits.ChademoOutputRelayDrivingFault == YES)
+			EmcOccureByString(index, "011012");
+		else if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.ChademoGfdTrip == YES)
+			EmcOccureByString(index, "012234");
+	}
+	else if (chargingInfo[index]->Type == _Type_CCS)
+	{
+		if (ShmStatusCodeData->FaultCode.FaultEvents.bits.CcsOutputRelayDrivingFault == YES)
+			EmcOccureByString(index, "011014");
+		else if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.CcsGfdTrip == YES)
+			EmcOccureByString(index, "012235");
+	}
+}
+
+//===============================================
+// 確認 GPIO 狀態
+//===============================================
+int gpio_get_value(unsigned int gpio, unsigned int *value)
+{
+    int fd;
+    char buf[MAX_BUF];
+    char ch;
+
+    snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio);
+
+    fd = open(buf, O_RDONLY);
+    if (fd < 0) {
+        perror("gpio/get-value");
+        return fd;
+    }
+
+    read(fd, &ch, 1);
+
+    if (ch != '0') {
+        *value = 1;
+    } else {
+        *value = 0;
+    }
+
+    close(fd);
+    return 0;
+}
+
+void CheckGunTypeFromHw()
+{
+	int pinIn[4] = { 22, 23, 44, 45 };
+	unsigned int gpioValue = 0;
+
+	for (int i = 0; i < ARRAY_SIZE(pinIn); i++) {
+		gpio_get_value(pinIn[i], &gpioValue);
+		{
+			switch (pinIn[i])
+			{
+			case 22:
+				bd1_1_status = gpioValue;
+				break;
+			case 23:
+				bd1_2_status = gpioValue;
+				break;
+			case 44:
+				bd0_1_status = gpioValue;
+				break;
+			case 45:
+				bd0_2_status = gpioValue;
+				break;
+			}
+		}
+	}
+}
+
+void CheckGpioInStatus()
+{
+	int pinIn[2] = { 27, 47 };
+	unsigned int gpioValue = 0;
+
+	for (int i = 0; i < ARRAY_SIZE(pinIn); i++)
+	{
+		gpio_get_value(pinIn[i], &gpioValue);
+		if (gpioValue == 0x01)
+		{
+			switch(pinIn[i])
+			{
+				// 小板緊急停止
+				case 47:
+				{
+					for(int i = 0; i < _gunCount; i++)
+					{
+						if (chargingInfo[i]->slotsIndex == 1)
+						{
+							if (chargingInfo[i]->Type == _Type_Chademo)
+								EmcOccureByString(i, "023730");
+							else if (chargingInfo[i]->Type == _Type_CCS)
+								EmcOccureByString(i, "013627");
+							break;
+						}
+					}
+				}
+					break;
+				case 27:
+				{
+					for(int i = 0; i < _gunCount; i++)
+					{
+						if (chargingInfo[i]->slotsIndex == 3)
+						{
+							if (chargingInfo[i]->Type == _Type_Chademo)
+								EmcOccureByString(i, "023730");
+							else if (chargingInfo[i]->Type == _Type_CCS)
+								EmcOccureByString(i, "013627");
+							break;
+						}
+					}
+				}
+					break;
+			}
+		}
+		else
+		{
+			switch (pinIn[i])
+			{
+				// 小板解除緊急停止
+				case 47:
+				{
+					for(int i = 0; i < _gunCount; i++)
+					{
+						if (chargingInfo[i]->slotsIndex == 1)
+						{
+							if (chargingInfo[i]->Type == _Type_Chademo)
+								ReleaseEmsOccureByString(i, "023730");
+							else if (chargingInfo[i]->Type == _Type_CCS)
+								ReleaseEmsOccureByString(i, "013627");
+							break;
+						}
+					}
+				}
+					break;
+				case 27:
+				{
+					for (int i = 0; i < _gunCount; i++)
+					{
+						if (chargingInfo[i]->slotsIndex == 3)
+						{
+							if (chargingInfo[i]->Type == _Type_Chademo)
+								ReleaseEmsOccureByString(i, "023730");
+							else if (chargingInfo[i]->Type == _Type_CCS)
+								ReleaseEmsOccureByString(i, "013627");
+							break;
+						}
+					}
+				}
+				break;
+			}
+		}
+	}
+}
+
+//===============================================
+// Main process
+//===============================================
+// 檢查 Byte 中某個 Bit 的值
+// _byte : 欲改變的 byte
+// _bit : 該 byte 的第幾個 bit
+unsigned char DetectBitValue(unsigned char _byte, unsigned char _bit)
+{
+	return ( _byte & mask_table[_bit] ) != 0x00;
+}
+
+// 設定 Byte 中某個 Bit的值
+// _byte : 欲改變的 byte
+// _bit : 該 byte 的第幾個 bit
+// value : 修改的值為 0 or 1
+void SetBitValue(unsigned char *_byte, unsigned char _bit, unsigned char value)
+{
+	if(value == 1)
+		*_byte |= (1 << _bit);
+	else if (value == 0)
+		*_byte ^= (1 << _bit);
+}
+
+void UserScanFunction()
+{
+	bool idleReq = false;
+	unsigned char stopReq = 255;
+
+	// 當前非驗證的狀態
+	if(!IsAuthorizingMode())
+	{
+		// 先判斷現在是否可以提供刷卡
+		// 1. 如果當前沒有槍是閒置狀態,則無提供刷卡功能
+		// 2. 停止充電
+		for (byte i = 0; i < _gunCount; i++)
+		{
+			// 二擇一
+			if (chargingInfo[i]->SystemStatus == S_CHARGING)
+			{
+				stopReq = i;
+			}
+			else if (chargingInfo[i]->SystemStatus == S_IDLE)
+			{
+				idleReq = true;
+			}
+		}
+
+		// 有閒置的槍號,即可接受刷卡
+		if (idleReq || stopReq < _gunCount)
+		{
+			// 取卡號,假設 : 刷卡過了
+			if (strlen((char *)ShmSysConfigAndInfo->SysConfig.UserId) > 0)
+			{
+				if (stopReq < _gunCount)
+				{
+					char value[32];
+
+					memcpy(value, (unsigned char *)chargingInfo[stopReq]->CardNumber, ARRAY_SIZE(chargingInfo[stopReq]->CardNumber));
+					if (strcmp((char *)ShmSysConfigAndInfo->SysConfig.UserId, value) == EQUAL)
+					{
+						ChargingTerminalProcess(stopReq);
+						strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
+						return;
+					}
+				}
+
+				if (idleReq)
+				{
+					// LCM => Authorizing
+					ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_AUTHORIZING;
+					// 進入確認卡號狀態
+					AuthorizingStart();
+					// authorizing timer
+					StartSystemTimeoutDet(Timeout_Authorizing);
+					autoReturnTimeoutFlag = NO;
+				}
+			}
+		}
+	}
+	else
+	{
+		// 確認驗證卡號完成沒
+		if (isAuthorizedComplete() || ShmSysConfigAndInfo->SysConfig.OfflinePolicy == _OFFLINE_POLICY_FREE_CHARGING)
+		{
+			StopSystemTimeoutDet();
+			// 判斷後台回覆狀態
+			if(canStartCharging() || ShmSysConfigAndInfo->SysConfig.OfflinePolicy == _OFFLINE_POLICY_FREE_CHARGING)
+			{
+				// LCM => Authorize complete
+				ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_AUTHORIZ_COMP;
+				// 通過認證,開始確認當前要進入充電的槍號
+				DetectPluginStart();
+			}
+			else
+			{
+				// LCM => Authorize fail
+				ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_AUTHORIZ_FAIL;
+			}
+			ClearAuthorizedFlag();
+		}
+	}
+}
+
+unsigned char isModeChange(unsigned char gun_index)
+{
+	unsigned char result = NO;
+
+	if(chargingInfo[gun_index]->SystemStatus != chargingInfo[gun_index]->PreviousSystemStatus)
+	{
+		result = YES;
+		chargingInfo[gun_index]->PreviousSystemStatus = chargingInfo[gun_index]->SystemStatus;
+	}
+
+	return result;
+}
+
+void ScannerCardProcess()
+{
+	if (!isDetectPlugin() && !isCardScan && ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level == 0)
+	{
+		isCardScan = true;
+		// 處理刷卡及驗證卡號的動作
+		UserScanFunction();
+	}
+
+	if (ShmSysConfigAndInfo->SysInfo.PageIndex == _LCM_AUTHORIZ_FAIL)
+	{
+		StartSystemTimeoutDet(Timeout_VerifyFail);
+		isCardScan = false;
+	}
+	else if(ShmSysConfigAndInfo->SysInfo.PageIndex == _LCM_AUTHORIZ_COMP)
+	{
+		StartSystemTimeoutDet(Timeout_VerifyComp);
+	}
+	else if(ShmSysConfigAndInfo->SysInfo.PageIndex == _LCM_WAIT_FOR_PLUG)
+	{
+		StartSystemTimeoutDet(Timeout_WaitPlug);
+	}
+	else
+		isCardScan = false;
+}
+
+void AddGunInfoByConnector(byte typeValue, byte slots)
+{
+	switch (typeValue)
+	{
+		case '0': // none
+			break;
+		case '1': // IEC 62196-2 Type 1/SAE J1772 Plug
+			break;
+		case '2': // IEC 62196-2 Type 1/SAE J1772 Socket
+			break;
+		case '3': // IEC 62196-2 Type 2 Plug
+			break;
+		case '4': // IEC 62196-2 Type 2 Socket
+			break;
+		case '5': // GB/T AC Plug
+			break;
+		case '6': // GB/T AC Socket
+			break;
+		case 'J': // CHAdeMO
+		{
+			if (CHAdeMO_QUANTITY > _chademoIndex)
+			{
+				chargingInfo[_gunIndex] = &ShmSysConfigAndInfo->SysInfo.ChademoChargingData[_chademoIndex];
+
+				chargingInfo[_gunIndex]->Index = _gunIndex;
+				chargingInfo[_gunIndex]->slotsIndex = slots;
+				chargingInfo[_gunIndex]->SystemStatus = S_BOOTING;
+				chargingInfo[_gunIndex]->Type = _Type_Chademo;
+				chargingInfo[_gunIndex]->type_index = _chademoIndex;
+				_chademoIndex++;
+				_gunIndex++;
+			}
+		}
+			break;
+		case 'U': // CCS1 combo
+			break;
+		case 'E': // CCS2 combo
+		{
+			if (CCS_QUANTITY > _ccsIndex)
+			{
+				chargingInfo[_gunIndex] = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[_ccsIndex];
+
+				chargingInfo[_gunIndex]->Index =	_gunIndex;
+				chargingInfo[_gunIndex]->slotsIndex = slots;
+				chargingInfo[_gunIndex]->SystemStatus = S_BOOTING;
+				chargingInfo[_gunIndex]->Type = _Type_CCS;
+				chargingInfo[_gunIndex]->type_index = _ccsIndex;
+				// 現階段預設為走 DIN70121
+				ShmCcsData->CommProtocol = 0x01;
+				_ccsIndex++;
+				_gunIndex++;
+			}
+		}
+			break;
+		case 'G': // GBT DC
+			break;
+		case 'D': // GBT DC x 2
+			break;
+	}
+}
+
+bool CheckConnectorTypeStatus()
+{
+	bool result = true;
+
+	printf("bd0_1_status = %d, bd0_2_status = %d, bd1_1_status = %d, bd1_2_status = %d \n",
+			bd0_1_status, bd0_2_status, bd1_1_status, bd1_2_status);
+	if (strlen((char *) ShmSysConfigAndInfo->SysConfig.ModelName) >= 9)
+	{
+		byte slots = 1;
+		for (byte typeIndex = 7; typeIndex <= 9; typeIndex++)
+		{
+			AddGunInfoByConnector(ShmSysConfigAndInfo->SysConfig.ModelName[typeIndex], slots);
+			slots++;
+		}
+
+		_gunCount = _gunIndex;
+		printf("_gunCount = %d \n", _gunCount);
+		if (_gunCount == 0)
+			result = false;
+
+		// 偵測槍屬於哪個 slot : 可知道插在板上的Slot 0 或 1 是 Chademo 還是 CCS
+		for (byte gunIndex = 0; gunIndex < _gunCount; gunIndex++)
+		{
+			if (bd0_1_status == 0 && bd0_2_status == 1)
+			{
+				// 與硬體相同 type : Chademo
+				if (chargingInfo[gunIndex]->Type == _Type_Chademo)
+				{
+					chargingInfo[gunIndex]->Evboard_id = 0x01;
+				}
+			}
+			else if (bd0_1_status == 1 && bd0_2_status == 0)
+			{
+				// 與硬體相同 type : CCS
+				if (chargingInfo[gunIndex]->Type == _Type_CCS)
+				{
+					chargingInfo[gunIndex]->Evboard_id = 0x01;
+				}
+			}
+
+			if (bd1_1_status == 0 && bd1_2_status == 1)
+			{
+				// 與硬體相同 type : Chademo
+				if (chargingInfo[gunIndex]->Type == _Type_Chademo)
+				{
+					chargingInfo[gunIndex]->Evboard_id = 0x02;
+				}
+
+				if (_gunCount == 1)
+					chargingInfo[gunIndex]->Evboard_id = 0x01;
+			}
+			else if (bd1_1_status == 1 && bd1_2_status == 0)
+			{
+				// 與硬體相同 type : CCS
+				if (chargingInfo[gunIndex]->Type == _Type_CCS)
+				{
+					chargingInfo[gunIndex]->Evboard_id = 0x02;
+				}
+
+				if (_gunCount == 1)
+					chargingInfo[gunIndex]->Evboard_id = 0x01;
+			}
+
+			printf("index = %d, Type = %d, Evboard_id = %d \n", gunIndex, chargingInfo[gunIndex]->Type, chargingInfo[gunIndex]->Evboard_id);
+			if (chargingInfo[gunIndex]->Evboard_id == 0x00)
+				result = false;
+		}
+	}
+	else
+	{
+		// Module Name 不正確 - 告警
+		result = false;
+	}
+
+	return result;
+}
+
+void KillTask()
+{
+	ChangeLcmByIndex(_LCM_FIX);
+	system("killall Module_EventLogging");
+	system("killall Module_PrimaryComm");
+	system("killall Module_EvComm");
+	system("killall Module_LcmControl");
+	system("killall Module_InternalComm");
+	system("killall Module_PsuComm");
+}
+
+char CheckUpdateProcess()
+{
+	DIR *d;
+	struct dirent *dir;
+	d = opendir("/mnt/");
+
+	if (d)
+	{
+		long int MaxLen=48*1024*1024, ImageLen = 0;
+		while ((dir = readdir(d)) != NULL)
+		{
+			char *new_str;
+			new_str = malloc(strlen("/mnt/")+strlen(dir->d_name)+1);
+			new_str[0] = '\0';
+			strcat(new_str, "/mnt/");
+			strcat(new_str, dir->d_name);
+			int fd = open(new_str, O_RDONLY);
+			if (fd < 0)
+			{
+				return FAIL;
+			}
+
+			unsigned char *ptr = malloc(MaxLen); //-48 is take out the header
+			memset(ptr, 0xFF, MaxLen);  //-48 is take out the header
+			//get the image length
+			ImageLen = read(fd, ptr, MaxLen);
+
+			if (ImageLen > 20)
+			{
+				unsigned int Type = (((unsigned int)ptr[16])<<24 | ((unsigned int)ptr[17])<<16 | ((unsigned int)ptr[18])<<8 | ((unsigned int)ptr[19]));
+			    printf("Typed...%x \r\n", Type);
+
+			    switch (Type)
+			    {
+			    	case 0x10000001:
+			    	case 0x10000002:
+			    	case 0x10000003:
+			    	case 0x10000004:
+			    	case 0x10000005:
+			    	case 0x10000006:
+			    	{
+			    		// CSU_PRIMARY_CONTROLLER : 0x10000006
+			    		int fd = InitComPort(0x04);
+
+			    		if (Upgrade_UART(fd, Type, 0x04, new_str, ShmSysConfigAndInfo->SysConfig.ModelName) == PASS)
+			    			return PASS;
+			    		else
+			    			return FAIL;
+
+			    		close(fd);
+			    	}
+			    	break;
+			    	case 0x1000000B:
+			    	{
+			    		// CHAdeMO_BOARD : 0x1000000B
+			    		for(byte index = 0; index < _gunCount; index++)
+			    		{
+			    			if (chargingInfo[index]->Type == _Type_Chademo)
+			    			{
+			    				int CanFd = InitCanBus();
+			    				if (CanFd > 0)
+			    				{
+			    					if (Upgrade_CAN(CanFd, Type, chargingInfo[index]->Evboard_id, new_str, ShmSysConfigAndInfo->SysConfig.ModelName) == PASS)
+			    					{
+			    						printf("Upgrad OK. \n");
+			    						return PASS;
+			    					}
+			    					else
+			    					{
+			    						printf("Upgrad Fail. \n");
+			    						return FAIL;
+			    					}
+			    				}
+			    				else
+			    				{
+			    					printf("Upgrad FD fail. \n");
+			    					return FAIL;
+			    				}
+			    			}
+			    		}
+			    		break;
+			    	}
+			    }
+			}
+			free(new_str);
+			free(ptr);
+		}
+	}
+	free(dir);
+	closedir(d);
+	return FAIL;
+}
+
+void CreateRfidFork()
+{
+	pid_t rfidRecPid;
+
+	rfidRecPid = fork();
+	if (rfidRecPid == 0)
+	{
+		while(true)
+		{
+			// 刷卡判斷
+			GetCardNumber();
+			usleep(100000);
+		}
+	}
+}
+
+void StartSystemTimeoutDet(unsigned char flag)
+{
+	if (ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag != flag)
+	{
+		gettimeofday(&ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer, NULL);
+	}
+	ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag = flag;
+}
+
+void StopSystemTimeoutDet()
+{
+	ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag = Timeout_None;
+}
+
+void StartGunInfoTimeoutDet(unsigned char gunIndex, unsigned char flag)
+{
+	if (gunIndex < _gunCount)
+	{
+		if (chargingInfo[gunIndex]->TimeoutFlag != flag)
+		{
+			gettimeofday(&chargingInfo[gunIndex]->TimeoutTimer, NULL);
+		}
+		chargingInfo[gunIndex]->TimeoutFlag = flag;
+	}
+}
+
+void StopGunInfoTimeoutDet(unsigned char gunIndex)
+{
+	if (gunIndex < _gunCount)
+	{
+		chargingInfo[gunIndex]->TimeoutFlag = Timeout_None;
+	}
+}
+
+void CreateTimeoutFork()
+{
+	pid_t timeoutPid;
+
+	timeoutPid = fork();
+	if (timeoutPid == 0)
+	{
+		while(true)
+		{
+			// 系統
+			switch(ShmSysConfigAndInfo->SysInfo.SystemTimeoutFlag)
+			{
+				case Timeout_SelftestChk:
+					if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) >= 60000000)
+					{
+						_SelfTestTimeout();
+						StopSystemTimeoutDet();
+					}
+					break;
+				case Timeout_Authorizing:
+					if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) >= 60000000)
+					{
+						_AuthorizedTimeout();
+						StopSystemTimeoutDet();
+					}
+					break;
+				case Timeout_VerifyFail:
+					if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) >= 3000000)
+					{
+						_AutoReturnTimeout();
+						StopSystemTimeoutDet();
+					}
+					break;
+				case Timeout_VerifyComp:
+					if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) >= 3000000)
+					{
+						_AutoReturnTimeout();
+						StopSystemTimeoutDet();
+					}
+					break;
+				case Timeout_WaitPlug:
+					if (GetTimeoutValue(ShmSysConfigAndInfo->SysInfo.SystemTimeoutTimer) >= 40000000)
+					{
+						_DetectPlugInTimeout();
+						StopSystemTimeoutDet();
+					}
+					break;
+			}
+			// 各槍
+			for (byte gun_index = 0; gun_index < _gunCount; gun_index++)
+			{
+				switch(chargingInfo[gun_index]->TimeoutFlag)
+				{
+					case Timeout_Preparing:
+						if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 30000000)
+						{
+							_PrepareTimeout(gun_index);
+							StopGunInfoTimeoutDet(gun_index);
+						}
+						break;
+					case Timeout_EvChargingDet:
+						if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 120000000)
+						{
+							_DetectEvChargingEnableTimeout(gun_index);
+							StopGunInfoTimeoutDet(gun_index);
+						}
+						break;
+					case Timeout_EvseChargingDet:
+						if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 60000000)
+						{
+							_DetectEvseChargingEnableTimeout(gun_index);
+							StopGunInfoTimeoutDet(gun_index);
+						}
+						break;
+					case Timeout_WaitforCompleteDet:
+						if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 10000000)
+						{
+							_CompleteTimeout(gun_index);
+							StopGunInfoTimeoutDet(gun_index);
+						}
+						break;
+					case Timeout_ForCcsPrechargeDet:
+						if (GetTimeoutValue(chargingInfo[gun_index]->TimeoutTimer) >= 60000000)
+						{
+							_CcsPrechargeTimeout(gun_index);
+							StopGunInfoTimeoutDet(gun_index);
+						}
+						break;
+				}
+			}
+			usleep(100000);
+		}
+	}
+}
+
+int main(void)
+{
+//	InitGPIO();
+//	InitEthernet();
+//	sleep(1);
+//	system("/sbin/ifconfig eth0 192.168.1.10 netmask 255.255.255.0 down");
+//	sleep(1);
+//	system("/sbin/ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up");
+//	//echo 1 > /sys/class/gpio/gpio110/value
+//
+//	return 0;
+
+	if(CreateShareMemory() == 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR_1("CreatShareMemory NG \n");
+		#endif
+		if(ShmStatusCodeData!=NULL)
+		{
+			ShmStatusCodeData->AlarmCode.AlarmEvents.bits.FailToCreateShareMemory=1;
+		}
+		return 0;
+		sleep(5);
+		system("reboot -f");
+		sleep(5);
+		system("reboot -f");
+	}
+
+//	while(1)
+//		{
+//			printf("sys id = %s \n", ShmSysConfigAndInfo->SysConfig.SystemId);
+//			printf("sys date = %s \n", ShmSysConfigAndInfo->SysConfig.SystemDateTime);
+//			printf("Ac Phase Count = %d \n", ShmSysConfigAndInfo->SysConfig.AcPhaseCount);
+//			printf("Factory Config = %d \n", ShmSysConfigAndInfo->SysInfo.FactoryConfiguration);
+//			printf("Author mode = %d \n", ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
+//			printf("Default lang = %d \n", ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
+//			printf("Rfid CardNum Endian = %d \n", ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
+//
+//			printf("MaxChargingEnergy = %d \n", ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
+//			printf("MaxChargingPower = %d \n", ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
+//			printf("MaxChargingCurrent = %d \n", ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
+//			printf("MaxChargingDuration = %d \n", ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
+//			printf("PhaseLossPolicy = %d \n", ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy);
+//			printf("CcsAuthentication = %d \n", ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
+//			printf("AcCcsChargingModel = %d \n", ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
+//
+//			printf("FtpServer = %s \n", ShmSysConfigAndInfo->SysConfig.FtpServer);
+//			printf("Eth0DhcpClient = %d \n", ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
+//			printf("Eth0IpAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
+//			printf("Eth0SubmaskAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
+//			printf("Eth0GatewayAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
+//			printf("Eth1DhcpClient = %d \n", ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
+//			printf("Eth1IpAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
+//			printf("Eth1SubmaskAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
+//			printf("Eth1GatewayAddress = %d \n", ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
+//			printf("WifiMode = %d \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode);
+//			printf("WifiSsid = %s \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid);
+//			printf("WifiPassword = %s \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword);
+//			printf("WifiDhcpServer = %d \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer);
+//			printf("WifiDhcpClient = %d \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient);
+//			printf("WifiIpAddress = %s \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress);
+//			printf("WifiSubmaskAddress = %s \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress);
+//			printf("WifiGatewayAddress = %s \n", ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress);
+//			printf("TelcomApn = %d \n", ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
+//			printf("TelcomChapPapId = %s \n", ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId);
+//			printf("TelcomChapPapPwd = %s \n", ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd);
+//			printf("TelcomIpAddress = %s \n", ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress);
+//
+//			printf("BackendConnTimeout = %d \n", ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
+//			printf("OfflinePolicy = %d \n", ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
+//			printf("OfflineMaxChargeEnergy = %d \n", ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
+//			printf("OfflineMaxChargeDuration = %d \n", ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
+//			printf("OcppServerURL = %s \n", ShmSysConfigAndInfo->SysConfig.OcppServerURL);
+//			printf("ChargeBoxId = %s \n", ShmSysConfigAndInfo->SysConfig.ChargeBoxId);
+//
+//			sleep(3);
+//		}
+
+	printf("\n");
+	printf("CheckGunTypeFromHw....... \n");
+	CheckGunTypeFromHw();
+	char *moduleName = "DSYE601J0ET2PH";
+	memcpy(&ShmSysConfigAndInfo->SysConfig.ModelName, moduleName, strlen(moduleName));
+
+	if (!CheckConnectorTypeStatus())
+	{
+		// Module Name 與硬體對應不正確
+		printf("Module Name & HW info none match. \n");
+		DEBUG_ERROR_1("Module Name & HW info none match. \n");
+		sleep(5);
+		return 0;
+	}
+
+	printf("Module Name & HW info correct. Initialize.......\n");
+	Initialization();
+	printf("Spawn all Task. \n");
+	SpawnTask();
+
+	ChangeLcmByIndex(_LCM_INIT);
+	CreateTimeoutFork();
+	printf("Self test. \n");
+	SelfTestRun();
+	StopSystemTimeoutDet();
+
+	if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq == _STEST_FAIL)
+	{
+		for (byte gun_index = 0; gun_index < _gunCount; gun_index++)
+		{
+			setChargerMode(gun_index, MODE_ALARM);
+		}
+		ChangeLcmByIndex(_LCM_FIX);
+		return FAIL;
+	}
+	else
+	{
+		for (byte gun_index = 0; gun_index < _gunCount; gun_index++)
+		{
+			setChargerMode(gun_index, MODE_IDLE);
+		}
+	}
+	ChangeLcmByIndex(_LCM_IDLE);
+	sleep(1);
+	//***** 須新增的偵測 *****//
+	// 1. Thernal - 控制風扇轉速
+	// 2. ouput fuse - 控制風扇轉速
+
+	CreateRfidFork();
+	// Main loop
+	printf("Main Loop. \n");
+	for (;;)
+	{
+		ChkPrimaryStatus();
+		if (ShmSysConfigAndInfo->SysInfo.PageIndex == _LCM_IDLE)
+		{
+			//printf("ShmSysConfigAndInfo->SysInfo.FirmwareUpdate = %d \n", ShmSysConfigAndInfo->SysInfo.FirmwareUpdate);
+			if (ShmSysConfigAndInfo->SysInfo.FirmwareUpdate == YES)
+			{
+				KillTask();
+				return FAIL;
+				if (CheckUpdateProcess() == PASS)
+				{
+					printf("update complete. \n");
+				}
+				else
+				{
+					printf("update fail. \n");
+				}
+				ShmSysConfigAndInfo->SysInfo.FirmwareUpdate = NO;
+				sleep(5);
+				system("reboot -f");
+			}
+		}
+
+		// 讀卡邏輯
+		ScannerCardProcess();
+
+		for (byte gun_index = 0; gun_index < _gunCount; gun_index++)
+		{
+			CheckGpioInStatus();
+			CheckErrorOccurStatus(gun_index);
+
+			switch(chargingInfo[gun_index]->SystemStatus)
+			{
+				case S_IDLE:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_IDLE================================== %x \n", gun_index);
+						chargingInfo[gun_index]->RemainChargingDuration = 0;
+						chargingInfo[gun_index]->PresentChargedEnergy = 0;
+					}
+
+					if (ShmSysConfigAndInfo->SysStopChargingAlarmCode.Level == 2)
+					{
+						ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_FIX;
+						ClearDetectPluginFlag();
+					}
+					else
+					{
+						// 判斷是否有啟用檢查插槍
+						if(isDetectPlugin())
+						{
+							// 卡號驗證成功後,等待充電槍插入充電車
+							if (chargingInfo[gun_index]->ConnectorPlugIn == YES)
+							{
+								ShmSysConfigAndInfo->SysInfo.CurGunSelected = gun_index;
+								strcpy((char *)chargingInfo[gun_index]->CardNumber, (char *)ShmSysConfigAndInfo->SysConfig.UserId);
+								// 當前操作的槍號,進入 Preparing
+								setChargerMode(gun_index, MODE_REASSIGN_CHECK);
+								ClearDetectPluginFlag();
+								ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_NONE;
+							}
+							else if (!isCardScan)
+							{
+								// LCM => Waiting for plugging
+								ShmSysConfigAndInfo->SysInfo.SystemPage = _LCM_WAIT_FOR_PLUG;
+							}
+						}
+						else
+						{
+							if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+								ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_IDLE;
+						}
+					}
+				}
+					break;
+				case S_REASSIGN_CHECK:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_REASSIGN_CHECK================================== %x \n", gun_index);
+						StopSystemTimeoutDet();
+					}
+
+					bool isRessign = false;
+					if (_gunCount > 1)
+					{
+						for (byte index = 0; index < _gunCount; index++)
+						{
+							// 有其他槍已經分配好 psu 模塊
+							if (ShmSysConfigAndInfo->SysInfo.CurGunSelected != index &&
+									chargingInfo[index]->SystemStatus >= S_PREPARNING)
+							{
+								printf("=============Smart Charging============= Step 1 \n");
+								ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_PREPARE;
+								isRessign = true;
+								break;
+							}
+						}
+					}
+
+					if (isRessign)
+						setChargerMode(gun_index, MODE_REASSIGN);
+					else
+						setChargerMode(gun_index, MODE_PRECHARGE);
+				}
+					break;
+				case S_REASSIGN:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_REASSIGN================================== %x \n", gun_index);
+					}
+
+					// 重新分配,此階段主要是讓已經在充電或者準備進入充電前的緩衝
+					// 此狀態下~ 控制權在於 PSU 及 EV小板 Process
+					if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_NONE ||
+							ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_COMP)
+						setChargerMode(gun_index, MODE_PRECHARGE);
+					else if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag == _REASSIGNED_RELAY &&
+						ShmSysConfigAndInfo->SysInfo.BridgeRelayStatus == NO)
+					{
+						printf("=============Smart Charging : _REASSIGNED_COMP============= Step 6 \n");
+						ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_COMP;
+					}
+
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_PRE_CHARGE;
+				}
+					break;
+				case S_PREPARNING:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_PREPARNING================================== %x \n", gun_index);
+						ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_NONE;
+						StopGunInfoTimeoutDet(gun_index);
+						StartGunInfoTimeoutDet(gun_index, Timeout_Preparing);
+					}
+
+					if (ShmSysConfigAndInfo->SysInfo.ReAssignedFlag != _REASSIGNED_NONE)
+						ShmSysConfigAndInfo->SysInfo.ReAssignedFlag = _REASSIGNED_NONE;
+
+					// Precharge 三個流程 : 1 Precharge, 2 Preparing for ev, 3 Preparing for evse
+					// Precharge : AC Contactor <Relay board>, Relay k1 k2 <Relay board>, PSU AddressAssignment, PSU GroupAvailablePower
+					// Preparing for ev : 車端通訊流程
+					// Preparing for evse : PSU (output 500V, 2A), GFD Test <Relay board>
+					//ShmSysConfigAndInfo->SysInfo.AcContactorStatus == YES &&
+					if (((ShmPsuData->SystemPresentPsuQuantity > 0 &&
+							ShmPsuData->PsuGroup[gun_index].GroupPresentPsuQuantity > 0 &&
+							ShmPsuData->PsuGroup[gun_index].GroupAvailablePower > 10) &&
+							chargingInfo[gun_index]->AvailableChargingPower > 10))
+					{
+						setChargerMode(gun_index, MODE_PREPARE_FOR_EV);
+					}
+
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_PRE_CHARGE;
+				}
+					break;
+				case S_PREPARING_FOR_EV: // 等待車端的通訊 (EV 小板),待車端回報後,開始樁端的測試
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_PREPARING_FOR_EV================================== %x \n", gun_index);
+						strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
+						StopGunInfoTimeoutDet(gun_index);
+						StartGunInfoTimeoutDet(gun_index, Timeout_EvChargingDet);
+					}
+
+					if (chargingInfo[gun_index]->Type == _Type_Chademo)
+					{
+						// 檢查車端的槍鎖是否為鎖上
+						if (isEvGunLocked_chademo(gun_index) == YES)
+						{
+							setChargerMode(gun_index, MODE_PREPARE_FOR_EVSE);
+						}
+					}
+					else if (chargingInfo[gun_index]->Type == _Type_CCS)
+					{
+						// 檢查車端的 charging enable 是否為 1
+						if (isEvGunLocked_ccs(gun_index) == YES)
+						{
+							setChargerMode(gun_index, MODE_PREPARE_FOR_EVSE);
+						}
+					}
+
+					if (isEvBoardStopChargeFlag(gun_index) == YES)
+					{
+						// 板端要求停止
+						ChargingTerminalProcess(gun_index);
+					}
+
+					// LCM => Pre-charging
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_PRE_CHARGE;
+				}
+					break;
+				case S_PREPARING_FOR_EVSE: // 等待 RB 通訊及測試,並將狀態回報, CSU 確認 Pass 後,開始進入充電
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_PREPARING_FOR_EVSE================================== %x \n", gun_index);
+						StopGunInfoTimeoutDet(gun_index);
+						StartGunInfoTimeoutDet(gun_index, Timeout_EvseChargingDet);
+					}
+
+					if (chargingInfo[gun_index]->Type == _Type_Chademo)
+					{
+						// 檢查樁端的 GFD 結果
+						if (isPrechargeStatus_chademo(gun_index) > 5 && isPrechargeStatus_chademo(gun_index) < 8)
+						{
+							// 當前操作的槍號,進入 Charging
+							setChargerMode(gun_index, MODE_CHARGING);
+						}
+					}
+					else if (chargingInfo[gun_index]->Type == _Type_CCS)
+					{
+						// 檢查樁端的 GFD 結果
+						if (chargingInfo[gun_index]->GroundFaultStatus == GFD_PASS)
+						{
+							setChargerMode(gun_index, MODE_CCS_PRECHARGE_STEP0);
+						}
+					}
+
+					if (isEvBoardStopChargeFlag(gun_index) == YES)
+					{
+						// 板端要求停止
+						ChargingTerminalProcess(gun_index);
+					}
+
+					// LCM => Pre-charging
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_PRE_CHARGE;
+				}
+					break;
+				case S_CHARGING: // 剛進入充電狀態,等待 EV 小板要求的輸出電流後開始輸出
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("S_CHARGING================================== %x \n", gun_index);
+						StopGunInfoTimeoutDet(gun_index);
+						ftime(&startChargingTime[gun_index]);
+					}
+
+					ftime(&endChargingTime[gun_index]);
+					chargingInfo[gun_index]->RemainChargingDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
+
+					if (isEvBoardStopChargeFlag(gun_index) == YES)
+					{
+						// 板端要求停止
+						ChargingTerminalProcess(gun_index);
+					}
+
+					// LCM => Charging
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_CHARGING;
+				}
+					break;
+				case S_TERMINATING:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf ("terminating......................... %x \n", gun_index);
+						StopGunInfoTimeoutDet(gun_index);
+					}
+
+					if (chargingInfo[gun_index]->Type == _Type_Chademo)
+					{
+						// 非車端的停止 : 需等待小板送出停止指令,讓車端解除槍
+						if (isEvStopCharging_chademo(gun_index) == YES)
+						{
+							setChargerMode(gun_index, MODE_COMPLETE);
+						}
+					}
+					else if (chargingInfo[gun_index]->Type == _Type_CCS)
+					{
+						// 非車端的停止 : 需等待小板送出停止指令,讓車端解除槍
+						if (isEvStopCharging_ccs(gun_index) == YES)
+						{
+							setChargerMode(gun_index, MODE_COMPLETE);
+						}
+					}
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_COMPLETE;
+				}
+					break;
+				case S_COMPLETE:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf ("complete......................... %x \n", gun_index);
+						ftime(&endChargingTime[gun_index]);
+						if (chargingInfo[gun_index]->RemainChargingDuration != 0)
+							chargingInfo[gun_index]->RemainChargingDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
+
+						strcpy((char *)chargingInfo[gun_index]->CardNumber, "");
+						strcpy((char *)ShmSysConfigAndInfo->SysConfig.UserId, "");
+						StopGunInfoTimeoutDet(gun_index);
+						// 測試智能分配,暫時先不要自動回 Idle
+						//StartGunInfoTimeoutDet(gun_index, Timeout_WaitforCompleteDet);
+					}
+
+					if (ShmSysConfigAndInfo->SysInfo.CurGunSelected == gun_index)
+						ShmSysConfigAndInfo->SysInfo.ConnectorPage = _LCM_COMPLETE;
+				}
+					break;
+				case S_CCS_PRECHARGE_ST0:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("CCS Precharge Processing 1....................%x \n", gun_index);
+						StopGunInfoTimeoutDet(gun_index);
+						StartGunInfoTimeoutDet(gun_index, Timeout_ForCcsPrechargeDet);
+					}
+
+					if (isEvBoardStopChargeFlag(gun_index) == YES)
+					{
+						// 板端要求停止
+						ChargingTerminalProcess(gun_index);
+					}
+
+					// 等待 EV 小板 (CCS) 通知可以開始 Precharge
+					// 切換 D+ Relay to Precharge Relay
+					if (isPrechargeStatus_ccs(gun_index) == 39 || isPrechargeStatus_ccs(gun_index) == 40)
+					{
+						if (chargingInfo[gun_index]->RelayKPK2Status == YES && chargingInfo[gun_index]->PrechargeStatus != PRECHARGE_READY)
+						//if (chargingInfo[gun_index]->PrechargeStatus != PRECHARGE_PRERELAY_PASS)
+						{
+							printf("Send precharge ready 1..........%x, status = %d \n", gun_index, isPrechargeStatus_ccs(gun_index));
+							chargingInfo[gun_index]->PrechargeStatus = PRECHARGE_READY;
+						}
+					}
+					else if (isPrechargeStatus_ccs(gun_index) == 45 || isPrechargeStatus_ccs(gun_index) == 46)
+					{
+						setChargerMode(gun_index, MODE_CCS_PRECHARGE_STEP1);
+					}
+
+					break;
+				}
+				case S_CCS_PRECHARGE_ST1:
+				{
+					if (isModeChange(gun_index))
+					{
+						printf("CCS Precharge Processing 2....................%x \n", gun_index);
+					}
+
+					if (isEvBoardStopChargeFlag(gun_index) == YES)
+					{
+						// 板端要求停止
+						ChargingTerminalProcess(gun_index);
+					}
+
+					// 等待小板通知進入充電
+					// 切換 D+ Relay to Precharge Relay
+					if (chargingInfo[gun_index]->RelayK1K2Status == YES)
+					{
+						chargingInfo[gun_index]->PrechargeStatus = PRECHARGE_READY;
+						setChargerMode(gun_index, MODE_CHARGING);
+					}
+					break;
+				}
+			}
+		}
+
+		if (ShmSysConfigAndInfo->SysInfo.SystemPage != _LCM_NONE)
+			ChangeLcmByIndex(ShmSysConfigAndInfo->SysInfo.SystemPage);
+		else
+			ChangeLcmByIndex(ShmSysConfigAndInfo->SysInfo.ConnectorPage);
+
+		usleep(whileLoopTime);
+	}
+
+	return FAIL;
+}

BIN
EVSE/Projects/DS60-120/Apps/main.o


+ 5 - 0
EVSE/Projects/DS60-120/Apps/timeout.c

@@ -0,0 +1,5 @@
+#include "timeout.h"
+
+//===============================================
+// Initial Callback function
+//===============================================

+ 52 - 0
EVSE/Projects/DS60-120/Apps/timeout.h

@@ -0,0 +1,52 @@
+#ifndef TIMEOUT_H_
+#define TIMEOUT_H_
+
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<linux/can.h>
+#include 	<linux/can/raw.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <termios.h>
+#include    <errno.h>
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+
+enum Timeout_flag
+{
+	Timeout_None =					0,
+	Timeout_SelftestChk = 			1,
+	Timeout_Authorizing = 			2,
+	Timeout_VerifyFail = 			3,
+	Timeout_VerifyComp = 			4,
+	Timeout_WaitPlug = 				5,
+
+	Timeout_Preparing = 			6,
+	Timeout_EvChargingDet = 		7,
+	Timeout_EvseChargingDet = 		8,
+	Timeout_WaitforCompleteDet = 	9,
+
+	Timeout_ForCcsPrechargeDet = 	10,
+};
+
+#endif /* TIMEOUT_H_ */

BIN
EVSE/Projects/DS60-120/Apps/timeout.o


BIN
EVSE/Projects/DS60-120/Images/MLO


BIN
EVSE/Projects/DS60-120/Images/am335x-evm.dtb


BIN
EVSE/Projects/DS60-120/Images/ramdisk.gz


BIN
EVSE/Projects/DS60-120/Images/u-boot.img


BIN
EVSE/Projects/DS60-120/Images/zImage


+ 50 - 61
EVSE/Projects/define.h

@@ -40,15 +40,15 @@ Storage							0x0A200000-0x7FFFFFFF		1886 MB
 #define CHAdeMO_QUANTITY	1
 #define CCS_QUANTITY		1
 #define GB_QUANTITY			0
-#define AC_QUANTITY			1
+#define AC_QUANTITY			0
 #define PSU_QUANTITY		2
-#define ONE_CONNECTOR_USE	1
+#define ONE_CONNECTOR_USE	0
 
 /*SystemLog message*/
 #define SystemLogMessage			//for engineer to do analysis
 
 /**************************************************************************************/
-/**************************share memory key information***************************/
+/*****************************share memory key information*****************************/
 /**************************************************************************************/
 #define ShmSysConfigAndInfoKey	1001
 #define ShmPsuKey				1002
@@ -135,7 +135,8 @@ struct SysConfigData
 	unsigned short			Ccs1PlugInTime;				//0~65535
 	unsigned short			Ccs2PlugInTimes;			//0~65535
 	unsigned short			ChademoPlugInTimes;			//0~65535
-	unsigned char			chargePointVendor[32];	//the Vendor of the ChargePoint
+	unsigned char			chargePointVendor[32];			//the Vendor of the ChargePoint
+	unsigned char 			PsuAcInputType;				//0: 220, 1: 277
 	/**************Charging***************/
 	unsigned short	   		MaxChargingEnergy;			//0: no limit,	1 ~ 65535	kWh
 	unsigned short	   		MaxChargingPower;			//0: rating value, 1 ~ RATING_POWER	kW"
@@ -145,7 +146,7 @@ struct SysConfigData
 	unsigned char   		LocalWhiteCard[10][32];		//Max. card quantity is 10
 	unsigned char 			UserId[32];					//the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
 	/**************Network***************/
-	unsigned char 			FtpServer[256];				//the ftp server for Phihong server to do data transimission
+	unsigned char 			FtpServer[32];				//the ftp server for Phihong server to do data transimission
 	struct EthConfigData	Eth0Interface;
 	struct EthConfigData	Eth1Interface;
 	struct WifiConfigData 		AthInterface;
@@ -275,8 +276,8 @@ struct SysInfoData
 	unsigned char 		AcContactorStatus;				// 0: disconnected, 1: connected
 	unsigned char 	 	SystemTimeoutFlag;				// 0 : none, 1 : self test
 	struct timeval		SystemTimeoutTimer;
-	unsigned char   SystemPage;
-	unsigned char   ConnectorPage;
+	unsigned char 		SystemPage;
+	unsigned char 		ConnectorPage;
 };
 
 struct WARNING_CODE_INFO
@@ -398,7 +399,7 @@ struct FaultCodeData
 	}FaultEvents;
 };
 
-char AlarmStatusCode[64][6]=
+char AlarmStatusCode[128][6]=
 {
 	"012200",	//System L1 input OVP
 	"012201",	//System L2 input OVP
@@ -462,15 +463,30 @@ char AlarmStatusCode[64][6]=
 	"012259",	//CHAdeMO groundfault detection timeout (GFD)
 	"012260",	//CCS groundfault detection timeout (GFD)
 	"012261",	//GB groundfault detection timeout (GFD)
-	"012262",	//Reserved
-	"012263"	//Reserved
+	"012262",	//Circuit Short
+	"012263",	//Reserved
+	"012264", 	// PSU Output Short Circuit
+	"012265", 	// PSU Discharge Abnormal
+	"012266", 	// PSU Dc Side ShutDown
+	"012267", 	// PSU Failure Alarm
+	"012268", 	// PSU Protection Alarm
+	"012269", 	// PSU FanFailure Alarm
+	"012270", 	//Reserved
+	"012271",	//Reserved
+	"012272", 	// PSU WalkIn State
+	"012273", 	// PSU Power Limited State
+	"012274", 	// PSU Id Repeat
+	"012275", 	// PSU Severe Uneven Current
+	"012276", 	// PSU Three Phase Input Inadequate
+	"012277", 	// PSU Three Phase Onput Imbalance
+	"012278", 	// PSU Ffc Side ShutDown
 };
 struct AlarmCodeData
 {
-	unsigned char PreviousAlarmVal[8];
+	unsigned char PreviousAlarmVal[10];
 	union
 	{
-		unsigned char AlarmVal[8];
+		unsigned char AlarmVal[10];
 		struct
 		{
 			//AlarmVal[0]
@@ -543,7 +559,25 @@ struct AlarmCodeData
 			unsigned char ChademoGroundfaultTimeout:1;			//bit 3
 			unsigned char CcsGroundfaultTimeout:1;				//bit 4
 			unsigned char GbGroundfaultTimeout:1;				//bit 5
-			unsigned char :1;									//bit 6
+			unsigned char CircuitShort:1;						//bit 6
+			unsigned char :1;									//bit 7
+			//AlarmVal[8]
+			unsigned char PsuOutputShortCircuit :1;			//bit 0
+			unsigned char PsuDischargeAbnormal :1;					//bit 1
+			unsigned char PsuDcSideShutDown :1;					//bit 2
+			unsigned char PsuFailureAlarm :1;			//bit 3
+			unsigned char PsuProtectionAlarm :1;				//bit 4
+			unsigned char PsuFanFailureAlarm :1;				//bit 5
+			unsigned char :1;						//bit 6
+			unsigned char :1;									//bit 7
+			//AlarmVal[9]
+			unsigned char PsuWalkInState :1;					//bit 0
+			unsigned char PsuPowerLimitedState :1;					//bit 1
+			unsigned char PsuIdRepeat :1;					//bit 2
+			unsigned char PsuSevereUnevenCurrent :1;			//bit 3
+			unsigned char PsuThreePhaseInputInadequate :1;				//bit 4
+			unsigned char PsuThreePhaseOnputImbalance :1;				//bit 5
+			unsigned char PsuFfcSideShutDown :1;						//bit 6
 			unsigned char :1;									//bit 7
 		}bits;
 	}AlarmEvents;
@@ -772,53 +806,7 @@ struct PsuModuleData
 	char 				InletTemp_2;			//0x00: -60¢XC  ~  0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
 	char 				InletTemp;			//0x00: -60¢XC  ~  0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
 	char 				OutletTemp;			//0x00: -60¢XC  ~  0xFE: 194¢XC, resolution: 1¢XC, offset: -60¢XC, 0xFF: invalid
-
-	union
-	{
-		unsigned int 		AlarmCode;
-		struct
-		{
-			//byte 0
-		    unsigned char OutputShortCircuit:1;						//bit 0,	H: TRUE,    L:FALSE
-			unsigned char :1;						                //bit 1,bit 7 reserved
-			unsigned char :1; 						                //bit 2,bit 7 reserved
-			unsigned char :1;						                //bit 3,bit 7 reserved
-			unsigned char SleepMode:1;						        //bit 4,	H: TRUE,    L:FALSE
-			unsigned char DischargeAbnormal:1;						//bit 5,	H: TRUE,    L:FALSE
-			unsigned char:1;						                //bit 6,bit 7 reserved
-			unsigned char:1;                                        //bit 7 reserved
-
-			//byte 1
-		    unsigned char DcSideShutDown:1;						    //bit 0,	H: TRUE,    L:FALSE
-			unsigned char FailureAlarm:1;						    //bit 1,bit 7 reserved
-			unsigned char ProtectionAlarm:1; 						//bit 2,bit 7 reserved
-			unsigned char FanFailureAlarm:1;						//bit 3,bit 7 reserved
-			unsigned char OTP:1;						            //bit 4,	H: TRUE,    L:FALSE
-			unsigned char OVP:1;						            //bit 5,	H: TRUE,    L:FALSE
-			unsigned char WalkInState:1;						    //bit 6,bit 7 reserved
-			unsigned char CommunicationAlarm:1;                                        //bit 7 reserved	
-			    
-			//byte 2
-		    unsigned char PowerLimitedState:1;						//bit 0,	H: TRUE,    L:FALSE
-			unsigned char IdRepeat:1;						        //bit 1,bit 7 reserved
-			unsigned char SevereUnevenCurrent:1; 					//bit 2,bit 7 reserved
-			unsigned char ThreePhaseInputInadequate:1;				//bit 3,bit 7 reserved
-			unsigned char ThreePhaseOnputImbalance:1;				//bit 4,	H: TRUE,    L:FALSE
-			unsigned char InputUndervoltage:1;						//bit 5,	H: TRUE,    L:FALSE
-			unsigned char InputOvervoltage:1;						//bit 6,bit 7 reserved
-			unsigned char FfcSideShutDown:1;                        //bit 7 reserved
-
-			//byte 3
-		    unsigned char :1;						                //bit 0,	H: TRUE,    L:FALSE
-			unsigned char :1;						                //bit 1,bit 7 reserved
-			unsigned char :1; 					                    //bit 2,bit 7 reserved
-			unsigned char :1;				                        //bit 3,bit 7 reserved
-			unsigned char :1;				                        //bit 4,	H: TRUE,    L:FALSE
-			unsigned char :1;						                //bit 5,	H: TRUE,    L:FALSE
-			unsigned char :1;						                //bit 6,bit 7 reserved
-			unsigned char :1;                                       //bit 7 reserved                                                                
-		}bits;
-	}INFYPWR_Alarm;
+	unsigned int 		AlarmCode;
 	unsigned int 		FaultCode;			//
 };
 
@@ -890,7 +878,7 @@ struct CHAdeMOEvData
 	unsigned char  SOC;					//102.6				0~100(%) (unit:%)
 										//					Display Only
 	unsigned char  Communicating;			//					it is true if receive EV CAN message within every 1500ms
-unsigned char  PresentMsgFlowStatus;
+	unsigned char  PresentMsgFlowStatus;	//
 };
 
 struct CHAdeMOEvseData
@@ -2471,6 +2459,7 @@ struct PrimaryMcuData
 /**************************************************************************************/
 struct FanModuleData
 {
+	unsigned char  SelfTest_Comp;
 	unsigned char	version[16];			//fan power module firmware version
 	unsigned short	PresentFan1Speed;		//RPM
 	unsigned short	PresentFan2Speed;		//RPM

BIN
EVSE/rootfs/lib/qcaspi.ko


BIN
EVSE/rootfs/root/Module_4g


BIN
EVSE/rootfs/root/Module_Wifi


BIN
EVSE/rootfs/root/OcppBackend


BIN
EVSE/rootfs/root/WebService


BIN
EVSE/rootfs/root/logPackTools


+ 0 - 165
EVSE/rootfs/var/www/css/color2.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #444444;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #444444;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #444444;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #444444;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #444444;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #444444 !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #009999;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #009999;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #009999 !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #009999;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #009999;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #009999;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #009999;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(0,153,153,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(0,153,153,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(0,153,153,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #cc0000;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #cc0000 !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #009999; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #009999 25%, #444444 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#009999), color-stop(75%,#444444)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #009999 25%,#444444 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #009999 25%,#444444 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #009999 25%,#444444 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #009999 25%,#444444 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#009999', endColorstr='#444444',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color3.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #494C4C;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #494C4C;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #494C4C;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #494C4C;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #494C4C;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #494C4C !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #B5C238;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #B5C238;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #B5C238 !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #B5C238;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #B5C238;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #B5C238;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #B5C238;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(181,194,56,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(181,194,56,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(181,194,56,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #E46C0A;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #E46C0A !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #B5C238; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #B5C238 25%, #494C4C 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#B5C238), color-stop(75%,#494C4C)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #B5C238 25%,#494C4C 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #B5C238 25%,#494C4C 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #B5C238 25%,#494C4C 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #B5C238 25%,#494C4C 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#B5C238', endColorstr='#494C4C',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color4.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #365067;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #365067;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #365067;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #365067;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #365067;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #365067 !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #926AA8;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #926AA8;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #926AA8 !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #926AA8;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #926AA8;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #926AA8;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #926AA8;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(146,106,168,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(146,106,168,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(146,106,168,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #8CC2CC;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #8CC2CC !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #926AA8; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #926AA8 25%, #365067 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#926AA8), color-stop(75%,#365067)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #926AA8 25%,#365067 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #926AA8 25%,#365067 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #926AA8 25%,#365067 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #926AA8 25%,#365067 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#926AA8', endColorstr='#365067',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color5.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #341910;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #341910;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #341910;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #341910;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #341910;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #341910 !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #F65879;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #F65879;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #F65879 !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #F65879;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #F65879;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #F65879;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #F65879;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(246,88,121,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(246,88,121,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(246,88,121,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #FF93A7;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #FF93A7 !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #F65879; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #F65879 25%, #341910 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#F65879), color-stop(75%,#341910)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #F65879 25%,#341910 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #F65879 25%,#341910 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #F65879 25%,#341910 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #F65879 25%,#341910 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F65879', endColorstr='#341910',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color6.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #0b0b0b;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #0b0b0b;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #0b0b0b;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #0b0b0b;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #0b0b0b;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #0b0b0b !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #aaac8f;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #aaac8f;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #aaac8f !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #aaac8f;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #aaac8f;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #aaac8f;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #aaac8f;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(170,172,143,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(170,172,143,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(170,172,143,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #55a5ae;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #55a5ae !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #aaac8f; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #aaac8f 25%, #0b0b0b 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#aaac8f), color-stop(75%,#0b0b0b)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #aaac8f 25%,#0b0b0b 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #aaac8f 25%,#0b0b0b 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #aaac8f 25%,#0b0b0b 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #aaac8f 25%,#0b0b0b 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#aaac8f', endColorstr='#0b0b0b',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color7.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #343838;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #343838;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #343838;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #343838;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #343838;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #343838 !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #ddbc2d;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #ddbc2d;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #ddbc2d !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #ddbc2d;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #ddbc2d;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #ddbc2d;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #ddbc2d;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(221,188,45,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(221,188,45,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(221,188,45,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #00b4cc;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #00b4cc !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #ddbc2d; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #ddbc2d 25%, #343838 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#ddbc2d), color-stop(75%,#343838)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #ddbc2d 25%,#343838 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #ddbc2d 25%,#343838 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #ddbc2d 25%,#343838 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #ddbc2d 25%,#343838 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ddbc2d', endColorstr='#343838',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 165
EVSE/rootfs/var/www/css/color8.css

@@ -1,165 +0,0 @@
-/*********************************************
-
-	Secondary Color
-
-*********************************************/
-.envor-header-1 .envor-top-bar, .jspTrack, .envor-mobile-menu, .envor-layerslider .envor-layerslider-block, footer.envor-footer, #envor-mobile-menu-btn, #envor-mobile-cart-btn, .envor-btn-secondary,
-.envor-project figure figcaption i:hover, .envor-controls span, #to-the-top, .envor-header-2 .envor-header-bg .header-search form button[type=submit].focus,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart, .envor-header-2 .envor-desktop-dark-menu-bg, .envor-testimonials-2-inner, .envor-testimonials-2 .arrow,
-.envor-estate-form .envor-estate-search-type span, .envor-estate-form .envor-estate-form-item i.fa-caret-down, .envor-header-1 .envor-dark-header-bg, .envor-header-2 .envor-dark-header-bg,
-.envor-property-1 figure figcaption i:hover, .envor-header-3 .envor-desktop-dark-menu-bg, .envor-header-3 .envor-header-dark-bg, .ls-label-secondary, .envor-domain-price,
-.envor-domain-search form .envor-domain-search-inner div.zone i, .envor-pricing-1 header, .envor-product-1 figure figcaption i:hover, .envor-feature-3 span .fa, .envor-feature-3 span .glyphicon,
-.envor-testimonials-3 .envor-testimonials-3-inner .author .avatar, .envor-tabs header span.active, .envor-tabs header span.active div.arrow, .envor-feature-store-dark span,
-.envor-toggle article header.active, .envor-social-button-2 .esb-tooltip, .envor-social-button-2 .esb-tooltip .arrow, .envor-skill-1 .color-1, .envor-skill-1 .value, .envor-skill-1 .value .arrow,
-p.contact-item i, .envor-side-navi ul li.active, .envor-sorting .envor-sorting-filters span.active, .envor-qa .a .lbl, .envor-qa .a .arrow, .envor-pagination .current, .envor-property-1 p.type span,
-.envor-single-estate p.type span, .envor-single-product p.qty i.fa, .envor-section-cart .shoppin-cart-table thead, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa,
-.envor-post figure figcaption i:hover, .envor-comment i.fa {
-	background-color: #434241;
-}
-.envor-navigation a, .envor-section-twitter-1 i.fa-twitter, .envor-feature-store span i, .envor-section-color .envor-navigation a:hover, .envor-social-button-2-white .esb-main i:hover,
-.envor-simple-twiiter-widget ul li i.fa-twitter {
-	color: #434241;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-left-color: #434241;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li, .envor-header-1 .envor-dark-header-bg nav > ul > li, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li {
-	border-right-color: #434241;
-}
-.envor-header-2 .envor-desktop-dark-menu-bg, .envor-header-1 .envor-dark-header-bg, .envor-header-3 .envor-desktop-dark-menu-bg {
-	border-bottom-color: #434241;
-}
-.envor-section-color .envor-navigation a:hover {
-	color: #434241 !important;
-}
-
-
-
-
-/*********************************************
-
-	Primaty Color
-
-*********************************************/
-
-a:hover, .envor-top-bar p a:hover, .envor-header-1 .envor-top-bar .shopping-cart .cart .cart-entry p .price, .envor-mega .envor-mega-section ul li a:hover i,
-.envor-mobile-menu nav ul li i.glyphicon-plus-sign:hover, .envor-mobile-menu nav ul li i.glyphicon-minus-sign, .envor-mobile-menu nav ul li a:hover, .envor-mobile-menu h3,
-.envor-layerslider .envor-layerslider-block h3, .envor-mobile-cart-list p a:hover, .envor-mobile-cart-list p span.price, .envor-footer .envor-widget .envor-post-preview .header a:hover,
-.envor-contacts-widget p .fa, .envor-contacts-widget p .glyphicon, .envor-footer a:hover, #envor-preload i.fa, .envor-section h2 span,
-.envor-section p.block-description, .envor-project .envor-project-inner .envor-project-details p.filter, .envor-project .envor-project-inner .envor-project-details .envor-project-likes .fa,
-.envor-project .envor-project-inner .envor-project-details .envor-project-likes .glyphicon, .envor-testimonials-1 i.fa, .envor-testimonials-1 i.glyphicon,
-.envor-header-2 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-footer .envor-widget a:hover, .envor-contacts-2-widget p span, .envor-section-core ul li i,
-.envor-testimonials-2 .fa, .envor-testimonials-2 .glyphicon, .envor-header-1 .envor-dark-header-bg nav > ul > li > a:hover, .envor-about-widget p.contacts i, .envor-btn-primary-border,
-.envor-property-1 ul li, .envor-header-3 .envor-header-bg .contact-info p i, .envor-header-3 .envor-desktop-dark-menu-bg nav > ul > li > a:hover, .envor-header-3 .envor-header-dark-bg .contact-info a:hover,
-.ls-layer p.feature i, .ls-layer p.color-text, .envor-domain-price p, .envor-pricing-1 header .plan-title small, .envor-store-price-1 p.p1, .envor-product-1 .details span.price,
-.envor-testimonials-3 .envor-testimonials-3-inner p.text i, .envor-testimonials-3 .envor-testimonials-3-inner .author small, .envor-section-color li.tweet-item a, ul.e-color-list li i,
-.envor-testimonials-2 p.author span, .envor-feature-store p strong, .envor-toggle article header.active .fa-minus, .envor-category-widget ul li p a:hover i, blockquote .blockquote-inner .fa,
-p.contact-item i, .envor-side-navi ul li:hover i, .envor-pricing-2 .envor-pricing-2-item .price p, .envor-partner-1 p.link, .envor-career-1 .details p.title, .envor-career-1 header small,
-.envor-team-1 .envor-team-1-details p.role, .envor-testimonials-inner p.author span, p.used-skills span i, p.project-date i, .envor-property-1 ul li span, .envor-single-estate p.price,
-.envor-single-estate .envor-propert-details ul li span, ul.envor-property-options li .fa-check-circle, .envor-store-filters p i:hover, .envor-single-product p.price,
-.envor-section-cart ul.order-total li span.total, .payment-option span {
-	color: #b87333;
-}
-.envor-header-1 .envor-top-bar p i, .envor-header-1 .envor-top-bar ul.social-btns li a.hover, .envor-header-1 .envor-top-bar .shopping-cart > span i.hover, .envor-btn-primary,
-.jspDrag, .envor-scroller > i:hover, i.clicked, .envor-feature header i, .arrow-color, .envor-controls span.active, .envor-section-st2, .envor-header-2 .envor-header-bg .social-buttons ul li a:hover,
-.envor-header-2 .envor-header-bg .social-buttons ul li a.envor-cart span, .envor-estate-form .envor-estate-search-type span.active, .envor-header-2 .envor-dark-header-bg .header-search form.focus button[type=submit],
-.envor-about-widget p.links a:hover,.envor-property-1 span, .envor-header-3 .envor-header-bg .social-buttons a:hover, .ls-label-primary, .envor-section-st3, .envor-feature-2-color header .arrow,
-.envor-pricing-1 header .plan-price, .envor-pricing-1 header .plan-price .arrow, .envor-tabs article > .fa, .envor-tabs article > .glyphicon, .dropcap, .envor-skill-1 .color-2, .envor-desktop-breadscrubs-inner,
-.envor-mobile-breadscrubs, .envor-skill-2 span.color, .envor-team-1 header, .envor-category-widget ul li p span.hovered, .envor-pricing-2 .envor-pricing-2-item .plan p,
-.envor-pricing-2 .envor-pricing-2-item .plan .arrow, .riva-countdown .riva-countdown-item .label, .envor-qa .q .lbl, .envor-qa .q .arrow, .envor-pagination .page-numbers:hover,
-.envor-single-estate .envor-propert-details p.agent-cosial a, .envor-single-product p.qty i.fa:hover, .envor-section-cart p.incart span, .envor-section-cart .shoppin-cart-table tbody td p.qty i.fa:hover,
-.envor-post header h3 .fa, .envor-post-author {
-	background-color: #b87333;
-}
-.clicked, .envor-feature-2-color header i {
-	background-color: #b87333 !important;
-}
-.envor-top-bar .shopping-cart .cart p.title, .envor-mega .envor-mega-section h3, .envor-store-price-1 p.p1, .envor-single-estate .envor-propert-details h3, h3.h3-2, .envor-section-cart .shoppin-cart-table thead,
-.riva-toggle-tab h2, .envor-comment p.meta {
-	border-bottom-color: #b87333;
-}
-.envor-mobile-menu, .envor-domain-price, .envor-call-to-action-3, blockquote .blockquote-inner {
-	border-left-color: #b87333;
-}
-.envor-post-preview .header .date span.month, .envor-copyright-widget, .envor-tabs header span.active, .envor-toggle article header.active, .envor-side-navi ul li.active, .envor-f1,
-.envor-sorting .envor-sorting-filters span.active, .envor-post .date span.month, .envor-post .likes span.month {
-	border-top-color: #b87333;
-}
-.envor-footer .envor-navigation a:hover, .envor-flick-widget img:hover, .envor-navigation a:hover, .envor-header-2 .envor-header-bg .header-search form.focus, .envor-about-widget p.links a:hover,
-.envor-btn-primary-border, .envor-header-3 .envor-header-bg .social-buttons a:hover,
-input[type=text]:focus,
-input[type=email]:focus,
-input[type=password]:focus,
-select:focus, textarea:focus,
-.envor-pagination .page-numbers:hover,
-.payment-option-active span {
-	border-color: #b87333;
-}
-.envor-project figure figcaption, .envor-property-1 figure figcaption, .envor-product-1 figure figcaption, .envor-post-preview figure figcaption, .envor-post figure figcaption {
-	background-color: rgba(184,115,51,0.8);
-}
-.envor-navigation a:hover, .envor-section-color .envor-navigation a {
-	background-color: rgba(184,115,51,1);
-}
-.envor-header-2 .envor-dark-header-bg .social-buttons ul li a.envor-cart:hover {
-	background-color: rgba(184,115,51,1) !important;
-}
-
-
-
-
-/*********************************************
-
-	Third Color
-
-*********************************************/
-
-.envor-header-1 .envor-top-bar .shopping-cart > span i.regular, .envor-btn:hover, .envor-controls span:hover, #to-the-top:hover, .envor-tags-widget a.envor-tag-item:hover {
-	background-color: #cf30dd;
-}
-.envor-btn-primary-border:hover, .envor-btn-secondary-border:hover {
-	border-color: #cf30dd !important;
-}
-
-
-
-
-
-/*********************************************
-
-	Placeholder
-
-*********************************************/
-
-::-webkit-input-placeholder {
-   color: #ccc;
-}
-
-:-moz-placeholder { /* Firefox 18- */
-   color: #ccc;
-}
-
-::-moz-placeholder {  /* Firefox 19+ */
-   color: #ccc;
-}
-
-:-ms-input-placeholder {  
-   color: #ccc;
-}
-
-/*********************************************
-
-   Coming Soon Bg Color
-
-*********************************************/
-
-.envor-content-404-gradient {
-	background: #b87333; /* Old browsers */
-	background: -moz-linear-gradient(-45deg,  #b87333 25%, #434241 75%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, right bottom, color-stop(25%,#b87333), color-stop(75%,#434241)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(-45deg,  #b87333 25%,#434241 75%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(-45deg,  #b87333 25%,#434241 75%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(-45deg,  #b87333 25%,#434241 75%); /* IE10+ */
-	background: linear-gradient(135deg,  #b87333 25%,#434241 75%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b87333', endColorstr='#434241',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-}

+ 0 - 49
EVSE/rootfs/var/www/css/colorbox-skins/2/colorbox.css

@@ -1,49 +0,0 @@
-/*
-    Colorbox Core Style:
-    The following CSS is consistent between example themes and should not be altered.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
-
-/* 
-    User Style:
-    Change the following styles to modify the appearance of Colorbox.  They are
-    ordered & tabbed in a way that represents the nesting of the generated HTML.
-*/
-#cboxOverlay{background:#fff;}
-#colorbox{outline:0;}
-    #cboxContent{margin-top:32px; overflow:visible; background:#000;}
-        .cboxIframe{background:#fff;}
-        #cboxError{padding:50px; border:1px solid #ccc;}
-        #cboxLoadedContent{background:#000; padding:1px;}
-        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
-        #cboxLoadingOverlay{background:#000;}
-        #cboxTitle{position:absolute; top:-22px; left:0; color:#000;}
-        #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
-
-        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
-        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;}
-        
-        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
-        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
-
-        #cboxPrevious{background-position:0px 0px; right:44px;}
-        #cboxPrevious:hover{background-position:0px -25px;}
-        #cboxNext{background-position:-25px 0px; right:22px;}
-        #cboxNext:hover{background-position:-25px -25px;}
-        #cboxClose{background-position:-50px 0px; right:0;}
-        #cboxClose:hover{background-position:-50px -25px;}
-        .cboxSlideshow_on #cboxPrevious, .cboxSlideshow_off #cboxPrevious{right:66px;}
-        .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;}
-        .cboxSlideshow_on #cboxSlideshow:hover{background-position:-100px -25px;}
-        .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;}
-        .cboxSlideshow_off #cboxSlideshow:hover{background-position:-75px -25px;}

BIN
EVSE/rootfs/var/www/css/colorbox-skins/2/images/controls.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/2/images/loading.gif


+ 0 - 44
EVSE/rootfs/var/www/css/colorbox-skins/3/colorbox.css

@@ -1,44 +0,0 @@
-/*
-    Colorbox Core Style:
-    The following CSS is consistent between example themes and should not be altered.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
-
-/* 
-    User Style:
-    Change the following styles to modify the appearance of Colorbox.  They are
-    ordered & tabbed in a way that represents the nesting of the generated HTML.
-*/
-#cboxOverlay{background:#000;}
-#colorbox{outline:0;}
-    #cboxContent{margin-top:20px;background:#000;}
-        .cboxIframe{background:#fff;}
-        #cboxError{padding:50px; border:1px solid #ccc;}
-        #cboxLoadedContent{border:5px solid #000; background:#fff;}
-        #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;}
-        #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
-        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
-
-        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
-        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
-        
-        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
-        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
-        
-        #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
-        #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;}
-        #cboxPrevious:hover{background-position:bottom left;}
-        #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;}
-        #cboxNext:hover{background-position:bottom right;}
-        #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;}
-        #cboxClose:hover{background-position:bottom center;}

BIN
EVSE/rootfs/var/www/css/colorbox-skins/3/images/controls.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/3/images/loading.gif


+ 0 - 65
EVSE/rootfs/var/www/css/colorbox-skins/4/colorbox.css

@@ -1,65 +0,0 @@
-/*
-    Colorbox Core Style:
-    The following CSS is consistent between example themes and should not be altered.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
-
-/* 
-    User Style:
-    Change the following styles to modify the appearance of Colorbox.  They are
-    ordered & tabbed in a way that represents the nesting of the generated HTML.
-*/
-#cboxOverlay{background:#fff;}
-#colorbox{outline:0;}
-    #cboxTopLeft{width:25px; height:25px; background:url(images/border1.png) no-repeat 0 0;}
-    #cboxTopCenter{height:25px; background:url(images/border1.png) repeat-x 0 -50px;}
-    #cboxTopRight{width:25px; height:25px; background:url(images/border1.png) no-repeat -25px 0;}
-    #cboxBottomLeft{width:25px; height:25px; background:url(images/border1.png) no-repeat 0 -25px;}
-    #cboxBottomCenter{height:25px; background:url(images/border1.png) repeat-x 0 -75px;}
-    #cboxBottomRight{width:25px; height:25px; background:url(images/border1.png) no-repeat -25px -25px;}
-    #cboxMiddleLeft{width:25px; background:url(images/border2.png) repeat-y 0 0;}
-    #cboxMiddleRight{width:25px; background:url(images/border2.png) repeat-y -25px 0;}
-    #cboxContent{background:#fff; overflow:hidden;}
-        .cboxIframe{background:#fff;}
-        #cboxError{padding:50px; border:1px solid #ccc;}
-        #cboxLoadedContent{margin-bottom:20px;}
-        #cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
-        #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
-        #cboxLoadingOverlay{background:#fff url(images/loading.gif) no-repeat 5px 5px;}
-
-        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
-        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
-        
-        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
-        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
-
-        #cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
-        #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
-        #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
-        #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
-
-/*
-  The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
-  when an alpha filter (opacity change) is set on the element or ancestor element.  This style is not applied to or needed in IE9.
-  See: http://jacklmoore.com/notes/ie-transparency-problems/
-*/
-.cboxIE #cboxTopLeft,
-.cboxIE #cboxTopCenter,
-.cboxIE #cboxTopRight,
-.cboxIE #cboxBottomLeft,
-.cboxIE #cboxBottomCenter,
-.cboxIE #cboxBottomRight,
-.cboxIE #cboxMiddleLeft,
-.cboxIE #cboxMiddleRight {
-    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
-}

BIN
EVSE/rootfs/var/www/css/colorbox-skins/4/images/border1.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/4/images/border2.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/4/images/loading.gif


+ 0 - 57
EVSE/rootfs/var/www/css/colorbox-skins/5/colorbox.css

@@ -1,57 +0,0 @@
-/*
-    Colorbox Core Style:
-    The following CSS is consistent between example themes and should not be altered.
-*/
-#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
-#cboxOverlay{position:fixed; width:100%; height:100%;}
-#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
-#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
-#cboxTitle{margin:0;}
-#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
-#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
-#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
-
-/* 
-    User Style:
-    Change the following styles to modify the appearance of Colorbox.  They are
-    ordered & tabbed in a way that represents the nesting of the generated HTML.
-*/
-#cboxOverlay{background:#000;}
-#colorbox{outline:0;}
-    #cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;}
-    #cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;}
-    #cboxTopRight{width:14px; height:14px; background:url(images/controls.png) no-repeat -36px 0;}
-    #cboxBottomLeft{width:14px; height:43px; background:url(images/controls.png) no-repeat 0 -32px;}
-    #cboxBottomCenter{height:43px; background:url(images/border.png) repeat-x bottom left;}
-    #cboxBottomRight{width:14px; height:43px; background:url(images/controls.png) no-repeat -36px -32px;}
-    #cboxMiddleLeft{width:14px; background:url(images/controls.png) repeat-y -175px 0;}
-    #cboxMiddleRight{width:14px; background:url(images/controls.png) repeat-y -211px 0;}
-    #cboxContent{background:#fff; overflow:visible;}
-        .cboxIframe{background:#fff;}
-        #cboxError{padding:50px; border:1px solid #ccc;}
-        #cboxLoadedContent{margin-bottom:5px;}
-        #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
-        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
-        #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
-        #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
-
-        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
-        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible;  position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
-        
-        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
-        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
-
-        #cboxPrevious{left:0px; background-position: -51px -25px;}
-        #cboxPrevious:hover{background-position:-51px 0px;}
-        #cboxNext{left:27px; background-position:-75px -25px;}
-        #cboxNext:hover{background-position:-75px 0px;}
-        #cboxClose{right:0; background-position:-100px -25px;}
-        #cboxClose:hover{background-position:-100px 0px;}
-
-        .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
-        .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
-        .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
-        .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}

BIN
EVSE/rootfs/var/www/css/colorbox-skins/5/images/border.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/5/images/controls.png


BIN
EVSE/rootfs/var/www/css/colorbox-skins/5/images/loading.gif


BIN
EVSE/rootfs/var/www/css/colorbox-skins/5/images/loading_background.png


+ 0 - 46
EVSE/rootfs/var/www/css/font-awesome/Gemfile.lock

@@ -1,46 +0,0 @@
-GEM
-  remote: https://rubygems.org/
-  specs:
-    classifier (1.3.3)
-      fast-stemmer (>= 1.0.0)
-    colorator (0.1)
-    columnize (0.3.6)
-    commander (4.1.3)
-      highline (~> 1.6.11)
-    debugger (1.6.0)
-      columnize (>= 0.3.1)
-      debugger-linecache (~> 1.2.0)
-      debugger-ruby_core_source (~> 1.2.1)
-    debugger-linecache (1.2.0)
-    debugger-ruby_core_source (1.2.2)
-    directory_watcher (1.4.1)
-    fast-stemmer (1.0.2)
-    highline (1.6.19)
-    jekyll (1.0.0)
-      classifier (~> 1.3)
-      colorator (~> 0.1)
-      commander (~> 4.1.3)
-      directory_watcher (~> 1.4.1)
-      kramdown (~> 0.14)
-      liquid (~> 2.3)
-      maruku (~> 0.5)
-      pygments.rb (~> 0.4.2)
-      safe_yaml (~> 0.7.0)
-    kramdown (0.14.2)
-    liquid (2.5.0)
-    maruku (0.6.1)
-      syntax (>= 1.0.0)
-    posix-spawn (0.3.6)
-    pygments.rb (0.4.2)
-      posix-spawn (~> 0.3.6)
-      yajl-ruby (~> 1.1.0)
-    safe_yaml (0.7.1)
-    syntax (1.0.0)
-    yajl-ruby (1.1.0)
-
-PLATFORMS
-  ruby
-
-DEPENDENCIES
-  debugger
-  jekyll (~> 1.0)

+ 0 - 1
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/CNAME

@@ -1 +0,0 @@
-fontawesome.io

+ 0 - 36
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/Makefile

@@ -1,36 +0,0 @@
-PATH := ../node_modules/.bin:$(PATH)
-
-FA_ROOT_DIRECTORY = assets/font-awesome
-FA_LESS_DIRECTORY = assets/font-awesome/less
-FA_CSS_DIRECTORY = assets/font-awesome/css
-
-FA_LESS_MODERN = ${FA_LESS_DIRECTORY}/font-awesome.less
-FA_LESS_IE7 = ${FA_LESS_DIRECTORY}/font-awesome-ie7.less
-
-FA_CSS_MODERN = ${FA_CSS_DIRECTORY}/font-awesome.css
-FA_CSS_MODERN_MIN = ${FA_CSS_DIRECTORY}/font-awesome.min.css
-FA_CSS_IE7 = ${FA_CSS_DIRECTORY}/font-awesome-ie7.css
-FA_CSS_IE7_MIN = ${FA_CSS_DIRECTORY}/font-awesome-ie7.min.css
-
-SITE_LESS_DIRECTORY = assets/less
-SITE_CSS_DIRECTORY = assets/css
-
-SITE_LESS = ${SITE_LESS_DIRECTORY}/site.less
-SITE_CSS_MIN = ${SITE_CSS_DIRECTORY}/site.css
-
-build:
-	@echo "Compiling Less files"
-	@mkdir -p ${FA_CSS_DIRECTORY}
-	lessc ${FA_LESS_MODERN} > ${FA_CSS_MODERN}
-	lessc --compress ${FA_LESS_MODERN} > ${FA_CSS_MODERN_MIN}
-	lessc ${FA_LESS_IE7} > ${FA_CSS_IE7}
-	lessc --compress ${FA_LESS_IE7} > ${FA_CSS_IE7_MIN}
-	lessc --compress ${SITE_LESS} > ${SITE_CSS_MIN}
-	cp -r ${FA_ROOT_DIRECTORY}/* ../
-	cd assets && zip -r9 font-awesome.zip font-awesome
-
-
-default: build
-
-
-.PHONY: build

+ 0 - 30
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/prettify.css

@@ -1,30 +0,0 @@
-.com { color: #93a1a1; }
-.lit { color: #195f91; }
-.pun, .opn, .clo { color: #93a1a1; }
-.fun { color: #dc322f; }
-.str, .atv { color: #D14; }
-.kwd, .linenums .tag { color: #1e347b; }
-.typ, .atn, .dec, .var { color: teal; }
-.pln { color: #48484c; }
-
-.prettyprint {
-  padding: 8px;
-  background-color: #f7f7f9;
-  border: 1px solid #e1e1e8;
-}
-.prettyprint.linenums {
-  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-}
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums {
-  margin: 0 0 0 33px; /* IE indents via margin-left */
-} 
-ol.linenums li {
-  padding-left: 12px;
-  color: #bebec5;
-  line-height: 18px;
-  text-shadow: 0 1px 0 #fff;
-}

+ 0 - 71
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/pygments.css

@@ -1,71 +0,0 @@
-.hll { background-color: #ffffcc }
-/*{ background: #f0f3f3; }*/
-.c { color: #999; } /* Comment */
-.err { color: #AA0000; background-color: #FFAAAA } /* Error */
-.k { color: #006699; } /* Keyword */
-.o { color: #555555 } /* Operator */
-.cm { color: #0099FF; font-style: italic } /* Comment.Multiline */
-.cp { color: #009999 } /* Comment.Preproc */
-.c1 { color: #999; } /* Comment.Single */
-.cs { color: #999; } /* Comment.Special */
-.gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #003300; } /* Generic.Heading */
-.gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */
-.go { color: #AAAAAA } /* Generic.Output */
-.gp { color: #000099; } /* Generic.Prompt */
-.gs { } /* Generic.Strong */
-.gu { color: #003300; } /* Generic.Subheading */
-.gt { color: #99CC66 } /* Generic.Traceback */
-.kc { color: #006699; } /* Keyword.Constant */
-.kd { color: #006699; } /* Keyword.Declaration */
-.kn { color: #006699; } /* Keyword.Namespace */
-.kp { color: #006699 } /* Keyword.Pseudo */
-.kr { color: #006699; } /* Keyword.Reserved */
-.kt { color: #007788; } /* Keyword.Type */
-.m { color: #FF6600 } /* Literal.Number */
-.s { color: #d44950 } /* Literal.String */
-.na { color: #4f9fcf } /* Name.Attribute */
-.nb { color: #336666 } /* Name.Builtin */
-.nc { color: #00AA88; } /* Name.Class */
-.no { color: #336600 } /* Name.Constant */
-.nd { color: #9999FF } /* Name.Decorator */
-.ni { color: #999999; } /* Name.Entity */
-.ne { color: #CC0000; } /* Name.Exception */
-.nf { color: #CC00FF } /* Name.Function */
-.nl { color: #9999FF } /* Name.Label */
-.nn { color: #00CCFF; } /* Name.Namespace */
-.nt { color: #2f6f9f; } /* Name.Tag */
-.nv { color: #003333 } /* Name.Variable */
-.ow { color: #000000; } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #FF6600 } /* Literal.Number.Float */
-.mh { color: #FF6600 } /* Literal.Number.Hex */
-.mi { color: #FF6600 } /* Literal.Number.Integer */
-.mo { color: #FF6600 } /* Literal.Number.Oct */
-.sb { color: #CC3300 } /* Literal.String.Backtick */
-.sc { color: #CC3300 } /* Literal.String.Char */
-.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #CC3300 } /* Literal.String.Double */
-.se { color: #CC3300; } /* Literal.String.Escape */
-.sh { color: #CC3300 } /* Literal.String.Heredoc */
-.si { color: #AA0000 } /* Literal.String.Interpol */
-.sx { color: #CC3300 } /* Literal.String.Other */
-.sr { color: #33AAAA } /* Literal.String.Regex */
-.s1 { color: #CC3300 } /* Literal.String.Single */
-.ss { color: #FFCC33 } /* Literal.String.Symbol */
-.bp { color: #336666 } /* Name.Builtin.Pseudo */
-.vc { color: #003333 } /* Name.Variable.Class */
-.vg { color: #003333 } /* Name.Variable.Global */
-.vi { color: #003333 } /* Name.Variable.Instance */
-.il { color: #FF6600 } /* Literal.Number.Integer.Long */
-
-.css .o,
-.css .o + .nt,
-.css .nt + .nt { color: #999; }
-
-pre {
-  background-color: #fafafa;
-  padding: 8px 15px;
-}

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 1153
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/css/site.css


BIN
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome.zip


+ 0 - 1203
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome-ie7.css

@@ -1,1203 +0,0 @@
-/*!
- *  Font Awesome 3.2.1
- *  the iconic font designed for Bootstrap
- *  ------------------------------------------------------------------------------
- *  The full suite of pictographic icons, examples, and documentation can be
- *  found at http://fontawesome.io.  Stay up to date on Twitter at
- *  http://twitter.com/fontawesome.
- *
- *  License
- *  ------------------------------------------------------------------------------
- *  - The Font Awesome font is licensed under SIL OFL 1.1 -
- *    http://scripts.sil.org/OFL
- *  - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -
- *    http://opensource.org/licenses/mit-license.html
- *  - Font Awesome documentation licensed under CC BY 3.0 -
- *    http://creativecommons.org/licenses/by/3.0/
- *  - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- *    "Font Awesome by Dave Gandy - http://fontawesome.io"
- *
- *  Author - Dave Gandy
- *  ------------------------------------------------------------------------------
- *  Email: dave@fontawesome.io
- *  Twitter: http://twitter.com/davegandy
- *  Work: Lead Product Designer @ Kyruus - http://kyruus.com
- */
-.icon-large {
-  font-size: 1.3333333333333333em;
-  margin-top: -4px;
-  padding-top: 3px;
-  margin-bottom: -4px;
-  padding-bottom: 3px;
-  vertical-align: middle;
-}
-.nav [class^="icon-"],
-.nav [class*=" icon-"] {
-  vertical-align: inherit;
-  margin-top: -4px;
-  padding-top: 3px;
-  margin-bottom: -4px;
-  padding-bottom: 3px;
-}
-.nav [class^="icon-"].icon-large,
-.nav [class*=" icon-"].icon-large {
-  vertical-align: -25%;
-}
-.nav-pills [class^="icon-"].icon-large,
-.nav-tabs [class^="icon-"].icon-large,
-.nav-pills [class*=" icon-"].icon-large,
-.nav-tabs [class*=" icon-"].icon-large {
-  line-height: .75em;
-  margin-top: -7px;
-  padding-top: 5px;
-  margin-bottom: -5px;
-  padding-bottom: 4px;
-}
-.btn [class^="icon-"].pull-left,
-.btn [class*=" icon-"].pull-left,
-.btn [class^="icon-"].pull-right,
-.btn [class*=" icon-"].pull-right {
-  vertical-align: inherit;
-}
-.btn [class^="icon-"].icon-large,
-.btn [class*=" icon-"].icon-large {
-  margin-top: -0.5em;
-}
-a [class^="icon-"],
-a [class*=" icon-"] {
-  cursor: pointer;
-}
-.icon-glass {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf000;');
-}
-.icon-music {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf001;');
-}
-.icon-search {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf002;');
-}
-.icon-envelope-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf003;');
-}
-.icon-heart {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf004;');
-}
-.icon-star {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf005;');
-}
-.icon-star-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf006;');
-}
-.icon-user {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf007;');
-}
-.icon-film {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf008;');
-}
-.icon-th-large {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf009;');
-}
-.icon-th {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00a;');
-}
-.icon-th-list {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00b;');
-}
-.icon-ok {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00c;');
-}
-.icon-remove {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00d;');
-}
-.icon-zoom-in {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00e;');
-}
-.icon-zoom-out {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf010;');
-}
-.icon-off {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');
-}
-.icon-power-off {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');
-}
-.icon-signal {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf012;');
-}
-.icon-cog {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');
-}
-.icon-gear {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');
-}
-.icon-trash {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf014;');
-}
-.icon-home {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf015;');
-}
-.icon-file-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf016;');
-}
-.icon-time {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf017;');
-}
-.icon-road {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf018;');
-}
-.icon-download-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf019;');
-}
-.icon-download {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01a;');
-}
-.icon-upload {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01b;');
-}
-.icon-inbox {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01c;');
-}
-.icon-play-circle {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01d;');
-}
-.icon-repeat {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');
-}
-.icon-rotate-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');
-}
-.icon-refresh {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf021;');
-}
-.icon-list-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf022;');
-}
-.icon-lock {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf023;');
-}
-.icon-flag {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf024;');
-}
-.icon-headphones {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf025;');
-}
-.icon-volume-off {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf026;');
-}
-.icon-volume-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf027;');
-}
-.icon-volume-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf028;');
-}
-.icon-qrcode {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf029;');
-}
-.icon-barcode {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02a;');
-}
-.icon-tag {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02b;');
-}
-.icon-tags {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02c;');
-}
-.icon-book {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02d;');
-}
-.icon-bookmark {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02e;');
-}
-.icon-print {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02f;');
-}
-.icon-camera {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf030;');
-}
-.icon-font {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf031;');
-}
-.icon-bold {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf032;');
-}
-.icon-italic {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf033;');
-}
-.icon-text-height {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf034;');
-}
-.icon-text-width {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf035;');
-}
-.icon-align-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf036;');
-}
-.icon-align-center {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf037;');
-}
-.icon-align-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf038;');
-}
-.icon-align-justify {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf039;');
-}
-.icon-list {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03a;');
-}
-.icon-indent-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03b;');
-}
-.icon-indent-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03c;');
-}
-.icon-facetime-video {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03d;');
-}
-.icon-picture {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03e;');
-}
-.icon-pencil {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf040;');
-}
-.icon-map-marker {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf041;');
-}
-.icon-adjust {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf042;');
-}
-.icon-tint {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf043;');
-}
-.icon-edit {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf044;');
-}
-.icon-share {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf045;');
-}
-.icon-check {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf046;');
-}
-.icon-move {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf047;');
-}
-.icon-step-backward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf048;');
-}
-.icon-fast-backward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf049;');
-}
-.icon-backward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04a;');
-}
-.icon-play {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04b;');
-}
-.icon-pause {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04c;');
-}
-.icon-stop {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04d;');
-}
-.icon-forward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04e;');
-}
-.icon-fast-forward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf050;');
-}
-.icon-step-forward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf051;');
-}
-.icon-eject {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf052;');
-}
-.icon-chevron-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf053;');
-}
-.icon-chevron-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf054;');
-}
-.icon-plus-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf055;');
-}
-.icon-minus-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf056;');
-}
-.icon-remove-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf057;');
-}
-.icon-ok-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf058;');
-}
-.icon-question-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf059;');
-}
-.icon-info-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05a;');
-}
-.icon-screenshot {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05b;');
-}
-.icon-remove-circle {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05c;');
-}
-.icon-ok-circle {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05d;');
-}
-.icon-ban-circle {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05e;');
-}
-.icon-arrow-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf060;');
-}
-.icon-arrow-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf061;');
-}
-.icon-arrow-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf062;');
-}
-.icon-arrow-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf063;');
-}
-.icon-share-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');
-}
-.icon-mail-forward {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');
-}
-.icon-resize-full {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf065;');
-}
-.icon-resize-small {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf066;');
-}
-.icon-plus {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf067;');
-}
-.icon-minus {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf068;');
-}
-.icon-asterisk {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf069;');
-}
-.icon-exclamation-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06a;');
-}
-.icon-gift {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06b;');
-}
-.icon-leaf {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06c;');
-}
-.icon-fire {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06d;');
-}
-.icon-eye-open {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06e;');
-}
-.icon-eye-close {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf070;');
-}
-.icon-warning-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf071;');
-}
-.icon-plane {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf072;');
-}
-.icon-calendar {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf073;');
-}
-.icon-random {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf074;');
-}
-.icon-comment {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf075;');
-}
-.icon-magnet {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf076;');
-}
-.icon-chevron-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf077;');
-}
-.icon-chevron-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf078;');
-}
-.icon-retweet {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf079;');
-}
-.icon-shopping-cart {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07a;');
-}
-.icon-folder-close {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07b;');
-}
-.icon-folder-open {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07c;');
-}
-.icon-resize-vertical {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07d;');
-}
-.icon-resize-horizontal {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07e;');
-}
-.icon-bar-chart {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf080;');
-}
-.icon-twitter-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf081;');
-}
-.icon-facebook-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf082;');
-}
-.icon-camera-retro {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf083;');
-}
-.icon-key {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf084;');
-}
-.icon-cogs {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');
-}
-.icon-gears {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');
-}
-.icon-comments {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf086;');
-}
-.icon-thumbs-up-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf087;');
-}
-.icon-thumbs-down-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf088;');
-}
-.icon-star-half {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf089;');
-}
-.icon-heart-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08a;');
-}
-.icon-signout {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08b;');
-}
-.icon-linkedin-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08c;');
-}
-.icon-pushpin {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08d;');
-}
-.icon-external-link {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08e;');
-}
-.icon-signin {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf090;');
-}
-.icon-trophy {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf091;');
-}
-.icon-github-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf092;');
-}
-.icon-upload-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf093;');
-}
-.icon-lemon {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf094;');
-}
-.icon-phone {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf095;');
-}
-.icon-check-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');
-}
-.icon-unchecked {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');
-}
-.icon-bookmark-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf097;');
-}
-.icon-phone-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf098;');
-}
-.icon-twitter {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;');
-}
-.icon-facebook {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;');
-}
-.icon-github {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09b;');
-}
-.icon-unlock {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09c;');
-}
-.icon-credit-card {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09d;');
-}
-.icon-rss {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09e;');
-}
-.icon-hdd {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a0;');
-}
-.icon-bullhorn {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a1;');
-}
-.icon-bell {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a2;');
-}
-.icon-certificate {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a3;');
-}
-.icon-hand-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a4;');
-}
-.icon-hand-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a5;');
-}
-.icon-hand-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a6;');
-}
-.icon-hand-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a7;');
-}
-.icon-circle-arrow-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a8;');
-}
-.icon-circle-arrow-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a9;');
-}
-.icon-circle-arrow-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0aa;');
-}
-.icon-circle-arrow-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ab;');
-}
-.icon-globe {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ac;');
-}
-.icon-wrench {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ad;');
-}
-.icon-tasks {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ae;');
-}
-.icon-filter {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b0;');
-}
-.icon-briefcase {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b1;');
-}
-.icon-fullscreen {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b2;');
-}
-.icon-group {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c0;');
-}
-.icon-link {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c1;');
-}
-.icon-cloud {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c2;');
-}
-.icon-beaker {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c3;');
-}
-.icon-cut {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c4;');
-}
-.icon-copy {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c5;');
-}
-.icon-paper-clip {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');
-}
-.icon-paperclip {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');
-}
-.icon-save {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c7;');
-}
-.icon-sign-blank {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c8;');
-}
-.icon-reorder {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;');
-}
-.icon-list-ul {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ca;');
-}
-.icon-list-ol {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cb;');
-}
-.icon-strikethrough {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cc;');
-}
-.icon-underline {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cd;');
-}
-.icon-table {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ce;');
-}
-.icon-magic {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d0;');
-}
-.icon-truck {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d1;');
-}
-.icon-pinterest {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d2;');
-}
-.icon-pinterest-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d3;');
-}
-.icon-google-plus-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d4;');
-}
-.icon-google-plus {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d5;');
-}
-.icon-money {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d6;');
-}
-.icon-caret-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d7;');
-}
-.icon-caret-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d8;');
-}
-.icon-caret-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d9;');
-}
-.icon-caret-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0da;');
-}
-.icon-columns {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0db;');
-}
-.icon-sort {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;');
-}
-.icon-sort-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dd;');
-}
-.icon-sort-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0de;');
-}
-.icon-envelope {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e0;');
-}
-.icon-linkedin {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;');
-}
-.icon-undo {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');
-}
-.icon-rotate-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');
-}
-.icon-legal {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e3;');
-}
-.icon-dashboard {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e4;');
-}
-.icon-comment-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e5;');
-}
-.icon-comments-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e6;');
-}
-.icon-bolt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e7;');
-}
-.icon-sitemap {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e8;');
-}
-.icon-umbrella {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e9;');
-}
-.icon-paste {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ea;');
-}
-.icon-lightbulb {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0eb;');
-}
-.icon-exchange {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ec;');
-}
-.icon-cloud-download {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;');
-}
-.icon-cloud-upload {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;');
-}
-.icon-user-md {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f0;');
-}
-.icon-stethoscope {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f1;');
-}
-.icon-suitcase {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f2;');
-}
-.icon-bell-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f3;');
-}
-.icon-coffee {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f4;');
-}
-.icon-food {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f5;');
-}
-.icon-file-text-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f6;');
-}
-.icon-building {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f7;');
-}
-.icon-hospital {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f8;');
-}
-.icon-ambulance {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f9;');
-}
-.icon-medkit {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fa;');
-}
-.icon-fighter-jet {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fb;');
-}
-.icon-beer {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fc;');
-}
-.icon-h-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fd;');
-}
-.icon-plus-sign-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fe;');
-}
-.icon-double-angle-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf100;');
-}
-.icon-double-angle-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf101;');
-}
-.icon-double-angle-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf102;');
-}
-.icon-double-angle-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf103;');
-}
-.icon-angle-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf104;');
-}
-.icon-angle-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf105;');
-}
-.icon-angle-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf106;');
-}
-.icon-angle-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf107;');
-}
-.icon-desktop {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf108;');
-}
-.icon-laptop {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf109;');
-}
-.icon-tablet {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10a;');
-}
-.icon-mobile-phone {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10b;');
-}
-.icon-circle-blank {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10c;');
-}
-.icon-quote-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10d;');
-}
-.icon-quote-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10e;');
-}
-.icon-spinner {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf110;');
-}
-.icon-circle {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf111;');
-}
-.icon-reply {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');
-}
-.icon-mail-reply {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');
-}
-.icon-github-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;');
-}
-.icon-folder-close-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf114;');
-}
-.icon-folder-open-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf115;');
-}
-.icon-expand-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf116;');
-}
-.icon-collapse-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf117;');
-}
-.icon-smile {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf118;');
-}
-.icon-frown {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf119;');
-}
-.icon-meh {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11a;');
-}
-.icon-gamepad {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11b;');
-}
-.icon-keyboard {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11c;');
-}
-.icon-flag-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11d;');
-}
-.icon-flag-checkered {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11e;');
-}
-.icon-terminal {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf120;');
-}
-.icon-code {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;');
-}
-.icon-reply-all {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');
-}
-.icon-mail-reply-all {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');
-}
-.icon-star-half-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');
-}
-.icon-star-half-full {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');
-}
-.icon-location-arrow {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf124;');
-}
-.icon-crop {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf125;');
-}
-.icon-code-fork {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf126;');
-}
-.icon-unlink {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf127;');
-}
-.icon-question {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf128;');
-}
-.icon-info {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf129;');
-}
-.icon-exclamation {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12a;');
-}
-.icon-superscript {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12b;');
-}
-.icon-subscript {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12c;');
-}
-.icon-eraser {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12d;');
-}
-.icon-puzzle-piece {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12e;');
-}
-.icon-microphone {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf130;');
-}
-.icon-microphone-off {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf131;');
-}
-.icon-shield {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf132;');
-}
-.icon-calendar-empty {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf133;');
-}
-.icon-fire-extinguisher {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf134;');
-}
-.icon-rocket {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf135;');
-}
-.icon-maxcdn {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf136;');
-}
-.icon-chevron-sign-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf137;');
-}
-.icon-chevron-sign-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf138;');
-}
-.icon-chevron-sign-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf139;');
-}
-.icon-chevron-sign-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13a;');
-}
-.icon-html5 {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13b;');
-}
-.icon-css3 {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13c;');
-}
-.icon-anchor {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13d;');
-}
-.icon-unlock-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13e;');
-}
-.icon-bullseye {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf140;');
-}
-.icon-ellipsis-horizontal {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf141;');
-}
-.icon-ellipsis-vertical {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf142;');
-}
-.icon-rss-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf143;');
-}
-.icon-play-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf144;');
-}
-.icon-ticket {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf145;');
-}
-.icon-minus-sign-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf146;');
-}
-.icon-check-minus {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf147;');
-}
-.icon-level-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf148;');
-}
-.icon-level-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf149;');
-}
-.icon-check-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14a;');
-}
-.icon-edit-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14b;');
-}
-.icon-external-link-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14c;');
-}
-.icon-share-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14d;');
-}
-.icon-compass {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14e;');
-}
-.icon-collapse {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf150;');
-}
-.icon-collapse-top {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf151;');
-}
-.icon-expand {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf152;');
-}
-.icon-eur {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');
-}
-.icon-euro {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');
-}
-.icon-gbp {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf154;');
-}
-.icon-usd {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');
-}
-.icon-dollar {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');
-}
-.icon-inr {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');
-}
-.icon-rupee {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');
-}
-.icon-jpy {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');
-}
-.icon-yen {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');
-}
-.icon-cny {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');
-}
-.icon-renminbi {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');
-}
-.icon-krw {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');
-}
-.icon-won {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');
-}
-.icon-btc {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');
-}
-.icon-bitcoin {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');
-}
-.icon-file {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15b;');
-}
-.icon-file-text {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15c;');
-}
-.icon-sort-by-alphabet {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15d;');
-}
-.icon-sort-by-alphabet-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15e;');
-}
-.icon-sort-by-attributes {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf160;');
-}
-.icon-sort-by-attributes-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf161;');
-}
-.icon-sort-by-order {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf162;');
-}
-.icon-sort-by-order-alt {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf163;');
-}
-.icon-thumbs-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf164;');
-}
-.icon-thumbs-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf165;');
-}
-.icon-youtube-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf166;');
-}
-.icon-youtube {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;');
-}
-.icon-xing {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf168;');
-}
-.icon-xing-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf169;');
-}
-.icon-youtube-play {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16a;');
-}
-.icon-dropbox {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16b;');
-}
-.icon-stackexchange {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16c;');
-}
-.icon-instagram {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;');
-}
-.icon-flickr {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16e;');
-}
-.icon-adn {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf170;');
-}
-.icon-bitbucket {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf171;');
-}
-.icon-bitbucket-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf172;');
-}
-.icon-tumblr {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf173;');
-}
-.icon-tumblr-sign {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf174;');
-}
-.icon-long-arrow-down {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf175;');
-}
-.icon-long-arrow-up {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf176;');
-}
-.icon-long-arrow-left {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf177;');
-}
-.icon-long-arrow-right {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf178;');
-}
-.icon-apple {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf179;');
-}
-.icon-windows {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17a;');
-}
-.icon-android {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17b;');
-}
-.icon-linux {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17c;');
-}
-.icon-dribbble {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17d;');
-}
-.icon-skype {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17e;');
-}
-.icon-foursquare {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf180;');
-}
-.icon-trello {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf181;');
-}
-.icon-female {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf182;');
-}
-.icon-male {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf183;');
-}
-.icon-gittip {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf184;');
-}
-.icon-sun {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf185;');
-}
-.icon-moon {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf186;');
-}
-.icon-archive {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf187;');
-}
-.icon-bug {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf188;');
-}
-.icon-vk {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf189;');
-}
-.icon-weibo {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18a;');
-}
-.icon-renren {
-  *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18b;');
-}

+ 0 - 384
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome-ie7.min.css

@@ -1,384 +0,0 @@
-.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle;}
-.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%;}
-.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px;}
-.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit;}
-.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em;}
-a [class^="icon-"],a [class*=" icon-"]{cursor:pointer;}
-.icon-glass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf000;');}
-.icon-music{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf001;');}
-.icon-search{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf002;');}
-.icon-envelope-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf003;');}
-.icon-heart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf004;');}
-.icon-star{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf005;');}
-.icon-star-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf006;');}
-.icon-user{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf007;');}
-.icon-film{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf008;');}
-.icon-th-large{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf009;');}
-.icon-th{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00a;');}
-.icon-th-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00b;');}
-.icon-ok{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00c;');}
-.icon-remove{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00d;');}
-.icon-zoom-in{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00e;');}
-.icon-zoom-out{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf010;');}
-.icon-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');}
-.icon-power-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');}
-.icon-signal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf012;');}
-.icon-cog{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');}
-.icon-gear{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');}
-.icon-trash{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf014;');}
-.icon-home{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf015;');}
-.icon-file-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf016;');}
-.icon-time{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf017;');}
-.icon-road{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf018;');}
-.icon-download-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf019;');}
-.icon-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01a;');}
-.icon-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01b;');}
-.icon-inbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01c;');}
-.icon-play-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01d;');}
-.icon-repeat{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');}
-.icon-rotate-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');}
-.icon-refresh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf021;');}
-.icon-list-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf022;');}
-.icon-lock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf023;');}
-.icon-flag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf024;');}
-.icon-headphones{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf025;');}
-.icon-volume-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf026;');}
-.icon-volume-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf027;');}
-.icon-volume-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf028;');}
-.icon-qrcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf029;');}
-.icon-barcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02a;');}
-.icon-tag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02b;');}
-.icon-tags{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02c;');}
-.icon-book{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02d;');}
-.icon-bookmark{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02e;');}
-.icon-print{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02f;');}
-.icon-camera{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf030;');}
-.icon-font{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf031;');}
-.icon-bold{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf032;');}
-.icon-italic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf033;');}
-.icon-text-height{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf034;');}
-.icon-text-width{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf035;');}
-.icon-align-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf036;');}
-.icon-align-center{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf037;');}
-.icon-align-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf038;');}
-.icon-align-justify{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf039;');}
-.icon-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03a;');}
-.icon-indent-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03b;');}
-.icon-indent-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03c;');}
-.icon-facetime-video{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03d;');}
-.icon-picture{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03e;');}
-.icon-pencil{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf040;');}
-.icon-map-marker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf041;');}
-.icon-adjust{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf042;');}
-.icon-tint{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf043;');}
-.icon-edit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf044;');}
-.icon-share{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf045;');}
-.icon-check{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf046;');}
-.icon-move{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf047;');}
-.icon-step-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf048;');}
-.icon-fast-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf049;');}
-.icon-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04a;');}
-.icon-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04b;');}
-.icon-pause{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04c;');}
-.icon-stop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04d;');}
-.icon-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04e;');}
-.icon-fast-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf050;');}
-.icon-step-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf051;');}
-.icon-eject{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf052;');}
-.icon-chevron-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf053;');}
-.icon-chevron-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf054;');}
-.icon-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf055;');}
-.icon-minus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf056;');}
-.icon-remove-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf057;');}
-.icon-ok-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf058;');}
-.icon-question-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf059;');}
-.icon-info-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05a;');}
-.icon-screenshot{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05b;');}
-.icon-remove-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05c;');}
-.icon-ok-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05d;');}
-.icon-ban-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05e;');}
-.icon-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf060;');}
-.icon-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf061;');}
-.icon-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf062;');}
-.icon-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf063;');}
-.icon-share-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');}
-.icon-mail-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');}
-.icon-resize-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf065;');}
-.icon-resize-small{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf066;');}
-.icon-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf067;');}
-.icon-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf068;');}
-.icon-asterisk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf069;');}
-.icon-exclamation-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06a;');}
-.icon-gift{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06b;');}
-.icon-leaf{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06c;');}
-.icon-fire{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06d;');}
-.icon-eye-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06e;');}
-.icon-eye-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf070;');}
-.icon-warning-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf071;');}
-.icon-plane{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf072;');}
-.icon-calendar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf073;');}
-.icon-random{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf074;');}
-.icon-comment{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf075;');}
-.icon-magnet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf076;');}
-.icon-chevron-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf077;');}
-.icon-chevron-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf078;');}
-.icon-retweet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf079;');}
-.icon-shopping-cart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07a;');}
-.icon-folder-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07b;');}
-.icon-folder-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07c;');}
-.icon-resize-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07d;');}
-.icon-resize-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07e;');}
-.icon-bar-chart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf080;');}
-.icon-twitter-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf081;');}
-.icon-facebook-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf082;');}
-.icon-camera-retro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf083;');}
-.icon-key{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf084;');}
-.icon-cogs{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');}
-.icon-gears{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');}
-.icon-comments{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf086;');}
-.icon-thumbs-up-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf087;');}
-.icon-thumbs-down-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf088;');}
-.icon-star-half{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf089;');}
-.icon-heart-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08a;');}
-.icon-signout{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08b;');}
-.icon-linkedin-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08c;');}
-.icon-pushpin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08d;');}
-.icon-external-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08e;');}
-.icon-signin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf090;');}
-.icon-trophy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf091;');}
-.icon-github-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf092;');}
-.icon-upload-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf093;');}
-.icon-lemon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf094;');}
-.icon-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf095;');}
-.icon-check-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');}
-.icon-unchecked{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');}
-.icon-bookmark-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf097;');}
-.icon-phone-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf098;');}
-.icon-twitter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;');}
-.icon-facebook{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;');}
-.icon-github{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09b;');}
-.icon-unlock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09c;');}
-.icon-credit-card{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09d;');}
-.icon-rss{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09e;');}
-.icon-hdd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a0;');}
-.icon-bullhorn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a1;');}
-.icon-bell{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a2;');}
-.icon-certificate{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a3;');}
-.icon-hand-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a4;');}
-.icon-hand-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a5;');}
-.icon-hand-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a6;');}
-.icon-hand-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a7;');}
-.icon-circle-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a8;');}
-.icon-circle-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a9;');}
-.icon-circle-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0aa;');}
-.icon-circle-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ab;');}
-.icon-globe{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ac;');}
-.icon-wrench{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ad;');}
-.icon-tasks{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ae;');}
-.icon-filter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b0;');}
-.icon-briefcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b1;');}
-.icon-fullscreen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b2;');}
-.icon-group{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c0;');}
-.icon-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c1;');}
-.icon-cloud{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c2;');}
-.icon-beaker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c3;');}
-.icon-cut{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c4;');}
-.icon-copy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c5;');}
-.icon-paper-clip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');}
-.icon-paperclip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');}
-.icon-save{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c7;');}
-.icon-sign-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c8;');}
-.icon-reorder{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;');}
-.icon-list-ul{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ca;');}
-.icon-list-ol{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cb;');}
-.icon-strikethrough{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cc;');}
-.icon-underline{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cd;');}
-.icon-table{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ce;');}
-.icon-magic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d0;');}
-.icon-truck{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d1;');}
-.icon-pinterest{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d2;');}
-.icon-pinterest-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d3;');}
-.icon-google-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d4;');}
-.icon-google-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d5;');}
-.icon-money{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d6;');}
-.icon-caret-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d7;');}
-.icon-caret-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d8;');}
-.icon-caret-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d9;');}
-.icon-caret-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0da;');}
-.icon-columns{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0db;');}
-.icon-sort{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;');}
-.icon-sort-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dd;');}
-.icon-sort-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0de;');}
-.icon-envelope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e0;');}
-.icon-linkedin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;');}
-.icon-undo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');}
-.icon-rotate-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');}
-.icon-legal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e3;');}
-.icon-dashboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e4;');}
-.icon-comment-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e5;');}
-.icon-comments-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e6;');}
-.icon-bolt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e7;');}
-.icon-sitemap{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e8;');}
-.icon-umbrella{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e9;');}
-.icon-paste{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ea;');}
-.icon-lightbulb{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0eb;');}
-.icon-exchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ec;');}
-.icon-cloud-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;');}
-.icon-cloud-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;');}
-.icon-user-md{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f0;');}
-.icon-stethoscope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f1;');}
-.icon-suitcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f2;');}
-.icon-bell-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f3;');}
-.icon-coffee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f4;');}
-.icon-food{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f5;');}
-.icon-file-text-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f6;');}
-.icon-building{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f7;');}
-.icon-hospital{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f8;');}
-.icon-ambulance{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f9;');}
-.icon-medkit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fa;');}
-.icon-fighter-jet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fb;');}
-.icon-beer{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fc;');}
-.icon-h-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fd;');}
-.icon-plus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fe;');}
-.icon-double-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf100;');}
-.icon-double-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf101;');}
-.icon-double-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf102;');}
-.icon-double-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf103;');}
-.icon-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf104;');}
-.icon-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf105;');}
-.icon-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf106;');}
-.icon-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf107;');}
-.icon-desktop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf108;');}
-.icon-laptop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf109;');}
-.icon-tablet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10a;');}
-.icon-mobile-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10b;');}
-.icon-circle-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10c;');}
-.icon-quote-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10d;');}
-.icon-quote-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10e;');}
-.icon-spinner{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf110;');}
-.icon-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf111;');}
-.icon-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');}
-.icon-mail-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');}
-.icon-github-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;');}
-.icon-folder-close-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf114;');}
-.icon-folder-open-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf115;');}
-.icon-expand-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf116;');}
-.icon-collapse-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf117;');}
-.icon-smile{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf118;');}
-.icon-frown{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf119;');}
-.icon-meh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11a;');}
-.icon-gamepad{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11b;');}
-.icon-keyboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11c;');}
-.icon-flag-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11d;');}
-.icon-flag-checkered{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11e;');}
-.icon-terminal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf120;');}
-.icon-code{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;');}
-.icon-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');}
-.icon-mail-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');}
-.icon-star-half-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');}
-.icon-star-half-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');}
-.icon-location-arrow{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf124;');}
-.icon-crop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf125;');}
-.icon-code-fork{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf126;');}
-.icon-unlink{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf127;');}
-.icon-question{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf128;');}
-.icon-info{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf129;');}
-.icon-exclamation{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12a;');}
-.icon-superscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12b;');}
-.icon-subscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12c;');}
-.icon-eraser{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12d;');}
-.icon-puzzle-piece{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12e;');}
-.icon-microphone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf130;');}
-.icon-microphone-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf131;');}
-.icon-shield{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf132;');}
-.icon-calendar-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf133;');}
-.icon-fire-extinguisher{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf134;');}
-.icon-rocket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf135;');}
-.icon-maxcdn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf136;');}
-.icon-chevron-sign-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf137;');}
-.icon-chevron-sign-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf138;');}
-.icon-chevron-sign-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf139;');}
-.icon-chevron-sign-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13a;');}
-.icon-html5{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13b;');}
-.icon-css3{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13c;');}
-.icon-anchor{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13d;');}
-.icon-unlock-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13e;');}
-.icon-bullseye{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf140;');}
-.icon-ellipsis-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf141;');}
-.icon-ellipsis-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf142;');}
-.icon-rss-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf143;');}
-.icon-play-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf144;');}
-.icon-ticket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf145;');}
-.icon-minus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf146;');}
-.icon-check-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf147;');}
-.icon-level-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf148;');}
-.icon-level-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf149;');}
-.icon-check-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14a;');}
-.icon-edit-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14b;');}
-.icon-external-link-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14c;');}
-.icon-share-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14d;');}
-.icon-compass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14e;');}
-.icon-collapse{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf150;');}
-.icon-collapse-top{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf151;');}
-.icon-expand{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf152;');}
-.icon-eur{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');}
-.icon-euro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');}
-.icon-gbp{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf154;');}
-.icon-usd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');}
-.icon-dollar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');}
-.icon-inr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');}
-.icon-rupee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');}
-.icon-jpy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');}
-.icon-yen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');}
-.icon-cny{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');}
-.icon-renminbi{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');}
-.icon-krw{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');}
-.icon-won{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');}
-.icon-btc{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');}
-.icon-bitcoin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');}
-.icon-file{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15b;');}
-.icon-file-text{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15c;');}
-.icon-sort-by-alphabet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15d;');}
-.icon-sort-by-alphabet-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15e;');}
-.icon-sort-by-attributes{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf160;');}
-.icon-sort-by-attributes-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf161;');}
-.icon-sort-by-order{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf162;');}
-.icon-sort-by-order-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf163;');}
-.icon-thumbs-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf164;');}
-.icon-thumbs-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf165;');}
-.icon-youtube-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf166;');}
-.icon-youtube{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;');}
-.icon-xing{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf168;');}
-.icon-xing-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf169;');}
-.icon-youtube-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16a;');}
-.icon-dropbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16b;');}
-.icon-stackexchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16c;');}
-.icon-instagram{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;');}
-.icon-flickr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16e;');}
-.icon-adn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf170;');}
-.icon-bitbucket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf171;');}
-.icon-bitbucket-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf172;');}
-.icon-tumblr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf173;');}
-.icon-tumblr-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf174;');}
-.icon-long-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf175;');}
-.icon-long-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf176;');}
-.icon-long-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf177;');}
-.icon-long-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf178;');}
-.icon-apple{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf179;');}
-.icon-windows{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17a;');}
-.icon-android{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17b;');}
-.icon-linux{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17c;');}
-.icon-dribbble{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17d;');}
-.icon-skype{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17e;');}
-.icon-foursquare{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf180;');}
-.icon-trello{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf181;');}
-.icon-female{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf182;');}
-.icon-male{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf183;');}
-.icon-gittip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf184;');}
-.icon-sun{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf185;');}
-.icon-moon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf186;');}
-.icon-archive{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf187;');}
-.icon-bug{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf188;');}
-.icon-vk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf189;');}
-.icon-weibo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18a;');}
-.icon-renren{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18b;');}

+ 0 - 1479
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome.css

@@ -1,1479 +0,0 @@
-/*!
- *  Font Awesome 3.2.1
- *  the iconic font designed for Bootstrap
- *  ------------------------------------------------------------------------------
- *  The full suite of pictographic icons, examples, and documentation can be
- *  found at http://fontawesome.io.  Stay up to date on Twitter at
- *  http://twitter.com/fontawesome.
- *
- *  License
- *  ------------------------------------------------------------------------------
- *  - The Font Awesome font is licensed under SIL OFL 1.1 -
- *    http://scripts.sil.org/OFL
- *  - Font Awesome CSS, LESS, and SASS files are licensed under MIT License -
- *    http://opensource.org/licenses/mit-license.html
- *  - Font Awesome documentation licensed under CC BY 3.0 -
- *    http://creativecommons.org/licenses/by/3.0/
- *  - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
- *    "Font Awesome by Dave Gandy - http://fontawesome.io"
- *
- *  Author - Dave Gandy
- *  ------------------------------------------------------------------------------
- *  Email: dave@fontawesome.io
- *  Twitter: http://twitter.com/davegandy
- *  Work: Lead Product Designer @ Kyruus - http://kyruus.com
- */
-/* FONT PATH
- * -------------------------- */
-@font-face {
-  font-family: 'FontAwesome';
-  src: url('../font/fontawesome-webfont.eot?v=3.2.1');
-  src: url('../font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('../font/fontawesome-webfont.woff?v=3.2.1') format('woff'), url('../font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
-  font-weight: normal;
-  font-style: normal;
-}
-/* FONT AWESOME CORE
- * -------------------------- */
-[class^="icon-"],
-[class*=" icon-"] {
-  font-family: FontAwesome;
-  font-weight: normal;
-  font-style: normal;
-  text-decoration: inherit;
-  -webkit-font-smoothing: antialiased;
-  *margin-right: .3em;
-}
-[class^="icon-"]:before,
-[class*=" icon-"]:before {
-  text-decoration: inherit;
-  display: inline-block;
-  speak: none;
-}
-/* makes the font 33% larger relative to the icon container */
-.icon-large:before {
-  vertical-align: -10%;
-  font-size: 1.3333333333333333em;
-}
-/* makes sure icons active on rollover in links */
-a [class^="icon-"],
-a [class*=" icon-"] {
-  display: inline;
-}
-/* increased font size for icon-large */
-[class^="icon-"].icon-fixed-width,
-[class*=" icon-"].icon-fixed-width {
-  display: inline-block;
-  width: 1.1428571428571428em;
-  text-align: right;
-  padding-right: 0.2857142857142857em;
-}
-[class^="icon-"].icon-fixed-width.icon-large,
-[class*=" icon-"].icon-fixed-width.icon-large {
-  width: 1.4285714285714286em;
-}
-.icons-ul {
-  margin-left: 2.142857142857143em;
-  list-style-type: none;
-}
-.icons-ul > li {
-  position: relative;
-}
-.icons-ul .icon-li {
-  position: absolute;
-  left: -2.142857142857143em;
-  width: 2.142857142857143em;
-  text-align: center;
-  line-height: inherit;
-}
-[class^="icon-"].hide,
-[class*=" icon-"].hide {
-  display: none;
-}
-.icon-muted {
-  color: #eeeeee;
-}
-.icon-light {
-  color: #ffffff;
-}
-.icon-dark {
-  color: #333333;
-}
-.icon-border {
-  border: solid 1px #eeeeee;
-  padding: .2em .25em .15em;
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-.icon-2x {
-  font-size: 2em;
-}
-.icon-2x.icon-border {
-  border-width: 2px;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.icon-3x {
-  font-size: 3em;
-}
-.icon-3x.icon-border {
-  border-width: 3px;
-  -webkit-border-radius: 5px;
-  -moz-border-radius: 5px;
-  border-radius: 5px;
-}
-.icon-4x {
-  font-size: 4em;
-}
-.icon-4x.icon-border {
-  border-width: 4px;
-  -webkit-border-radius: 6px;
-  -moz-border-radius: 6px;
-  border-radius: 6px;
-}
-.icon-5x {
-  font-size: 5em;
-}
-.icon-5x.icon-border {
-  border-width: 5px;
-  -webkit-border-radius: 7px;
-  -moz-border-radius: 7px;
-  border-radius: 7px;
-}
-.pull-right {
-  float: right;
-}
-.pull-left {
-  float: left;
-}
-[class^="icon-"].pull-left,
-[class*=" icon-"].pull-left {
-  margin-right: .3em;
-}
-[class^="icon-"].pull-right,
-[class*=" icon-"].pull-right {
-  margin-left: .3em;
-}
-/* BOOTSTRAP SPECIFIC CLASSES
- * -------------------------- */
-/* Bootstrap 2.0 sprites.less reset */
-[class^="icon-"],
-[class*=" icon-"] {
-  display: inline;
-  width: auto;
-  height: auto;
-  line-height: normal;
-  vertical-align: baseline;
-  background-image: none;
-  background-position: 0% 0%;
-  background-repeat: repeat;
-  margin-top: 0;
-}
-/* more sprites.less reset */
-.icon-white,
-.nav-pills > .active > a > [class^="icon-"],
-.nav-pills > .active > a > [class*=" icon-"],
-.nav-list > .active > a > [class^="icon-"],
-.nav-list > .active > a > [class*=" icon-"],
-.navbar-inverse .nav > .active > a > [class^="icon-"],
-.navbar-inverse .nav > .active > a > [class*=" icon-"],
-.dropdown-menu > li > a:hover > [class^="icon-"],
-.dropdown-menu > li > a:hover > [class*=" icon-"],
-.dropdown-menu > .active > a > [class^="icon-"],
-.dropdown-menu > .active > a > [class*=" icon-"],
-.dropdown-submenu:hover > a > [class^="icon-"],
-.dropdown-submenu:hover > a > [class*=" icon-"] {
-  background-image: none;
-}
-/* keeps Bootstrap styles with and without icons the same */
-.btn [class^="icon-"].icon-large,
-.nav [class^="icon-"].icon-large,
-.btn [class*=" icon-"].icon-large,
-.nav [class*=" icon-"].icon-large {
-  line-height: .9em;
-}
-.btn [class^="icon-"].icon-spin,
-.nav [class^="icon-"].icon-spin,
-.btn [class*=" icon-"].icon-spin,
-.nav [class*=" icon-"].icon-spin {
-  display: inline-block;
-}
-.nav-tabs [class^="icon-"],
-.nav-pills [class^="icon-"],
-.nav-tabs [class*=" icon-"],
-.nav-pills [class*=" icon-"],
-.nav-tabs [class^="icon-"].icon-large,
-.nav-pills [class^="icon-"].icon-large,
-.nav-tabs [class*=" icon-"].icon-large,
-.nav-pills [class*=" icon-"].icon-large {
-  line-height: .9em;
-}
-.btn [class^="icon-"].pull-left.icon-2x,
-.btn [class*=" icon-"].pull-left.icon-2x,
-.btn [class^="icon-"].pull-right.icon-2x,
-.btn [class*=" icon-"].pull-right.icon-2x {
-  margin-top: .18em;
-}
-.btn [class^="icon-"].icon-spin.icon-large,
-.btn [class*=" icon-"].icon-spin.icon-large {
-  line-height: .8em;
-}
-.btn.btn-small [class^="icon-"].pull-left.icon-2x,
-.btn.btn-small [class*=" icon-"].pull-left.icon-2x,
-.btn.btn-small [class^="icon-"].pull-right.icon-2x,
-.btn.btn-small [class*=" icon-"].pull-right.icon-2x {
-  margin-top: .25em;
-}
-.btn.btn-large [class^="icon-"],
-.btn.btn-large [class*=" icon-"] {
-  margin-top: 0;
-}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-left.icon-2x,
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
-  margin-top: .05em;
-}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-left.icon-2x {
-  margin-right: .2em;
-}
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,
-.btn.btn-large [class*=" icon-"].pull-right.icon-2x {
-  margin-left: .2em;
-}
-/* Fixes alignment in nav lists */
-.nav-list [class^="icon-"],
-.nav-list [class*=" icon-"] {
-  line-height: inherit;
-}
-/* EXTRAS
- * -------------------------- */
-/* Stacked and layered icon */
-.icon-stack {
-  position: relative;
-  display: inline-block;
-  width: 2em;
-  height: 2em;
-  line-height: 2em;
-  vertical-align: -35%;
-}
-.icon-stack [class^="icon-"],
-.icon-stack [class*=" icon-"] {
-  display: block;
-  text-align: center;
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  font-size: 1em;
-  line-height: inherit;
-  *line-height: 2em;
-}
-.icon-stack .icon-stack-base {
-  font-size: 2em;
-  *line-height: 1em;
-}
-/* Animated rotating icon */
-.icon-spin {
-  display: inline-block;
-  -moz-animation: spin 2s infinite linear;
-  -o-animation: spin 2s infinite linear;
-  -webkit-animation: spin 2s infinite linear;
-  animation: spin 2s infinite linear;
-}
-/* Prevent stack and spinners from being taken inline when inside a link */
-a .icon-stack,
-a .icon-spin {
-  display: inline-block;
-  text-decoration: none;
-}
-@-moz-keyframes spin {
-  0% {
-    -moz-transform: rotate(0deg);
-  }
-  100% {
-    -moz-transform: rotate(359deg);
-  }
-}
-@-webkit-keyframes spin {
-  0% {
-    -webkit-transform: rotate(0deg);
-  }
-  100% {
-    -webkit-transform: rotate(359deg);
-  }
-}
-@-o-keyframes spin {
-  0% {
-    -o-transform: rotate(0deg);
-  }
-  100% {
-    -o-transform: rotate(359deg);
-  }
-}
-@-ms-keyframes spin {
-  0% {
-    -ms-transform: rotate(0deg);
-  }
-  100% {
-    -ms-transform: rotate(359deg);
-  }
-}
-@keyframes spin {
-  0% {
-    transform: rotate(0deg);
-  }
-  100% {
-    transform: rotate(359deg);
-  }
-}
-/* Icon rotations and mirroring */
-.icon-rotate-90:before {
-  -webkit-transform: rotate(90deg);
-  -moz-transform: rotate(90deg);
-  -ms-transform: rotate(90deg);
-  -o-transform: rotate(90deg);
-  transform: rotate(90deg);
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-}
-.icon-rotate-180:before {
-  -webkit-transform: rotate(180deg);
-  -moz-transform: rotate(180deg);
-  -ms-transform: rotate(180deg);
-  -o-transform: rotate(180deg);
-  transform: rotate(180deg);
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-}
-.icon-rotate-270:before {
-  -webkit-transform: rotate(270deg);
-  -moz-transform: rotate(270deg);
-  -ms-transform: rotate(270deg);
-  -o-transform: rotate(270deg);
-  transform: rotate(270deg);
-  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-}
-.icon-flip-horizontal:before {
-  -webkit-transform: scale(-1, 1);
-  -moz-transform: scale(-1, 1);
-  -ms-transform: scale(-1, 1);
-  -o-transform: scale(-1, 1);
-  transform: scale(-1, 1);
-}
-.icon-flip-vertical:before {
-  -webkit-transform: scale(1, -1);
-  -moz-transform: scale(1, -1);
-  -ms-transform: scale(1, -1);
-  -o-transform: scale(1, -1);
-  transform: scale(1, -1);
-}
-/* ensure rotation occurs inside anchor tags */
-a .icon-rotate-90:before,
-a .icon-rotate-180:before,
-a .icon-rotate-270:before,
-a .icon-flip-horizontal:before,
-a .icon-flip-vertical:before {
-  display: inline-block;
-}
-/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
-   readers do not read off random characters that represent icons */
-.icon-glass:before {
-  content: "\f000";
-}
-.icon-music:before {
-  content: "\f001";
-}
-.icon-search:before {
-  content: "\f002";
-}
-.icon-envelope-alt:before {
-  content: "\f003";
-}
-.icon-heart:before {
-  content: "\f004";
-}
-.icon-star:before {
-  content: "\f005";
-}
-.icon-star-empty:before {
-  content: "\f006";
-}
-.icon-user:before {
-  content: "\f007";
-}
-.icon-film:before {
-  content: "\f008";
-}
-.icon-th-large:before {
-  content: "\f009";
-}
-.icon-th:before {
-  content: "\f00a";
-}
-.icon-th-list:before {
-  content: "\f00b";
-}
-.icon-ok:before {
-  content: "\f00c";
-}
-.icon-remove:before {
-  content: "\f00d";
-}
-.icon-zoom-in:before {
-  content: "\f00e";
-}
-.icon-zoom-out:before {
-  content: "\f010";
-}
-.icon-power-off:before,
-.icon-off:before {
-  content: "\f011";
-}
-.icon-signal:before {
-  content: "\f012";
-}
-.icon-gear:before,
-.icon-cog:before {
-  content: "\f013";
-}
-.icon-trash:before {
-  content: "\f014";
-}
-.icon-home:before {
-  content: "\f015";
-}
-.icon-file-alt:before {
-  content: "\f016";
-}
-.icon-time:before {
-  content: "\f017";
-}
-.icon-road:before {
-  content: "\f018";
-}
-.icon-download-alt:before {
-  content: "\f019";
-}
-.icon-download:before {
-  content: "\f01a";
-}
-.icon-upload:before {
-  content: "\f01b";
-}
-.icon-inbox:before {
-  content: "\f01c";
-}
-.icon-play-circle:before {
-  content: "\f01d";
-}
-.icon-rotate-right:before,
-.icon-repeat:before {
-  content: "\f01e";
-}
-.icon-refresh:before {
-  content: "\f021";
-}
-.icon-list-alt:before {
-  content: "\f022";
-}
-.icon-lock:before {
-  content: "\f023";
-}
-.icon-flag:before {
-  content: "\f024";
-}
-.icon-headphones:before {
-  content: "\f025";
-}
-.icon-volume-off:before {
-  content: "\f026";
-}
-.icon-volume-down:before {
-  content: "\f027";
-}
-.icon-volume-up:before {
-  content: "\f028";
-}
-.icon-qrcode:before {
-  content: "\f029";
-}
-.icon-barcode:before {
-  content: "\f02a";
-}
-.icon-tag:before {
-  content: "\f02b";
-}
-.icon-tags:before {
-  content: "\f02c";
-}
-.icon-book:before {
-  content: "\f02d";
-}
-.icon-bookmark:before {
-  content: "\f02e";
-}
-.icon-print:before {
-  content: "\f02f";
-}
-.icon-camera:before {
-  content: "\f030";
-}
-.icon-font:before {
-  content: "\f031";
-}
-.icon-bold:before {
-  content: "\f032";
-}
-.icon-italic:before {
-  content: "\f033";
-}
-.icon-text-height:before {
-  content: "\f034";
-}
-.icon-text-width:before {
-  content: "\f035";
-}
-.icon-align-left:before {
-  content: "\f036";
-}
-.icon-align-center:before {
-  content: "\f037";
-}
-.icon-align-right:before {
-  content: "\f038";
-}
-.icon-align-justify:before {
-  content: "\f039";
-}
-.icon-list:before {
-  content: "\f03a";
-}
-.icon-indent-left:before {
-  content: "\f03b";
-}
-.icon-indent-right:before {
-  content: "\f03c";
-}
-.icon-facetime-video:before {
-  content: "\f03d";
-}
-.icon-picture:before {
-  content: "\f03e";
-}
-.icon-pencil:before {
-  content: "\f040";
-}
-.icon-map-marker:before {
-  content: "\f041";
-}
-.icon-adjust:before {
-  content: "\f042";
-}
-.icon-tint:before {
-  content: "\f043";
-}
-.icon-edit:before {
-  content: "\f044";
-}
-.icon-share:before {
-  content: "\f045";
-}
-.icon-check:before {
-  content: "\f046";
-}
-.icon-move:before {
-  content: "\f047";
-}
-.icon-step-backward:before {
-  content: "\f048";
-}
-.icon-fast-backward:before {
-  content: "\f049";
-}
-.icon-backward:before {
-  content: "\f04a";
-}
-.icon-play:before {
-  content: "\f04b";
-}
-.icon-pause:before {
-  content: "\f04c";
-}
-.icon-stop:before {
-  content: "\f04d";
-}
-.icon-forward:before {
-  content: "\f04e";
-}
-.icon-fast-forward:before {
-  content: "\f050";
-}
-.icon-step-forward:before {
-  content: "\f051";
-}
-.icon-eject:before {
-  content: "\f052";
-}
-.icon-chevron-left:before {
-  content: "\f053";
-}
-.icon-chevron-right:before {
-  content: "\f054";
-}
-.icon-plus-sign:before {
-  content: "\f055";
-}
-.icon-minus-sign:before {
-  content: "\f056";
-}
-.icon-remove-sign:before {
-  content: "\f057";
-}
-.icon-ok-sign:before {
-  content: "\f058";
-}
-.icon-question-sign:before {
-  content: "\f059";
-}
-.icon-info-sign:before {
-  content: "\f05a";
-}
-.icon-screenshot:before {
-  content: "\f05b";
-}
-.icon-remove-circle:before {
-  content: "\f05c";
-}
-.icon-ok-circle:before {
-  content: "\f05d";
-}
-.icon-ban-circle:before {
-  content: "\f05e";
-}
-.icon-arrow-left:before {
-  content: "\f060";
-}
-.icon-arrow-right:before {
-  content: "\f061";
-}
-.icon-arrow-up:before {
-  content: "\f062";
-}
-.icon-arrow-down:before {
-  content: "\f063";
-}
-.icon-mail-forward:before,
-.icon-share-alt:before {
-  content: "\f064";
-}
-.icon-resize-full:before {
-  content: "\f065";
-}
-.icon-resize-small:before {
-  content: "\f066";
-}
-.icon-plus:before {
-  content: "\f067";
-}
-.icon-minus:before {
-  content: "\f068";
-}
-.icon-asterisk:before {
-  content: "\f069";
-}
-.icon-exclamation-sign:before {
-  content: "\f06a";
-}
-.icon-gift:before {
-  content: "\f06b";
-}
-.icon-leaf:before {
-  content: "\f06c";
-}
-.icon-fire:before {
-  content: "\f06d";
-}
-.icon-eye-open:before {
-  content: "\f06e";
-}
-.icon-eye-close:before {
-  content: "\f070";
-}
-.icon-warning-sign:before {
-  content: "\f071";
-}
-.icon-plane:before {
-  content: "\f072";
-}
-.icon-calendar:before {
-  content: "\f073";
-}
-.icon-random:before {
-  content: "\f074";
-}
-.icon-comment:before {
-  content: "\f075";
-}
-.icon-magnet:before {
-  content: "\f076";
-}
-.icon-chevron-up:before {
-  content: "\f077";
-}
-.icon-chevron-down:before {
-  content: "\f078";
-}
-.icon-retweet:before {
-  content: "\f079";
-}
-.icon-shopping-cart:before {
-  content: "\f07a";
-}
-.icon-folder-close:before {
-  content: "\f07b";
-}
-.icon-folder-open:before {
-  content: "\f07c";
-}
-.icon-resize-vertical:before {
-  content: "\f07d";
-}
-.icon-resize-horizontal:before {
-  content: "\f07e";
-}
-.icon-bar-chart:before {
-  content: "\f080";
-}
-.icon-twitter-sign:before {
-  content: "\f081";
-}
-.icon-facebook-sign:before {
-  content: "\f082";
-}
-.icon-camera-retro:before {
-  content: "\f083";
-}
-.icon-key:before {
-  content: "\f084";
-}
-.icon-gears:before,
-.icon-cogs:before {
-  content: "\f085";
-}
-.icon-comments:before {
-  content: "\f086";
-}
-.icon-thumbs-up-alt:before {
-  content: "\f087";
-}
-.icon-thumbs-down-alt:before {
-  content: "\f088";
-}
-.icon-star-half:before {
-  content: "\f089";
-}
-.icon-heart-empty:before {
-  content: "\f08a";
-}
-.icon-signout:before {
-  content: "\f08b";
-}
-.icon-linkedin-sign:before {
-  content: "\f08c";
-}
-.icon-pushpin:before {
-  content: "\f08d";
-}
-.icon-external-link:before {
-  content: "\f08e";
-}
-.icon-signin:before {
-  content: "\f090";
-}
-.icon-trophy:before {
-  content: "\f091";
-}
-.icon-github-sign:before {
-  content: "\f092";
-}
-.icon-upload-alt:before {
-  content: "\f093";
-}
-.icon-lemon:before {
-  content: "\f094";
-}
-.icon-phone:before {
-  content: "\f095";
-}
-.icon-unchecked:before,
-.icon-check-empty:before {
-  content: "\f096";
-}
-.icon-bookmark-empty:before {
-  content: "\f097";
-}
-.icon-phone-sign:before {
-  content: "\f098";
-}
-.icon-twitter:before {
-  content: "\f099";
-}
-.icon-facebook:before {
-  content: "\f09a";
-}
-.icon-github:before {
-  content: "\f09b";
-}
-.icon-unlock:before {
-  content: "\f09c";
-}
-.icon-credit-card:before {
-  content: "\f09d";
-}
-.icon-rss:before {
-  content: "\f09e";
-}
-.icon-hdd:before {
-  content: "\f0a0";
-}
-.icon-bullhorn:before {
-  content: "\f0a1";
-}
-.icon-bell:before {
-  content: "\f0a2";
-}
-.icon-certificate:before {
-  content: "\f0a3";
-}
-.icon-hand-right:before {
-  content: "\f0a4";
-}
-.icon-hand-left:before {
-  content: "\f0a5";
-}
-.icon-hand-up:before {
-  content: "\f0a6";
-}
-.icon-hand-down:before {
-  content: "\f0a7";
-}
-.icon-circle-arrow-left:before {
-  content: "\f0a8";
-}
-.icon-circle-arrow-right:before {
-  content: "\f0a9";
-}
-.icon-circle-arrow-up:before {
-  content: "\f0aa";
-}
-.icon-circle-arrow-down:before {
-  content: "\f0ab";
-}
-.icon-globe:before {
-  content: "\f0ac";
-}
-.icon-wrench:before {
-  content: "\f0ad";
-}
-.icon-tasks:before {
-  content: "\f0ae";
-}
-.icon-filter:before {
-  content: "\f0b0";
-}
-.icon-briefcase:before {
-  content: "\f0b1";
-}
-.icon-fullscreen:before {
-  content: "\f0b2";
-}
-.icon-group:before {
-  content: "\f0c0";
-}
-.icon-link:before {
-  content: "\f0c1";
-}
-.icon-cloud:before {
-  content: "\f0c2";
-}
-.icon-beaker:before {
-  content: "\f0c3";
-}
-.icon-cut:before {
-  content: "\f0c4";
-}
-.icon-copy:before {
-  content: "\f0c5";
-}
-.icon-paperclip:before,
-.icon-paper-clip:before {
-  content: "\f0c6";
-}
-.icon-save:before {
-  content: "\f0c7";
-}
-.icon-sign-blank:before {
-  content: "\f0c8";
-}
-.icon-reorder:before {
-  content: "\f0c9";
-}
-.icon-list-ul:before {
-  content: "\f0ca";
-}
-.icon-list-ol:before {
-  content: "\f0cb";
-}
-.icon-strikethrough:before {
-  content: "\f0cc";
-}
-.icon-underline:before {
-  content: "\f0cd";
-}
-.icon-table:before {
-  content: "\f0ce";
-}
-.icon-magic:before {
-  content: "\f0d0";
-}
-.icon-truck:before {
-  content: "\f0d1";
-}
-.icon-pinterest:before {
-  content: "\f0d2";
-}
-.icon-pinterest-sign:before {
-  content: "\f0d3";
-}
-.icon-google-plus-sign:before {
-  content: "\f0d4";
-}
-.icon-google-plus:before {
-  content: "\f0d5";
-}
-.icon-money:before {
-  content: "\f0d6";
-}
-.icon-caret-down:before {
-  content: "\f0d7";
-}
-.icon-caret-up:before {
-  content: "\f0d8";
-}
-.icon-caret-left:before {
-  content: "\f0d9";
-}
-.icon-caret-right:before {
-  content: "\f0da";
-}
-.icon-columns:before {
-  content: "\f0db";
-}
-.icon-sort:before {
-  content: "\f0dc";
-}
-.icon-sort-down:before {
-  content: "\f0dd";
-}
-.icon-sort-up:before {
-  content: "\f0de";
-}
-.icon-envelope:before {
-  content: "\f0e0";
-}
-.icon-linkedin:before {
-  content: "\f0e1";
-}
-.icon-rotate-left:before,
-.icon-undo:before {
-  content: "\f0e2";
-}
-.icon-legal:before {
-  content: "\f0e3";
-}
-.icon-dashboard:before {
-  content: "\f0e4";
-}
-.icon-comment-alt:before {
-  content: "\f0e5";
-}
-.icon-comments-alt:before {
-  content: "\f0e6";
-}
-.icon-bolt:before {
-  content: "\f0e7";
-}
-.icon-sitemap:before {
-  content: "\f0e8";
-}
-.icon-umbrella:before {
-  content: "\f0e9";
-}
-.icon-paste:before {
-  content: "\f0ea";
-}
-.icon-lightbulb:before {
-  content: "\f0eb";
-}
-.icon-exchange:before {
-  content: "\f0ec";
-}
-.icon-cloud-download:before {
-  content: "\f0ed";
-}
-.icon-cloud-upload:before {
-  content: "\f0ee";
-}
-.icon-user-md:before {
-  content: "\f0f0";
-}
-.icon-stethoscope:before {
-  content: "\f0f1";
-}
-.icon-suitcase:before {
-  content: "\f0f2";
-}
-.icon-bell-alt:before {
-  content: "\f0f3";
-}
-.icon-coffee:before {
-  content: "\f0f4";
-}
-.icon-food:before {
-  content: "\f0f5";
-}
-.icon-file-text-alt:before {
-  content: "\f0f6";
-}
-.icon-building:before {
-  content: "\f0f7";
-}
-.icon-hospital:before {
-  content: "\f0f8";
-}
-.icon-ambulance:before {
-  content: "\f0f9";
-}
-.icon-medkit:before {
-  content: "\f0fa";
-}
-.icon-fighter-jet:before {
-  content: "\f0fb";
-}
-.icon-beer:before {
-  content: "\f0fc";
-}
-.icon-h-sign:before {
-  content: "\f0fd";
-}
-.icon-plus-sign-alt:before {
-  content: "\f0fe";
-}
-.icon-double-angle-left:before {
-  content: "\f100";
-}
-.icon-double-angle-right:before {
-  content: "\f101";
-}
-.icon-double-angle-up:before {
-  content: "\f102";
-}
-.icon-double-angle-down:before {
-  content: "\f103";
-}
-.icon-angle-left:before {
-  content: "\f104";
-}
-.icon-angle-right:before {
-  content: "\f105";
-}
-.icon-angle-up:before {
-  content: "\f106";
-}
-.icon-angle-down:before {
-  content: "\f107";
-}
-.icon-desktop:before {
-  content: "\f108";
-}
-.icon-laptop:before {
-  content: "\f109";
-}
-.icon-tablet:before {
-  content: "\f10a";
-}
-.icon-mobile-phone:before {
-  content: "\f10b";
-}
-.icon-circle-blank:before {
-  content: "\f10c";
-}
-.icon-quote-left:before {
-  content: "\f10d";
-}
-.icon-quote-right:before {
-  content: "\f10e";
-}
-.icon-spinner:before {
-  content: "\f110";
-}
-.icon-circle:before {
-  content: "\f111";
-}
-.icon-mail-reply:before,
-.icon-reply:before {
-  content: "\f112";
-}
-.icon-github-alt:before {
-  content: "\f113";
-}
-.icon-folder-close-alt:before {
-  content: "\f114";
-}
-.icon-folder-open-alt:before {
-  content: "\f115";
-}
-.icon-expand-alt:before {
-  content: "\f116";
-}
-.icon-collapse-alt:before {
-  content: "\f117";
-}
-.icon-smile:before {
-  content: "\f118";
-}
-.icon-frown:before {
-  content: "\f119";
-}
-.icon-meh:before {
-  content: "\f11a";
-}
-.icon-gamepad:before {
-  content: "\f11b";
-}
-.icon-keyboard:before {
-  content: "\f11c";
-}
-.icon-flag-alt:before {
-  content: "\f11d";
-}
-.icon-flag-checkered:before {
-  content: "\f11e";
-}
-.icon-terminal:before {
-  content: "\f120";
-}
-.icon-code:before {
-  content: "\f121";
-}
-.icon-reply-all:before {
-  content: "\f122";
-}
-.icon-mail-reply-all:before {
-  content: "\f122";
-}
-.icon-star-half-full:before,
-.icon-star-half-empty:before {
-  content: "\f123";
-}
-.icon-location-arrow:before {
-  content: "\f124";
-}
-.icon-crop:before {
-  content: "\f125";
-}
-.icon-code-fork:before {
-  content: "\f126";
-}
-.icon-unlink:before {
-  content: "\f127";
-}
-.icon-question:before {
-  content: "\f128";
-}
-.icon-info:before {
-  content: "\f129";
-}
-.icon-exclamation:before {
-  content: "\f12a";
-}
-.icon-superscript:before {
-  content: "\f12b";
-}
-.icon-subscript:before {
-  content: "\f12c";
-}
-.icon-eraser:before {
-  content: "\f12d";
-}
-.icon-puzzle-piece:before {
-  content: "\f12e";
-}
-.icon-microphone:before {
-  content: "\f130";
-}
-.icon-microphone-off:before {
-  content: "\f131";
-}
-.icon-shield:before {
-  content: "\f132";
-}
-.icon-calendar-empty:before {
-  content: "\f133";
-}
-.icon-fire-extinguisher:before {
-  content: "\f134";
-}
-.icon-rocket:before {
-  content: "\f135";
-}
-.icon-maxcdn:before {
-  content: "\f136";
-}
-.icon-chevron-sign-left:before {
-  content: "\f137";
-}
-.icon-chevron-sign-right:before {
-  content: "\f138";
-}
-.icon-chevron-sign-up:before {
-  content: "\f139";
-}
-.icon-chevron-sign-down:before {
-  content: "\f13a";
-}
-.icon-html5:before {
-  content: "\f13b";
-}
-.icon-css3:before {
-  content: "\f13c";
-}
-.icon-anchor:before {
-  content: "\f13d";
-}
-.icon-unlock-alt:before {
-  content: "\f13e";
-}
-.icon-bullseye:before {
-  content: "\f140";
-}
-.icon-ellipsis-horizontal:before {
-  content: "\f141";
-}
-.icon-ellipsis-vertical:before {
-  content: "\f142";
-}
-.icon-rss-sign:before {
-  content: "\f143";
-}
-.icon-play-sign:before {
-  content: "\f144";
-}
-.icon-ticket:before {
-  content: "\f145";
-}
-.icon-minus-sign-alt:before {
-  content: "\f146";
-}
-.icon-check-minus:before {
-  content: "\f147";
-}
-.icon-level-up:before {
-  content: "\f148";
-}
-.icon-level-down:before {
-  content: "\f149";
-}
-.icon-check-sign:before {
-  content: "\f14a";
-}
-.icon-edit-sign:before {
-  content: "\f14b";
-}
-.icon-external-link-sign:before {
-  content: "\f14c";
-}
-.icon-share-sign:before {
-  content: "\f14d";
-}
-.icon-compass:before {
-  content: "\f14e";
-}
-.icon-collapse:before {
-  content: "\f150";
-}
-.icon-collapse-top:before {
-  content: "\f151";
-}
-.icon-expand:before {
-  content: "\f152";
-}
-.icon-euro:before,
-.icon-eur:before {
-  content: "\f153";
-}
-.icon-gbp:before {
-  content: "\f154";
-}
-.icon-dollar:before,
-.icon-usd:before {
-  content: "\f155";
-}
-.icon-rupee:before,
-.icon-inr:before {
-  content: "\f156";
-}
-.icon-yen:before,
-.icon-jpy:before {
-  content: "\f157";
-}
-.icon-renminbi:before,
-.icon-cny:before {
-  content: "\f158";
-}
-.icon-won:before,
-.icon-krw:before {
-  content: "\f159";
-}
-.icon-bitcoin:before,
-.icon-btc:before {
-  content: "\f15a";
-}
-.icon-file:before {
-  content: "\f15b";
-}
-.icon-file-text:before {
-  content: "\f15c";
-}
-.icon-sort-by-alphabet:before {
-  content: "\f15d";
-}
-.icon-sort-by-alphabet-alt:before {
-  content: "\f15e";
-}
-.icon-sort-by-attributes:before {
-  content: "\f160";
-}
-.icon-sort-by-attributes-alt:before {
-  content: "\f161";
-}
-.icon-sort-by-order:before {
-  content: "\f162";
-}
-.icon-sort-by-order-alt:before {
-  content: "\f163";
-}
-.icon-thumbs-up:before {
-  content: "\f164";
-}
-.icon-thumbs-down:before {
-  content: "\f165";
-}
-.icon-youtube-sign:before {
-  content: "\f166";
-}
-.icon-youtube:before {
-  content: "\f167";
-}
-.icon-xing:before {
-  content: "\f168";
-}
-.icon-xing-sign:before {
-  content: "\f169";
-}
-.icon-youtube-play:before {
-  content: "\f16a";
-}
-.icon-dropbox:before {
-  content: "\f16b";
-}
-.icon-stackexchange:before {
-  content: "\f16c";
-}
-.icon-instagram:before {
-  content: "\f16d";
-}
-.icon-flickr:before {
-  content: "\f16e";
-}
-.icon-adn:before {
-  content: "\f170";
-}
-.icon-bitbucket:before {
-  content: "\f171";
-}
-.icon-bitbucket-sign:before {
-  content: "\f172";
-}
-.icon-tumblr:before {
-  content: "\f173";
-}
-.icon-tumblr-sign:before {
-  content: "\f174";
-}
-.icon-long-arrow-down:before {
-  content: "\f175";
-}
-.icon-long-arrow-up:before {
-  content: "\f176";
-}
-.icon-long-arrow-left:before {
-  content: "\f177";
-}
-.icon-long-arrow-right:before {
-  content: "\f178";
-}
-.icon-apple:before {
-  content: "\f179";
-}
-.icon-windows:before {
-  content: "\f17a";
-}
-.icon-android:before {
-  content: "\f17b";
-}
-.icon-linux:before {
-  content: "\f17c";
-}
-.icon-dribbble:before {
-  content: "\f17d";
-}
-.icon-skype:before {
-  content: "\f17e";
-}
-.icon-foursquare:before {
-  content: "\f180";
-}
-.icon-trello:before {
-  content: "\f181";
-}
-.icon-female:before {
-  content: "\f182";
-}
-.icon-male:before {
-  content: "\f183";
-}
-.icon-gittip:before {
-  content: "\f184";
-}
-.icon-sun:before {
-  content: "\f185";
-}
-.icon-moon:before {
-  content: "\f186";
-}
-.icon-archive:before {
-  content: "\f187";
-}
-.icon-bug:before {
-  content: "\f188";
-}
-.icon-vk:before {
-  content: "\f189";
-}
-.icon-weibo:before {
-  content: "\f18a";
-}
-.icon-renren:before {
-  content: "\f18b";
-}

+ 0 - 403
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/css/font-awesome.min.css

@@ -1,403 +0,0 @@
-@font-face{font-family:'FontAwesome';src:url('../font/fontawesome-webfont.eot?v=3.2.1');src:url('../font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'),url('../font/fontawesome-webfont.woff?v=3.2.1') format('woff'),url('../font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'),url('../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');font-weight:normal;font-style:normal;}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;}
-[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none;}
-.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em;}
-a [class^="icon-"],a [class*=" icon-"]{display:inline;}
-[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em;}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em;}
-.icons-ul{margin-left:2.142857142857143em;list-style-type:none;}.icons-ul>li{position:relative;}
-.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit;}
-[class^="icon-"].hide,[class*=" icon-"].hide{display:none;}
-.icon-muted{color:#eeeeee;}
-.icon-light{color:#ffffff;}
-.icon-dark{color:#333333;}
-.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-.icon-2x{font-size:2em;}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.icon-3x{font-size:3em;}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
-.icon-4x{font-size:4em;}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.icon-5x{font-size:5em;}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em;}
-[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em;}
-[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0;}
-.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none;}
-.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em;}
-.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block;}
-.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em;}
-.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em;}
-.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em;}
-.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em;}
-.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;}
-.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;}
-.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;}
-.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;}
-.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;}
-.icon-stack .icon-stack-base{font-size:2em;*line-height:1em;}
-.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;}
-a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none;}
-@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);} 100%{-moz-transform:rotate(359deg);}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);} 100%{-webkit-transform:rotate(359deg);}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);} 100%{-o-transform:rotate(359deg);}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);} 100%{-ms-transform:rotate(359deg);}}@keyframes spin{0%{transform:rotate(0deg);} 100%{transform:rotate(359deg);}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);}
-.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);}
-.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);}
-.icon-flip-horizontal:before{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);}
-.icon-flip-vertical:before{-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1);}
-a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block;}
-.icon-glass:before{content:"\f000";}
-.icon-music:before{content:"\f001";}
-.icon-search:before{content:"\f002";}
-.icon-envelope-alt:before{content:"\f003";}
-.icon-heart:before{content:"\f004";}
-.icon-star:before{content:"\f005";}
-.icon-star-empty:before{content:"\f006";}
-.icon-user:before{content:"\f007";}
-.icon-film:before{content:"\f008";}
-.icon-th-large:before{content:"\f009";}
-.icon-th:before{content:"\f00a";}
-.icon-th-list:before{content:"\f00b";}
-.icon-ok:before{content:"\f00c";}
-.icon-remove:before{content:"\f00d";}
-.icon-zoom-in:before{content:"\f00e";}
-.icon-zoom-out:before{content:"\f010";}
-.icon-power-off:before,.icon-off:before{content:"\f011";}
-.icon-signal:before{content:"\f012";}
-.icon-gear:before,.icon-cog:before{content:"\f013";}
-.icon-trash:before{content:"\f014";}
-.icon-home:before{content:"\f015";}
-.icon-file-alt:before{content:"\f016";}
-.icon-time:before{content:"\f017";}
-.icon-road:before{content:"\f018";}
-.icon-download-alt:before{content:"\f019";}
-.icon-download:before{content:"\f01a";}
-.icon-upload:before{content:"\f01b";}
-.icon-inbox:before{content:"\f01c";}
-.icon-play-circle:before{content:"\f01d";}
-.icon-rotate-right:before,.icon-repeat:before{content:"\f01e";}
-.icon-refresh:before{content:"\f021";}
-.icon-list-alt:before{content:"\f022";}
-.icon-lock:before{content:"\f023";}
-.icon-flag:before{content:"\f024";}
-.icon-headphones:before{content:"\f025";}
-.icon-volume-off:before{content:"\f026";}
-.icon-volume-down:before{content:"\f027";}
-.icon-volume-up:before{content:"\f028";}
-.icon-qrcode:before{content:"\f029";}
-.icon-barcode:before{content:"\f02a";}
-.icon-tag:before{content:"\f02b";}
-.icon-tags:before{content:"\f02c";}
-.icon-book:before{content:"\f02d";}
-.icon-bookmark:before{content:"\f02e";}
-.icon-print:before{content:"\f02f";}
-.icon-camera:before{content:"\f030";}
-.icon-font:before{content:"\f031";}
-.icon-bold:before{content:"\f032";}
-.icon-italic:before{content:"\f033";}
-.icon-text-height:before{content:"\f034";}
-.icon-text-width:before{content:"\f035";}
-.icon-align-left:before{content:"\f036";}
-.icon-align-center:before{content:"\f037";}
-.icon-align-right:before{content:"\f038";}
-.icon-align-justify:before{content:"\f039";}
-.icon-list:before{content:"\f03a";}
-.icon-indent-left:before{content:"\f03b";}
-.icon-indent-right:before{content:"\f03c";}
-.icon-facetime-video:before{content:"\f03d";}
-.icon-picture:before{content:"\f03e";}
-.icon-pencil:before{content:"\f040";}
-.icon-map-marker:before{content:"\f041";}
-.icon-adjust:before{content:"\f042";}
-.icon-tint:before{content:"\f043";}
-.icon-edit:before{content:"\f044";}
-.icon-share:before{content:"\f045";}
-.icon-check:before{content:"\f046";}
-.icon-move:before{content:"\f047";}
-.icon-step-backward:before{content:"\f048";}
-.icon-fast-backward:before{content:"\f049";}
-.icon-backward:before{content:"\f04a";}
-.icon-play:before{content:"\f04b";}
-.icon-pause:before{content:"\f04c";}
-.icon-stop:before{content:"\f04d";}
-.icon-forward:before{content:"\f04e";}
-.icon-fast-forward:before{content:"\f050";}
-.icon-step-forward:before{content:"\f051";}
-.icon-eject:before{content:"\f052";}
-.icon-chevron-left:before{content:"\f053";}
-.icon-chevron-right:before{content:"\f054";}
-.icon-plus-sign:before{content:"\f055";}
-.icon-minus-sign:before{content:"\f056";}
-.icon-remove-sign:before{content:"\f057";}
-.icon-ok-sign:before{content:"\f058";}
-.icon-question-sign:before{content:"\f059";}
-.icon-info-sign:before{content:"\f05a";}
-.icon-screenshot:before{content:"\f05b";}
-.icon-remove-circle:before{content:"\f05c";}
-.icon-ok-circle:before{content:"\f05d";}
-.icon-ban-circle:before{content:"\f05e";}
-.icon-arrow-left:before{content:"\f060";}
-.icon-arrow-right:before{content:"\f061";}
-.icon-arrow-up:before{content:"\f062";}
-.icon-arrow-down:before{content:"\f063";}
-.icon-mail-forward:before,.icon-share-alt:before{content:"\f064";}
-.icon-resize-full:before{content:"\f065";}
-.icon-resize-small:before{content:"\f066";}
-.icon-plus:before{content:"\f067";}
-.icon-minus:before{content:"\f068";}
-.icon-asterisk:before{content:"\f069";}
-.icon-exclamation-sign:before{content:"\f06a";}
-.icon-gift:before{content:"\f06b";}
-.icon-leaf:before{content:"\f06c";}
-.icon-fire:before{content:"\f06d";}
-.icon-eye-open:before{content:"\f06e";}
-.icon-eye-close:before{content:"\f070";}
-.icon-warning-sign:before{content:"\f071";}
-.icon-plane:before{content:"\f072";}
-.icon-calendar:before{content:"\f073";}
-.icon-random:before{content:"\f074";}
-.icon-comment:before{content:"\f075";}
-.icon-magnet:before{content:"\f076";}
-.icon-chevron-up:before{content:"\f077";}
-.icon-chevron-down:before{content:"\f078";}
-.icon-retweet:before{content:"\f079";}
-.icon-shopping-cart:before{content:"\f07a";}
-.icon-folder-close:before{content:"\f07b";}
-.icon-folder-open:before{content:"\f07c";}
-.icon-resize-vertical:before{content:"\f07d";}
-.icon-resize-horizontal:before{content:"\f07e";}
-.icon-bar-chart:before{content:"\f080";}
-.icon-twitter-sign:before{content:"\f081";}
-.icon-facebook-sign:before{content:"\f082";}
-.icon-camera-retro:before{content:"\f083";}
-.icon-key:before{content:"\f084";}
-.icon-gears:before,.icon-cogs:before{content:"\f085";}
-.icon-comments:before{content:"\f086";}
-.icon-thumbs-up-alt:before{content:"\f087";}
-.icon-thumbs-down-alt:before{content:"\f088";}
-.icon-star-half:before{content:"\f089";}
-.icon-heart-empty:before{content:"\f08a";}
-.icon-signout:before{content:"\f08b";}
-.icon-linkedin-sign:before{content:"\f08c";}
-.icon-pushpin:before{content:"\f08d";}
-.icon-external-link:before{content:"\f08e";}
-.icon-signin:before{content:"\f090";}
-.icon-trophy:before{content:"\f091";}
-.icon-github-sign:before{content:"\f092";}
-.icon-upload-alt:before{content:"\f093";}
-.icon-lemon:before{content:"\f094";}
-.icon-phone:before{content:"\f095";}
-.icon-unchecked:before,.icon-check-empty:before{content:"\f096";}
-.icon-bookmark-empty:before{content:"\f097";}
-.icon-phone-sign:before{content:"\f098";}
-.icon-twitter:before{content:"\f099";}
-.icon-facebook:before{content:"\f09a";}
-.icon-github:before{content:"\f09b";}
-.icon-unlock:before{content:"\f09c";}
-.icon-credit-card:before{content:"\f09d";}
-.icon-rss:before{content:"\f09e";}
-.icon-hdd:before{content:"\f0a0";}
-.icon-bullhorn:before{content:"\f0a1";}
-.icon-bell:before{content:"\f0a2";}
-.icon-certificate:before{content:"\f0a3";}
-.icon-hand-right:before{content:"\f0a4";}
-.icon-hand-left:before{content:"\f0a5";}
-.icon-hand-up:before{content:"\f0a6";}
-.icon-hand-down:before{content:"\f0a7";}
-.icon-circle-arrow-left:before{content:"\f0a8";}
-.icon-circle-arrow-right:before{content:"\f0a9";}
-.icon-circle-arrow-up:before{content:"\f0aa";}
-.icon-circle-arrow-down:before{content:"\f0ab";}
-.icon-globe:before{content:"\f0ac";}
-.icon-wrench:before{content:"\f0ad";}
-.icon-tasks:before{content:"\f0ae";}
-.icon-filter:before{content:"\f0b0";}
-.icon-briefcase:before{content:"\f0b1";}
-.icon-fullscreen:before{content:"\f0b2";}
-.icon-group:before{content:"\f0c0";}
-.icon-link:before{content:"\f0c1";}
-.icon-cloud:before{content:"\f0c2";}
-.icon-beaker:before{content:"\f0c3";}
-.icon-cut:before{content:"\f0c4";}
-.icon-copy:before{content:"\f0c5";}
-.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6";}
-.icon-save:before{content:"\f0c7";}
-.icon-sign-blank:before{content:"\f0c8";}
-.icon-reorder:before{content:"\f0c9";}
-.icon-list-ul:before{content:"\f0ca";}
-.icon-list-ol:before{content:"\f0cb";}
-.icon-strikethrough:before{content:"\f0cc";}
-.icon-underline:before{content:"\f0cd";}
-.icon-table:before{content:"\f0ce";}
-.icon-magic:before{content:"\f0d0";}
-.icon-truck:before{content:"\f0d1";}
-.icon-pinterest:before{content:"\f0d2";}
-.icon-pinterest-sign:before{content:"\f0d3";}
-.icon-google-plus-sign:before{content:"\f0d4";}
-.icon-google-plus:before{content:"\f0d5";}
-.icon-money:before{content:"\f0d6";}
-.icon-caret-down:before{content:"\f0d7";}
-.icon-caret-up:before{content:"\f0d8";}
-.icon-caret-left:before{content:"\f0d9";}
-.icon-caret-right:before{content:"\f0da";}
-.icon-columns:before{content:"\f0db";}
-.icon-sort:before{content:"\f0dc";}
-.icon-sort-down:before{content:"\f0dd";}
-.icon-sort-up:before{content:"\f0de";}
-.icon-envelope:before{content:"\f0e0";}
-.icon-linkedin:before{content:"\f0e1";}
-.icon-rotate-left:before,.icon-undo:before{content:"\f0e2";}
-.icon-legal:before{content:"\f0e3";}
-.icon-dashboard:before{content:"\f0e4";}
-.icon-comment-alt:before{content:"\f0e5";}
-.icon-comments-alt:before{content:"\f0e6";}
-.icon-bolt:before{content:"\f0e7";}
-.icon-sitemap:before{content:"\f0e8";}
-.icon-umbrella:before{content:"\f0e9";}
-.icon-paste:before{content:"\f0ea";}
-.icon-lightbulb:before{content:"\f0eb";}
-.icon-exchange:before{content:"\f0ec";}
-.icon-cloud-download:before{content:"\f0ed";}
-.icon-cloud-upload:before{content:"\f0ee";}
-.icon-user-md:before{content:"\f0f0";}
-.icon-stethoscope:before{content:"\f0f1";}
-.icon-suitcase:before{content:"\f0f2";}
-.icon-bell-alt:before{content:"\f0f3";}
-.icon-coffee:before{content:"\f0f4";}
-.icon-food:before{content:"\f0f5";}
-.icon-file-text-alt:before{content:"\f0f6";}
-.icon-building:before{content:"\f0f7";}
-.icon-hospital:before{content:"\f0f8";}
-.icon-ambulance:before{content:"\f0f9";}
-.icon-medkit:before{content:"\f0fa";}
-.icon-fighter-jet:before{content:"\f0fb";}
-.icon-beer:before{content:"\f0fc";}
-.icon-h-sign:before{content:"\f0fd";}
-.icon-plus-sign-alt:before{content:"\f0fe";}
-.icon-double-angle-left:before{content:"\f100";}
-.icon-double-angle-right:before{content:"\f101";}
-.icon-double-angle-up:before{content:"\f102";}
-.icon-double-angle-down:before{content:"\f103";}
-.icon-angle-left:before{content:"\f104";}
-.icon-angle-right:before{content:"\f105";}
-.icon-angle-up:before{content:"\f106";}
-.icon-angle-down:before{content:"\f107";}
-.icon-desktop:before{content:"\f108";}
-.icon-laptop:before{content:"\f109";}
-.icon-tablet:before{content:"\f10a";}
-.icon-mobile-phone:before{content:"\f10b";}
-.icon-circle-blank:before{content:"\f10c";}
-.icon-quote-left:before{content:"\f10d";}
-.icon-quote-right:before{content:"\f10e";}
-.icon-spinner:before{content:"\f110";}
-.icon-circle:before{content:"\f111";}
-.icon-mail-reply:before,.icon-reply:before{content:"\f112";}
-.icon-github-alt:before{content:"\f113";}
-.icon-folder-close-alt:before{content:"\f114";}
-.icon-folder-open-alt:before{content:"\f115";}
-.icon-expand-alt:before{content:"\f116";}
-.icon-collapse-alt:before{content:"\f117";}
-.icon-smile:before{content:"\f118";}
-.icon-frown:before{content:"\f119";}
-.icon-meh:before{content:"\f11a";}
-.icon-gamepad:before{content:"\f11b";}
-.icon-keyboard:before{content:"\f11c";}
-.icon-flag-alt:before{content:"\f11d";}
-.icon-flag-checkered:before{content:"\f11e";}
-.icon-terminal:before{content:"\f120";}
-.icon-code:before{content:"\f121";}
-.icon-reply-all:before{content:"\f122";}
-.icon-mail-reply-all:before{content:"\f122";}
-.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123";}
-.icon-location-arrow:before{content:"\f124";}
-.icon-crop:before{content:"\f125";}
-.icon-code-fork:before{content:"\f126";}
-.icon-unlink:before{content:"\f127";}
-.icon-question:before{content:"\f128";}
-.icon-info:before{content:"\f129";}
-.icon-exclamation:before{content:"\f12a";}
-.icon-superscript:before{content:"\f12b";}
-.icon-subscript:before{content:"\f12c";}
-.icon-eraser:before{content:"\f12d";}
-.icon-puzzle-piece:before{content:"\f12e";}
-.icon-microphone:before{content:"\f130";}
-.icon-microphone-off:before{content:"\f131";}
-.icon-shield:before{content:"\f132";}
-.icon-calendar-empty:before{content:"\f133";}
-.icon-fire-extinguisher:before{content:"\f134";}
-.icon-rocket:before{content:"\f135";}
-.icon-maxcdn:before{content:"\f136";}
-.icon-chevron-sign-left:before{content:"\f137";}
-.icon-chevron-sign-right:before{content:"\f138";}
-.icon-chevron-sign-up:before{content:"\f139";}
-.icon-chevron-sign-down:before{content:"\f13a";}
-.icon-html5:before{content:"\f13b";}
-.icon-css3:before{content:"\f13c";}
-.icon-anchor:before{content:"\f13d";}
-.icon-unlock-alt:before{content:"\f13e";}
-.icon-bullseye:before{content:"\f140";}
-.icon-ellipsis-horizontal:before{content:"\f141";}
-.icon-ellipsis-vertical:before{content:"\f142";}
-.icon-rss-sign:before{content:"\f143";}
-.icon-play-sign:before{content:"\f144";}
-.icon-ticket:before{content:"\f145";}
-.icon-minus-sign-alt:before{content:"\f146";}
-.icon-check-minus:before{content:"\f147";}
-.icon-level-up:before{content:"\f148";}
-.icon-level-down:before{content:"\f149";}
-.icon-check-sign:before{content:"\f14a";}
-.icon-edit-sign:before{content:"\f14b";}
-.icon-external-link-sign:before{content:"\f14c";}
-.icon-share-sign:before{content:"\f14d";}
-.icon-compass:before{content:"\f14e";}
-.icon-collapse:before{content:"\f150";}
-.icon-collapse-top:before{content:"\f151";}
-.icon-expand:before{content:"\f152";}
-.icon-euro:before,.icon-eur:before{content:"\f153";}
-.icon-gbp:before{content:"\f154";}
-.icon-dollar:before,.icon-usd:before{content:"\f155";}
-.icon-rupee:before,.icon-inr:before{content:"\f156";}
-.icon-yen:before,.icon-jpy:before{content:"\f157";}
-.icon-renminbi:before,.icon-cny:before{content:"\f158";}
-.icon-won:before,.icon-krw:before{content:"\f159";}
-.icon-bitcoin:before,.icon-btc:before{content:"\f15a";}
-.icon-file:before{content:"\f15b";}
-.icon-file-text:before{content:"\f15c";}
-.icon-sort-by-alphabet:before{content:"\f15d";}
-.icon-sort-by-alphabet-alt:before{content:"\f15e";}
-.icon-sort-by-attributes:before{content:"\f160";}
-.icon-sort-by-attributes-alt:before{content:"\f161";}
-.icon-sort-by-order:before{content:"\f162";}
-.icon-sort-by-order-alt:before{content:"\f163";}
-.icon-thumbs-up:before{content:"\f164";}
-.icon-thumbs-down:before{content:"\f165";}
-.icon-youtube-sign:before{content:"\f166";}
-.icon-youtube:before{content:"\f167";}
-.icon-xing:before{content:"\f168";}
-.icon-xing-sign:before{content:"\f169";}
-.icon-youtube-play:before{content:"\f16a";}
-.icon-dropbox:before{content:"\f16b";}
-.icon-stackexchange:before{content:"\f16c";}
-.icon-instagram:before{content:"\f16d";}
-.icon-flickr:before{content:"\f16e";}
-.icon-adn:before{content:"\f170";}
-.icon-bitbucket:before{content:"\f171";}
-.icon-bitbucket-sign:before{content:"\f172";}
-.icon-tumblr:before{content:"\f173";}
-.icon-tumblr-sign:before{content:"\f174";}
-.icon-long-arrow-down:before{content:"\f175";}
-.icon-long-arrow-up:before{content:"\f176";}
-.icon-long-arrow-left:before{content:"\f177";}
-.icon-long-arrow-right:before{content:"\f178";}
-.icon-apple:before{content:"\f179";}
-.icon-windows:before{content:"\f17a";}
-.icon-android:before{content:"\f17b";}
-.icon-linux:before{content:"\f17c";}
-.icon-dribbble:before{content:"\f17d";}
-.icon-skype:before{content:"\f17e";}
-.icon-foursquare:before{content:"\f180";}
-.icon-trello:before{content:"\f181";}
-.icon-female:before{content:"\f182";}
-.icon-male:before{content:"\f183";}
-.icon-gittip:before{content:"\f184";}
-.icon-sun:before{content:"\f185";}
-.icon-moon:before{content:"\f186";}
-.icon-archive:before{content:"\f187";}
-.icon-bug:before{content:"\f188";}
-.icon-vk:before{content:"\f189";}
-.icon-weibo:before{content:"\f18a";}
-.icon-renren:before{content:"\f18b";}

BIN
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/FontAwesome.otf


BIN
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/fontawesome-webfont.eot


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 195
EVSE/rootfs/var/www/css/font-awesome/src/3.2.1/assets/font-awesome/font/fontawesome-webfont.svg


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно