From d9c3fbc92d2a775674943d4ab882fbd77f0db688 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 08 七月 2025 20:31:34 +0800
Subject: [PATCH] 1.增加日期时间同步功能和测试;

---
 SourceCode/Bond/Servo/Model.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 6c36c56..5d39e14 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -108,6 +108,11 @@
 			LOGI("onEQConstantRequest: %d, %s", item.id, item.szValue);
 		}
 	};
+	listener.onDatetimeSync = [&](void* pFrom, SYSTEMTIME& time) -> void {
+		LOGI("onDatetimeSync: %d%02d%02d%02d%02d%02d", time.wYear,
+			time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
+		m_master.datetimeSync(time);
+	};
 
 	m_hsmsPassive.setListener(listener);
 	m_hsmsPassive.setEquipmentModelType((LPTSTR)(LPCTSTR)strModeType);

--
Gitblit v1.9.3