瀏覽代碼

[Added][AW-CCS][main.c]
2022-05-04 / EASON YANG
Action
1. Added: Check local power sharing communication detection.

File
1. main.c
Action 1

FIRMWARE VERSION: B0.62.XX.XXXX.PX

8009 2 年之前
父節點
當前提交
1297d2af98
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. 17 0
      EVSE/Projects/AW-CCS/Apps/main.c

+ 17 - 0
EVSE/Projects/AW-CCS/Apps/main.c

@@ -5260,6 +5260,23 @@ int main(void)
 			}
 		}
 
+		//==============================================
+		// Check Local Power Sharing Communication
+		//==============================================
+		if(ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharing > 0)
+		{
+			if(ShmSysConfigAndInfo->SysInfo.localSharingInfo.isConnectedSharingServer)
+			{
+				if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LocalPowerSharingCommunicationError == ON)
+					ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LocalPowerSharingCommunicationError = OFF;
+			}
+			else
+			{
+				if(ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LocalPowerSharingCommunicationError == OFF)
+					ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LocalPowerSharingCommunicationError = ON;
+			}
+		}
+
 		//==============================================
 		// Connector loop
 		//==============================================