From 375342c11638685d6b7fecc2a979825c56d770f9 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 14 七月 2025 17:57:15 +0800
Subject: [PATCH] 1.CCollectionEvent,CLoadPort, CVariable类实现; 2.从.txt或csv中加载CVariable列表; 3.添加菜单,准备添加相关查看或编辑 CVariable列表的界面;
---
SourceCode/Bond/Servo/CEqReadStep.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEqReadStep.cpp b/SourceCode/Bond/Servo/CEqReadStep.cpp
index e94ba79..ce4f078 100644
--- a/SourceCode/Bond/Servo/CEqReadStep.cpp
+++ b/SourceCode/Bond/Servo/CEqReadStep.cpp
@@ -38,6 +38,17 @@
CReadStep::onReadData();
+ // 20250620新增,有些场景是不需要读数据的,只要检测到信息就写数据给机器
+ if (m_nReadSize == 0) {
+ if (m_onReadBlock != nullptr) {
+ m_onReadBlock(this, ROK, nullptr, 0);
+ }
+
+ return 0;
+ }
+
+
+ // 读数据
char szBuffer[READ_BUFFER_MAX];
int nRet = m_pCclink->ReadData2(m_station, DeviceType::W, m_nDataDev,
(long)min(READ_BUFFER_MAX, m_nReadSize), szBuffer);
--
Gitblit v1.9.3