From f0f942498d6b0c9a92ee2d7b9ea62a592b8f4cce Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 08 七月 2025 13:56:43 +0800
Subject: [PATCH] 1.基础通讯,建立连接;
---
SourceCode/Bond/Servo/ServoDlg.cpp | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index de985ad..baeec28 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -241,7 +241,26 @@
}
}
}
+ if (RX_CODE_PASSIVE_STATUS_CHANGED == code) {
+ int state = 0;
+ pAny->getIntValue("exCode", state);
+ if (STATE::NOT_CONNECTED == state) {
+ m_pMyStatusbar->setCimBtnText("Disconnected");
+ //m_labelPassiveState.setBackground(DISCONNECTED_BACKGROUND);
+ //m_labelPassiveState.setForeground(DISCONNECTED_FOREGROUND, TRUE);
+ }
+ else if (STATE::NOT_SELECTED == state) {
+ m_pMyStatusbar->setCimBtnText("Not Selected");
+ //m_labelPassiveState.setBackground(NOT_SELECTED_BACKGROUND);
+ //m_labelPassiveState.setForeground(NOT_SELECTED_FOREGROUND, TRUE);
+ }
+ else if (STATE::SELECTED == state) {
+ m_pMyStatusbar->setCimBtnText("Selected");
+ //m_labelPassiveState.setBackground(SELECTED_BACKGROUND);
+ //m_labelPassiveState.setForeground(SELECTED_FOREGROUND, TRUE);
+ }
+ }
pAny->release();
}, [&]() -> void {
// onComplete
@@ -283,6 +302,10 @@
// 执行此操作
SetIcon(m_hIcon, TRUE); // 设置大图标
SetIcon(m_hIcon, FALSE); // 设置小图标
+
+
+ // model init
+ theApp.m_model.init();
// 菜单
@@ -353,9 +376,6 @@
int height = GetSystemMetrics(SM_CYSCREEN);
MoveWindow((width - rcWnd.Width()) / 2, 0, rcWnd.Width(), rcWnd.Height(), TRUE);
-
- // model init
- theApp.m_model.init();
SetTimer(TIMER_ID_CREATE_TERMINAL, 3000, nullptr);
@@ -980,6 +1000,9 @@
m_pRobotTaskDlg->MoveWindow(x, rcBar.top - h, w, h);
m_pRobotTaskDlg->ShowWindow(SW_SHOW);
}
+ else if (id == IDC_BUTTON_CIM) {
+ AfxMessageBox("IDC_BUTTON_CIM");
+ }
return 0;
}
--
Gitblit v1.9.3