From 5b6e648814aa829706cb94e6c44766ee9a6d9f12 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 28 五月 2025 11:06:47 +0800
Subject: [PATCH] 1.机器槽位信息设计(CSlot)

---
 SourceCode/Bond/Servo/CArm.cpp |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/CArm.cpp b/SourceCode/Bond/Servo/CArm.cpp
index e698692..77e43d3 100644
--- a/SourceCode/Bond/Servo/CArm.cpp
+++ b/SourceCode/Bond/Servo/CArm.cpp
@@ -34,6 +34,12 @@
 
 	}
 
+	// 必须要实现的虚函数,在此初始化Slot信息
+	void CArm::initSlots()
+	{
+
+	}
+
 	void CArm::onTimer(UINT nTimerid)
 	{
 		CEquipment::onTimer(nTimerid);
@@ -56,13 +62,17 @@
 
 	int CArm::tempStore(CGlass* pGlass)
 	{
-		// 保证列表中只存储一个物料
+		// 原:保证列表中只存储一个物料
+		// 修改为:先清空之前的,再添加当前pGlass, 如果pGlass有buddy,也要加入列表中
 		Lock();
 		for (auto item : m_glassList) {
 			item->release();
 		}
 		m_glassList.clear();
 		addGlassToList(pGlass);
+		if (pGlass->getBuddy() != nullptr) {
+			addGlassToList(pGlass->getBuddy());
+		}
 		Unlock();
 
 		if (m_listener.onDataChanged != nullptr) {

--
Gitblit v1.9.3