Jelajahi Sumber

2021-09-30 / Eason Yang
Action:
1. Remove : Start button function.
2. Improve : qr code icon function.
3. Improve : Rfid icon function.
4. Added : define for new rfid and qr code icon.

File:
1. Module_LcmControl.c
Action 1
Action 2
Action 3

2. lcmComm_dgus.h
Action 4

Version LCM: V0.19

8009 3 tahun lalu
induk
melakukan
8eb6f9bfb6

+ 32 - 25
EVSE/Projects/AW-CCS/Apps/LCM/Module_LcmControl.c

@@ -55,7 +55,6 @@ void setConnectionAnimation(uint8_t gun_index, uint8_t system_mode);
 void setPresentFinalCost(float cost);
 float getPresentFinalCost(uint8_t gun_index);
 void setDefaultValue(uint8_t gun_index, uint8_t system_mode);
-void setStartButtonAnimation(uint8_t gun_index);
 
 void setUserPrice(uint8_t type);
 void setDefaultPrice(uint8_t type);
@@ -84,7 +83,7 @@ enum TMR_IDX
 	TMR_IDX_ALARM,
 	TMR_IDX_PRICE,
 	TMR_IDX_EMULATOR,
-	TMR_IDX_STARTBUTTON,
+	TMR_IDX_6,
 	TMR_IDX_7,
 	TMR_IDX_8,
 	TMR_IDX_SHOW_AUTH_RESULT
@@ -95,7 +94,6 @@ struct timeb					startTime[AC_QUANTITY][10];
 #define TIME_ANIMATION_PLUGIN			1000
 #define TIME_ANIMATION_BATTERY			1000
 #define TIME_ANIMATION_CONNECTION		1000
-#define TIME_ANIMATION_START_BUTTON		1000
 #define TIME_ANIMATION_ALARM			5000
 #define TIME_REFRESH_TIME				5000
 #define TIME_AUTH_RESULT_TIME			5000
@@ -106,7 +104,6 @@ struct timeb					startTime[AC_QUANTITY][10];
 uint8_t BATTERY_LEVEL_STATUS = BATTERY_LEVEL_5;
 uint8_t CONNECTION_LEVEL_STATUS = CONNECTION_LEVEL_0;
 uint8_t GUN_PLUGING_LEVEL_STATUS = GUN_PLUGING_LEVEL_0;
-uint8_t START_BUTTON_LEVEL_STATUS = START_BUTTON_LEVEL_0;
 uint8_t WarningCount = 255;
 
 int Uart1Fd;
@@ -285,11 +282,9 @@ void page_idle(uint8_t gun_index, uint8_t system_mode)
 		if((getCurrentPage() != SYSTEM_SCREEN_SLEEP))
 		{
 			setCurrentPage(SYSTEM_SCREEN_SLEEP);
-			START_BUTTON_LEVEL_STATUS = START_BUTTON_LEVEL_0;
-			ftime(&startTime[gun_index][TMR_IDX_STARTBUTTON]);
 		}
 		else
-			setStartButtonAnimation(gun_index);
+		{}
 	}
 	else
 	{
@@ -1335,6 +1330,7 @@ void setRTC()
 //=======================================
 void setRfidIcon()
 {
+	/*
 	//=======================================
 	// AX-Series Generation 1
 	//=======================================
@@ -1372,6 +1368,13 @@ void setRfidIcon()
 		else
 			setDisplayValue(ICON_RFID, RFID_DISABLE);
 	}
+	*/
+
+	if(ShmSysConfigAndInfo->SysConfig.isRFID == ON)
+		setDisplayValue(ICON_NEW_RFID, 0x02);
+	else
+		setDisplayValue(ICON_NEW_RFID, 0x01);
+
 }
 
 //=======================================
@@ -1381,6 +1384,7 @@ void setQRCodeIcon()
 {
 	uint8_t length = 0;
 
+	/*
 	// QR CODE ( ENABLE / DISABLE )
 	if(ShmSysConfigAndInfo->SysConfig.isQRCode == ON)
 	{
@@ -1401,6 +1405,27 @@ void setQRCodeIcon()
 		setDisplayValue(TEXT_QRCODE_CONTENT, DISAPPEAR);
 		setDisplayValue(ICON_QRCODE,QRCODE_DISABLE);
 	}
+	*/
+
+	if(ShmSysConfigAndInfo->SysConfig.isQRCode == ON)
+	{
+		setDisplayValue(ICON_NEW_QR_CODE,0x02);
+		if(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode == NO)
+		{
+			length = strlen((char *)ShmSysConfigAndInfo->SysConfig.SystemId);
+			setQRcodeContent((char *)ShmSysConfigAndInfo->SysConfig.SystemId, length, QRCODE_FOR_IDLE);
+		}
+		else
+		{
+			length = strlen((char *)ShmSysConfigAndInfo->SysConfig.QRCodeContent);
+			setQRcodeContent((char *)ShmSysConfigAndInfo->SysConfig.QRCodeContent, length, QRCODE_FOR_IDLE);
+		}
+	}
+	else
+	{
+		setDisplayValue(TEXT_QRCODE_CONTENT, DISAPPEAR);
+		setDisplayValue(ICON_NEW_QR_CODE,0x01);
+	}
 }
 
 //=======================================
@@ -1865,24 +1890,6 @@ void setGunPluginAnimation(uint8_t gun_index)
 	}
 }
 
-//=======================================
-// Setting start button animation
-//=======================================
-void setStartButtonAnimation(uint8_t gun_index)
-{
-	if((START_BUTTON_LEVEL_STATUS ==  START_BUTTON_LEVEL_0) && (DiffTimebWithNow(startTime[gun_index][TMR_IDX_STARTBUTTON]) > (TIME_ANIMATION_START_BUTTON)))
-	{
-		setDisplayValue(ICON_START_BUTTON, APPEAR);
-		START_BUTTON_LEVEL_STATUS = START_BUTTON_LEVEL_1;
-	}
-	else if((START_BUTTON_LEVEL_STATUS ==  START_BUTTON_LEVEL_1) && (DiffTimebWithNow(startTime[gun_index][TMR_IDX_STARTBUTTON]) > (TIME_ANIMATION_START_BUTTON*2)))
-	{
-		setDisplayValue(ICON_START_BUTTON, DISAPPEAR);
-		START_BUTTON_LEVEL_STATUS = START_BUTTON_LEVEL_0;
-		ftime(&startTime[gun_index][TMR_IDX_STARTBUTTON]);
-	}
-}
-
 //=======================================
 // Setting battery SOC value
 //=======================================

+ 4 - 7
EVSE/Projects/AW-CCS/Apps/LCM/lcmComm_dgus.h

@@ -98,7 +98,8 @@
 #define SYSTEM_SCREEN_TERMINATING			0X0A
 #define SYSTEM_SCREEN_EMERGENCY				0x0B
 #define SYSTEM_SCREEN_SLEEP					0x0C
-#define SYSTEM_SCREEN_POWER_CONSUMPTION		0x0D
+#define SYSTEM_SCREEN_SLEEP2				0x0D
+#define SYSTEM_SCREEN_POWER_CONSUMPTION		0x0E
 
 //=======================================
 // Parameter to change icon status
@@ -187,6 +188,8 @@
 #define ICON_START_BUTTON					0x1020
 #define ICON_POWER_CONSUMPTION				0x1021
 #define ICON_THE_CHARGE_COMPLETE			0x1022
+#define ICON_NEW_RFID						0x1023
+#define ICON_NEW_QR_CODE					0x1024
 
 #define ICON_LOGO							0x1500
 #define ICON_LOGO_CHARGING					0x1501
@@ -260,12 +263,6 @@
 #define GUN_PLUGING_LEVEL_0					0x00
 #define GUN_PLUGING_LEVEL_1					0x01
 
-//=======================================
-// Start button level status (Sleep in Idle)
-//=======================================
-#define START_BUTTON_LEVEL_0				0x00
-#define START_BUTTON_LEVEL_1				0x01
-
 //=======================================
 // RFID authorization constant
 //=======================================