From 393f5685448eab573f2c1f15f0725e49ffea8d4b Mon Sep 17 00:00:00 2001
From: darker <mr.darker@163.com>
Date: 星期四, 16 一月 2025 15:26:52 +0800
Subject: [PATCH] 1. 添加机械臂水平移动功能
---
SourceCode/Bond/Servo/ServoGraph.cpp | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoGraph.cpp b/SourceCode/Bond/Servo/ServoGraph.cpp
index 718661c..32d4dfa 100644
--- a/SourceCode/Bond/Servo/ServoGraph.cpp
+++ b/SourceCode/Bond/Servo/ServoGraph.cpp
@@ -627,3 +627,21 @@
SendMessage(m_hWndTooltip, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&tti);
}
}
+
+void CServoGraph::UpdateImageCoordinates(int id, int newX, int newY)
+{
+ IMAGE* pImage = GetImage(id);
+ if (pImage != nullptr) {
+ pImage->x = newX;
+ pImage->y = newY;
+ }
+}
+
+void CServoGraph::UpdateIndicateBoxCoordinates(int id, int newX, int newY)
+{
+ INDICATEBOX* pIndicateBox = GetIndicateBox(id);
+ if (pIndicateBox != nullptr) {
+ pIndicateBox->x = newX;
+ pIndicateBox->y = newY;
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3