From 1310b3764eafe085dd43a73aa5190a18e9f717c0 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期四, 11 九月 2025 17:11:40 +0800
Subject: [PATCH] 1. 把数值放大1000倍 2. 发送PLC是双字
---
SourceCode/Bond/Servo/Model.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 47ea454..6f2111e 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -428,13 +428,15 @@
m_hsmsPassive.setVariableValue("PJEndID", ((SERVO::CProcessJob*)pj)->id().c_str());
m_hsmsPassive.requestEventReportSend_PJ_End();
};
- masterListener.onPanelStart = [&](void* pMaster, void* pj) {
- m_hsmsPassive.setVariableValue("PanelStartID", ((SERVO::CGlass*)pj)->getID().c_str());
+ masterListener.onPanelStart = [&](void* pMaster, void* pPanel) {
+ m_hsmsPassive.setVariableValue("PanelStartID", ((SERVO::CGlass*)pPanel)->getID().c_str());
m_hsmsPassive.requestEventReportSend_Panel_Start();
};
- masterListener.onPanelEnd = [&](void* pMaster, void* pj) {
- m_hsmsPassive.setVariableValue("PanelEndID", ((SERVO::CGlass*)pj)->getID().c_str());
+ masterListener.onPanelEnd = [&](void* pMaster, void* pPanel) {
+ m_hsmsPassive.setVariableValue("PanelEndID", ((SERVO::CGlass*)pPanel)->getID().c_str());
m_hsmsPassive.requestEventReportSend_Panel_End();
+ auto& db = GlassLogDb::Instance();
+ db.insertFromCGlass((*(SERVO::CGlass*)pPanel));
};
m_master.setListener(masterListener);
m_master.setContinuousTransferCount(m_configuration.getContinuousTransferCount());
--
Gitblit v1.9.3