From 9934a96ac90b32d427d57cd6e4e0a1954fd59f1e Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 18 二月 2025 16:19:54 +0800
Subject: [PATCH] 1.通过id获取CEquipment
---
SourceCode/Bond/Servo/CMaster.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index c7e1a14..bee8f05 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -121,6 +121,10 @@
CEquipment* CMaster::getEquipment(int id)
{
+ for (auto item : m_listEquipment) {
+ if (item->getID() == id) return item;
+ }
+
return nullptr;
}
--
Gitblit v1.9.3