From c8173fa96f226ff88412d07955fb340de4681ffc Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 06 三月 2025 11:21:34 +0800
Subject: [PATCH] 1.实现 CIM model change指令下发到机器。与之前的从CC link读数据逻辑稍有不同,下发指令为写数据,因此,从原CStep派生两个类,CReadStep(用于读数据),CWriteStep(用于写数据),然后根据使用场景选择合适的基数做应用层逻辑。已完成待测试验证
---
SourceCode/Bond/Servo/ServoDlg.cpp | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 4217090..922f768 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -167,6 +167,19 @@
}
}
}
+ else if (RX_CODE_SELECT_STEP == code) {
+ SERVO::CStep* pStep = nullptr;
+ if (pAny->getPtrValue("ptr", (void*&)pStep)) {
+ ASSERT(pStep);
+ ASSERT(m_pPanelAttributes);
+ m_pPanelAttributes->loadDataFromStep(pStep);
+ if (!m_pPanelAttributes->IsWindowVisible()) {
+ m_pPanelAttributes->ShowWindow(SW_SHOW);
+ Resize();
+ }
+ }
+ }
+
pAny->release();
}, [&]() -> void {
// onComplete
@@ -305,6 +318,10 @@
m_pPanelMaster = new CPanelMaster();
m_pPanelMaster->Create(IDD_PANEL_MASTER, this);
m_pPanelMaster->ShowWindow(SW_SHOW);
+ m_pPanelAttributes = new CPanelAttributes();
+ m_pPanelAttributes->Create(IDD_PANEL_ATTRIBUTES, this);
+ // m_pPanelAttributes->ShowWindow(SW_SHOW);
+
// 调整初始窗口位置
@@ -558,6 +575,12 @@
m_pPanelMaster = nullptr;
}
+ if (m_pPanelAttributes != nullptr) {
+ m_pPanelAttributes->DestroyWindow();
+ delete m_pPanelAttributes;
+ m_pPanelAttributes = nullptr;
+ }
+
if (m_hbrBkgnd != nullptr) {
::DeleteObject(m_hbrBkgnd);
}
@@ -763,6 +786,11 @@
x += nPanelWidth;
}
+ if (m_pPanelAttributes != nullptr && m_pPanelAttributes->IsWindowVisible()) {
+ nPanelWidth = m_pPanelAttributes->getPanelWidth();
+ m_pPanelAttributes->MoveWindow(x, y, nPanelWidth, rcClient.Height());
+ x += nPanelWidth;
+ }
pItem = GetDlgItem(IDC_SERVO_GRAPH1);
pItem->GetClientRect(&rcItem);
--
Gitblit v1.9.3