From 71d7d20abf9f367f8390b7e954042b32c728e513 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 10 五月 2025 11:00:44 +0800
Subject: [PATCH] 1.修复最初的数条日志无法显示的问题;
---
SourceCode/Bond/Servo/Model.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 0c50bac..95183ef 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -19,6 +19,12 @@
IObservable* CModel::getObservable()
{
+ if (m_pObservable == nullptr) {
+ m_pObservable = RX_AllocaObservable([&](IObservableEmitter* e) -> void {
+ m_pObservableEmitter = e; // 保存发射器
+ });
+ }
+
return m_pObservable;
}
@@ -53,11 +59,6 @@
CLog::GetLog()->SetLogsDir(strLogDir);
CLog::GetLog()->SetEquipmentId((LPTSTR)(LPCTSTR)strUnitId);
LOGI("\r\n\r\n~~~ Prog Start! ~~~");
-
-
- m_pObservable = RX_AllocaObservable([&](IObservableEmitter* e) -> void {
- m_pObservableEmitter = e; // 保存发射器
- });
SECSListener listener;
--
Gitblit v1.9.3