From 6cb66dd4b39e2ab74f4afd1ebf209d5ba2e058a4 Mon Sep 17 00:00:00 2001 From: Giacomo Strangolino <giacomo.strangolino@elettra.eu> Date: Fri, 6 May 2022 09:17:56 +0200 Subject: [PATCH] #16752 : change Fix push button logic: executes three operations in sequence --- src/4uhv.cpp | 1 + src/channel.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/4uhv.cpp b/src/4uhv.cpp index 5501b33..0eae64d 100644 --- a/src/4uhv.cpp +++ b/src/4uhv.cpp @@ -72,6 +72,7 @@ void FourUHV::onPsListReady(const CuData &da) { const QString& s = w->property("point").toString(); if(s.contains("%1")) w->setProperty("source", QString(s).arg(ch)); } + // object name like pbFix3k, pbFix5k if(w->property("target").isValid() || w->objectName().contains(QRegularExpression("pbFix\\dk"))) { const QString& t = w->property("point").toString(); if(t.contains("%1")) { diff --git a/src/channel.cpp b/src/channel.cpp index 03883f1..ec0002f 100644 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -17,9 +17,13 @@ Channel::~Channel() } void Channel::onPbFixClicked() { - const QString& t0 = QString("$1/Fixed%1(1)").arg(sender()->property("channel").toInt()); + // FixedX(0) then VTargetX(NNNN) then FixedX(1) where X is the channel and NNNN the voltage + // properties set in FourUHV::onPsListReady + const QString& t0 = QString("$1/Fixed%1(0)").arg(sender()->property("channel").toInt()); const QString& t1 = sender()->property("target").toString(); - foreach(const QString& t, QStringList() << t0 << t1) { + const QString& t2 = QString("$1/Fixed%1(1))").arg(sender()->property("channel").toInt()); + + foreach(const QString& t, QStringList() << t0 << t1 << t2) { QuWriter *w = new QuWriter(this, cu_pool, m_ctrl_fpool); w->setAutoDestroy(true); w->setTarget(t); -- GitLab