From 3ec43c0d199587138cdbb601e3db2e93a87bc329 Mon Sep 17 00:00:00 2001
From: Darker <mr.darker@163.com>
Date: 星期二, 25 二月 2025 15:57:03 +0800
Subject: [PATCH] Merge branch 'clh'

---
 SourceCode/Bond/Servo/CEquipment.cpp |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index fcc8002..82c261e 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -67,12 +67,8 @@
 
 	void CEquipment::init()
 	{
-		CStep* pStep = new CStep();
-		if (addStep(0x360, pStep) == 0) {
-			pStep->init();
-		}
-		else {
-			delete pStep;
+		for (auto item : m_mapStep) {
+			item.second->init();
 		}
 	}
 
@@ -244,13 +240,18 @@
 
 
 		// 以下根据信号做流程处理
+		CStep* pStep;
 
-		// Equipment Mode Change Report
-		index = 0x360;
-		bFlag = isBitOn(pszData, size, index);
-		CStep* pStep = getStep(0x360);
-		if (pStep != nullptr) {
-			pStep->onSignal(bFlag);
+		// Equipment Mode Change Report(0x360)
+		// Equipment Status Change Report(0x361)
+		// Equipment Alarm Change Report(0x362 ~ 0x366)
+		for (int i = 0; i < 7; i++) {
+			index = 0x360 + i;;
+			bFlag = isBitOn(pszData, size, index);
+			pStep = getStep(index);
+			if (pStep != nullptr) {
+				pStep->onSignal(bFlag);
+			}
 		}
 	}
 

--
Gitblit v1.9.3