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 |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 26b9e62..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
@@ -981,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