From 17cdc48e8dbfe5bdeb1fd021060c6e3fd3dc32a7 Mon Sep 17 00:00:00 2001 From: sunwen Date: Thu, 16 Nov 2023 11:23:38 +0800 Subject: [PATCH] Fix drainage pumb to valve. --- src/device/DeviceManager.cpp | 4 ++-- src/forms/scan/ScanFormWidget.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/device/DeviceManager.cpp b/src/device/DeviceManager.cpp index 926d781..82955d9 100644 --- a/src/device/DeviceManager.cpp +++ b/src/device/DeviceManager.cpp @@ -780,7 +780,7 @@ void DeviceManager::processShutDownDms(const QString& aResponse) void DeviceManager::shutdownOperationSystem() { qDebug()<< "shut down OS"; - //QProcess::startDetached("shutdown", QStringList() << "-h" << "now"); +//QProcess::startDetached("shutdown", QStringList() << "-h" << "now"); } void DeviceManager::insertEmptyScanRecord() @@ -1094,7 +1094,7 @@ bool DeviceManager::getCEStatus() void DeviceManager::controlDrainage(const QString& aCode) { - mPumpControlAction->setSendData(QString("{\"pumb\":%1}").arg(aCode)); + mPumpControlAction->setSendData(QString("{\"valve\":%1}").arg(aCode)); if(!mPumpControlAction->execute()) { emit startPumpControlResult(false); diff --git a/src/forms/scan/ScanFormWidget.cpp b/src/forms/scan/ScanFormWidget.cpp index 89a0d01..c3c5546 100644 --- a/src/forms/scan/ScanFormWidget.cpp +++ b/src/forms/scan/ScanFormWidget.cpp @@ -168,6 +168,7 @@ void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){ }); connect(DeviceManager::Default(), &DeviceManager::startPumpControlResult, [this](bool aIsSucessful) { + mBtnDrainage->setEnabled(true); if(!aIsSucessful) { bool isChecked = mBtnDrainage->isChecked(); @@ -204,6 +205,7 @@ void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){ }); connect(mBtnDrainage, &QToolButton::clicked, [=](bool aSatus) { //Drainage + mBtnDrainage->setEnabled(false); if(aSatus == true) { QString code = "1";