Fix drainage pumb to valve.
This commit is contained in:
@@ -1094,7 +1094,7 @@ bool DeviceManager::getCEStatus()
|
|||||||
|
|
||||||
void DeviceManager::controlDrainage(const QString& aCode)
|
void DeviceManager::controlDrainage(const QString& aCode)
|
||||||
{
|
{
|
||||||
mPumpControlAction->setSendData(QString("{\"pumb\":%1}").arg(aCode));
|
mPumpControlAction->setSendData(QString("{\"valve\":%1}").arg(aCode));
|
||||||
if(!mPumpControlAction->execute())
|
if(!mPumpControlAction->execute())
|
||||||
{
|
{
|
||||||
emit startPumpControlResult(false);
|
emit startPumpControlResult(false);
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){
|
|||||||
});
|
});
|
||||||
connect(DeviceManager::Default(), &DeviceManager::startPumpControlResult, [this](bool aIsSucessful)
|
connect(DeviceManager::Default(), &DeviceManager::startPumpControlResult, [this](bool aIsSucessful)
|
||||||
{
|
{
|
||||||
|
mBtnDrainage->setEnabled(true);
|
||||||
if(!aIsSucessful)
|
if(!aIsSucessful)
|
||||||
{
|
{
|
||||||
bool isChecked = mBtnDrainage->isChecked();
|
bool isChecked = mBtnDrainage->isChecked();
|
||||||
@@ -204,6 +205,7 @@ void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){
|
|||||||
});
|
});
|
||||||
connect(mBtnDrainage, &QToolButton::clicked, [=](bool aSatus) {
|
connect(mBtnDrainage, &QToolButton::clicked, [=](bool aSatus) {
|
||||||
//Drainage
|
//Drainage
|
||||||
|
mBtnDrainage->setEnabled(false);
|
||||||
if(aSatus == true)
|
if(aSatus == true)
|
||||||
{
|
{
|
||||||
QString code = "1";
|
QString code = "1";
|
||||||
|
|||||||
Reference in New Issue
Block a user