From 2ffaec40444a4add7d8e638e5b20a2f81daa18af Mon Sep 17 00:00:00 2001
From: Darker <mr.darker@163.com>
Date: 星期二, 25 二月 2025 17:27:42 +0800
Subject: [PATCH] 1. 合并代码
---
SourceCode/Bond/Servo/Model.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 4382df1..38ad39f 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -93,13 +93,24 @@
masterListener.onEqAlive = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bAlive) -> void {
LOGI("<CModel>Equipment onAlive:%s(%s).\n", pEquipment->getName().c_str(),
bAlive ? _T("ON") : _T("OFF"));
+ notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
};
masterListener.onEqCimStateChanged = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bOn) -> void {
LOGI("<CModel>Equipment Cim State:%s(%s).\n", pEquipment->getName().c_str(),
bOn ? _T("ON") : _T("OFF"));
+ notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
};
+ masterListener.onEqStepEvent = [&](SERVO::CStep* pStep, int code, void* pData) -> void {
+ if (code == STEP_EVENT_READDATA) {
+ LOGI("<CModel>onEqStepEvent,数据变化:%s(%s, 0x%x).\n", pStep->getEquipment()->getName().c_str(),
+ pStep->getName().c_str(), pData);
+ notifyPtr(RX_CODE_STEP_EVENT_READDATA, pStep);
+
+ }
+ };
+
m_master.setListener(masterListener);
return 0;
--
Gitblit v1.9.3