From 5efff0895ad06eb0c5f04df7efe67a22b358beb3 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 18 二月 2025 16:10:23 +0800
Subject: [PATCH] Merge branch 'liuyang' into clh
---
SourceCode/Bond/Servo/Model.cpp | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 7009492..66cf9a7 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -89,6 +89,20 @@
m_hsmsPassive.init(this, "APP", 7000);
+ SERVO::MasterListener masterListener;
+ 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"));
+
+ };
+ m_master.setListener(masterListener);
+
return 0;
}
--
Gitblit v1.9.3