From 894a563ff8a75ea76ee11394a9db6f843ae7877b Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Thu, 13 Nov 2025 10:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0linux=20=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=A0=87=E5=AE=9A=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 5 +++++ realtimeform.cpp | 14 +++++++++++++- realtimeform.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 54e6f9c..5e2b78e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -566,7 +566,12 @@ void MainWindow::leftConfigClick4() pOtherConfig = NULL; } QProcess process(this); +#ifdef Q_OS_WIN32 process.startDetached(".\\Calibration\\NARI3500Calibration.exe"); +#endif +#ifdef Q_OS_LINUX + process.startDetached("./Calibration/NARI3500Calibration"); +#endif }else if(name == "其他配置"){ if(pDIOBoard){ diff --git a/realtimeform.cpp b/realtimeform.cpp index a60ee49..9e9d3e3 100644 --- a/realtimeform.cpp +++ b/realtimeform.cpp @@ -1159,6 +1159,7 @@ void CRealTimeForm::UpdateCharacteristic(QVector<_Charateristic> &m_vecCharateri } } sigRPM(RPM); + m_RPM = RPM; pGraphicTextItem->setPlainText(str); } } @@ -1275,7 +1276,7 @@ void CRealTimeForm::disConnect() { QString str = strTrgStatus + "," + strWCStatus + "," + strinvalid_ch; sigWCStatus(str); sigDOStatus(arrayValueDIs, arrayValueDOs); - if (strWCStatus.contains("停机")) { + if (m_RPM.toDouble() < 5) { if (m_MachineStatus == 1) { LoadGraphicsConfig(2); } @@ -1286,6 +1287,17 @@ void CRealTimeForm::disConnect() { } m_MachineStatus = 1; } +// if (strWCStatus.contains("停机")) { +// if (m_MachineStatus == 1) { +// LoadGraphicsConfig(2); +// } +// m_MachineStatus = 0; +// } else { +// if (m_MachineStatus == 0) { +// LoadGraphicsConfig(0); +// } +// m_MachineStatus = 1; +// } } } m_arrayReady = ""; diff --git a/realtimeform.h b/realtimeform.h index eea8f1e..49bb164 100644 --- a/realtimeform.h +++ b/realtimeform.h @@ -169,6 +169,7 @@ private: NetMgr *m_pNetMgr; //HTTP消息类对象 QVector<_Charateristic> m_vecCharateristic; + QString m_RPM; //重写定时器的事件 虚函数 子类重写父类的虚函数 virtual void timerEvent(QTimerEvent *); };