Browse Source

2022-02-10 / Eason Yang
Action
1. Improve: setting title logic when the EVSE is under charging mode.

File
1. Module_LcmControl.c
Action 1

LCM VERSION: V0.27

8009 3 years ago
parent
commit
2d35a648e1
1 changed files with 34 additions and 18 deletions
  1. 34 18
      EVSE/Projects/AW-CCS/Apps/LCM/Module_LcmControl.c

+ 34 - 18
EVSE/Projects/AW-CCS/Apps/LCM/Module_LcmControl.c

@@ -2,7 +2,7 @@
  * Module_LcmControl.c
  *
  * Created on : 2020-10-20
- * Update on : 2022-02-07
+ * Update on : 2022-02-10
  * Author : Folus Wen, Eason Yang
  * Version : V0.27
  *
@@ -121,7 +121,7 @@ int Uart1Fd;
 //=======================================
 // Record version and date
 //=======================================
-char *FIRMWARE_UPDATE_IMAGE[3] = {"V0.27", "2022-02-07", "REV.03.00"};
+char *FIRMWARE_UPDATE_IMAGE[3] = {"V0.27", "2022-02-10", "REV.03.00"};
 
 //=======================================
 // Common routine
@@ -466,6 +466,38 @@ void page_charging(uint8_t gun_index, uint8_t system_mode)
 		setPresentChargedDuration(gun_index);
 		setPresentChargedgPower(gun_index);
 
+		if((ShmSysConfigAndInfo->SysInfo.OcppConnStatus == ON))
+		{
+			if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
+			{
+				// Title appear
+				setSessionFeeTitle(ON);
+				setParkingFeeTitle(ON);
+				setFinalCostTitle(ON);
+			}
+			else
+			{
+				// DISPLAY BY OCPP 2.0.1
+			}
+		}
+		else
+		{
+			if(ShmSysConfigAndInfo->SysConfig.BillingData.isBilling == ON)
+			{
+				// Title appear
+				setSessionFeeTitle(ON);
+				setParkingFeeTitle(ON);
+				setFinalCostTitle(ON);
+			}
+			else
+			{
+				// Title disappear
+				setSessionFeeTitle(OFF);
+				setParkingFeeTitle(OFF);
+				setFinalCostTitle(OFF);
+			}
+		}
+
 		if((getDiffSecNow(startTime[gun_index][TMR_IDX_REFRESH_INFO]) >= TIME_REFRESH_INFO) || (strcmp((char*)ShmOCPP16Data->Cost.RunningCost[gun_index].description, runningCost) != 0))
 		{
 			setPresentChargedEnergy(gun_index, system_mode);
@@ -478,11 +510,6 @@ void page_charging(uint8_t gun_index, uint8_t system_mode)
 					setRunningCost(gun_index, TOTAL_COST);
 					setRunningCost(gun_index, SESSION_FEE);
 					setRunningCost(gun_index, OCCUPANCY_FEE);
-
-					// Title appear
-					setSessionFeeTitle(ON);
-					setParkingFeeTitle(ON);
-					setFinalCostTitle(ON);
 				}
 				else
 				{
@@ -500,11 +527,6 @@ void page_charging(uint8_t gun_index, uint8_t system_mode)
 					setPresentFinalCost(getPresentFinalCost(gun_index));
 					//setPresentSessionFee();
 					setPresentParkingFee();
-
-					// Title appear
-					setSessionFeeTitle(ON);
-					setParkingFeeTitle(ON);
-					setFinalCostTitle(ON);
 				}
 				else
 				{
@@ -523,11 +545,6 @@ void page_charging(uint8_t gun_index, uint8_t system_mode)
 					// User account balance disappear
 					setDisplayValue(ICON_COMPLETE_WALLET, DISAPPEAR);
 					setDisplayValue(TEXT_REMAINING_ACCOUNT_BALANCE, DISAPPEAR);
-
-					// Title disappear
-					setSessionFeeTitle(OFF);
-					setParkingFeeTitle(OFF);
-					setFinalCostTitle(OFF);
 				}
 			}
 
@@ -2199,7 +2216,6 @@ void setDefaultValue(uint8_t gun_index, uint8_t system_mode)
 			setSessionFeeTitle(ON);
 			setParkingFeeTitle(ON);
 			setFinalCostTitle(ON);
-
 			if(ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_HLC)
 			{
 				setDisplayValue(ICON_PRECHARGING_ANIMATION, CONNECTION_FLASHING_1);