From f4e3d35dd0f912c303b13b48a4a3fc09ccb0a845 Mon Sep 17 00:00:00 2001
From: darker <mr.darker@163.com>
Date: 星期二, 18 二月 2025 17:57:40 +0800
Subject: [PATCH] 1. 遍历设备类的属性,并显示在界面上

---
 SourceCode/Bond/Servo/CMaster.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index c7e1a14..e2d3f3c 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -1,4 +1,5 @@
 #include "stdafx.h"
+#include "Common.h"
 #include "CMaster.h"
 
 namespace SERVO {
@@ -64,7 +65,7 @@
 		// 初始化添加各子设备
 		{
 			CEFEM* pEquipment = new CEFEM();
-			pEquipment->setID(1);
+			pEquipment->setID(EQ_ID_EFEM);
 			pEquipment->setName("EFEM(ROBOT)");
 			pEquipment->setDescription("EFEM(ROBOT).");
 			pEquipment->setReadBitBlock(0x4000, 0x45ff);
@@ -121,6 +122,10 @@
 
 	CEquipment* CMaster::getEquipment(int id)
 	{
+		for (auto item : m_listEquipment) {
+			if (item->getID() == id) return item;
+		}
+
 		return nullptr;
 	}
 

--
Gitblit v1.9.3