From a2a0aed00c2ee1ac1cf1187be8f2cbdc6c89310d Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 15 十一月 2024 15:41:25 +0800
Subject: [PATCH] 1.PLC的连接;

---
 SourceCode/Bond/BondEq/CBonder.cpp |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/BondEq/CBonder.cpp b/SourceCode/Bond/BondEq/CBonder.cpp
index 9ed5f45..6a8cc5b 100644
--- a/SourceCode/Bond/BondEq/CBonder.cpp
+++ b/SourceCode/Bond/BondEq/CBonder.cpp
@@ -60,7 +60,6 @@
 {
 	m_listener.onStateChanged = listener.onStateChanged;
 	m_listener.onPlcStateChanged = listener.onPlcStateChanged;
-	m_listener.onCimStateChanged = listener.onCimStateChanged;
 	m_listener.onEfemStateChanged = listener.onEfemStateChanged;
 	m_listener.onRecvBroadcast = listener.onRecvBroadcast;
 }
@@ -187,7 +186,6 @@
 	pPlc->setName("PLC(1)");
 	pPlc->setDescription("PLC");
 	pPlc->setIndex(0);
-	pPlc->init();
 	AddComponent(pPlc);
 
 
@@ -449,6 +447,17 @@
 		item->OnTimer(nTimerid);
 	}
 
+
+	// PLC延时连接
+	static int nPlc = 0;
+	nPlc++;
+	if (nPlc == 3) {
+		CPLC* pPLC = (CPLC*)GetComponent("PLC(1)");
+		pPLC->init();
+	}
+
+
+	// 自动保存
 	static int iii = 0;
 	iii++;
 	if (iii % 5 == 0) {

--
Gitblit v1.9.3