Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate pulsed magnets top-up standby control #727

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 40 additions & 31 deletions pyqt-apps/siriushla/as_ap_injection/auxiliary_dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pydm.widgets import PyDMPushButton

from siriuspy.namesys import SiriusPVName
from siriuspy.injctrl.csdev import Const as InjCtrlConst

from ..widgets import SiriusDialog, SiriusWaveformPlot, \
SiriusEnumComboBox, SiriusSpinbox, SiriusLabel, \
Expand Down Expand Up @@ -511,17 +512,6 @@ def _setupUi(self):
'<h4>Top Up Standby and Warm Up Settings</h4>', self,
alignment=Qt.AlignCenter)

pvname = self._inj_prefix.substitute(propty='TopUpPUStandbyEnbl-Sel')
self._sb_tupuenb = PyDMStateButton(self, pvname)
self._led_tupuenb = SiriusLedState(
self, pvname.substitute(propty_suffix='Sts'))

pvname = self._inj_prefix.substitute(propty='TopUpPUWarmUpTime-SP')
self._sb_tuputim = SiriusSpinbox(self, pvname)
self._lb_tuputim = SiriusLabel(
self, pvname.substitute(propty_suffix='RB'), keep_unit=True)
self._lb_tuputim.showUnits = True

pvname = self._inj_prefix.substitute(propty='TopUpLIWarmUpEnbl-Sel')
self._sb_tulienb = PyDMStateButton(self, pvname)
self._led_tulienb = SiriusLedState(
Expand Down Expand Up @@ -559,26 +549,45 @@ def _setupUi(self):
lay.addWidget(title, 0, 0, 1, 5)
lay.addWidget(QLabel('Enable State'), 1, 1, 1, 2)
lay.addWidget(QLabel('Warm Up Time'), 1, 3, 1, 2)
lay.addWidget(QLabel('AS PU Standby'), 2, 0)
lay.addWidget(self._sb_tupuenb, 2, 1)
lay.addWidget(self._led_tupuenb, 2, 2)
lay.addWidget(self._sb_tuputim, 2, 3)
lay.addWidget(self._lb_tuputim, 2, 4)
lay.addWidget(QLabel('LI PU/RF Warm Up'), 3, 0)
lay.addWidget(self._sb_tulienb, 3, 1)
lay.addWidget(self._led_tulienb, 3, 2)
lay.addWidget(self._sb_tulitim, 3, 3)
lay.addWidget(self._lb_tulitim, 3, 4)
lay.addWidget(QLabel('BO PS Standby'), 4, 0)
lay.addWidget(self._sb_tubopsenb, 4, 1)
lay.addWidget(self._led_tubopsenb, 4, 2)
lay.addWidget(self._sb_tubopstim, 4, 3)
lay.addWidget(self._lb_tubopstim, 4, 4)
lay.addWidget(QLabel('BO RF Standby'), 5, 0)
lay.addWidget(self._sb_tuborfenb, 5, 1)
lay.addWidget(self._led_tuborfenb, 5, 2)
lay.addWidget(self._sb_tuborftim, 5, 3)
lay.addWidget(self._lb_tuborftim, 5, 4)
lay.addWidget(QLabel('LI PU/RF Warm Up'), 2, 0)
lay.addWidget(self._sb_tulienb, 2, 1)
lay.addWidget(self._led_tulienb, 2, 2)
lay.addWidget(self._sb_tulitim, 2, 3)
lay.addWidget(self._lb_tulitim, 2, 4)
lay.addWidget(QLabel('BO PS Standby'), 3, 0)
lay.addWidget(self._sb_tubopsenb, 3, 1)
lay.addWidget(self._led_tubopsenb, 3, 2)
lay.addWidget(self._sb_tubopstim, 3, 3)
lay.addWidget(self._lb_tubopstim, 3, 4)
lay.addWidget(QLabel('BO RF Standby'), 4, 0)
lay.addWidget(self._sb_tuborfenb, 4, 1)
lay.addWidget(self._led_tuborfenb, 4, 2)
lay.addWidget(self._sb_tuborftim, 4, 3)
lay.addWidget(self._lb_tuborftim, 4, 4)

row = 5
for idx, nick in enumerate(InjCtrlConst.TOPUP_STANDBY_PUNICKNAMES):
propty = f'TopUp{nick}StandbyEnbl-Sel'
pvname = self._inj_prefix.substitute(propty=propty)
sb_tupuenb = PyDMStateButton(self, pvname)
led_tupuenb = SiriusLedState(
self, pvname.substitute(propty_suffix='Sts'))

propty = f'TopUp{nick}WarmUpTime-SP'
pvname = self._inj_prefix.substitute(propty=propty)
sb_tuputim = SiriusSpinbox(self, pvname)
lb_tuputim = SiriusLabel(
self, pvname.substitute(propty_suffix='RB'), keep_unit=True)
lb_tuputim.showUnits = True

name = InjCtrlConst.TOPUP_STANDBY_PUNAMES[idx]
lay.addWidget(QLabel(f'{name} Standby'), row, 0)
lay.addWidget(sb_tupuenb, row, 1)
lay.addWidget(led_tupuenb, row, 2)
lay.addWidget(sb_tuputim, row, 3)
lay.addWidget(lb_tuputim, row, 4)

row += 1

self.setStyleSheet('QLabel{qproperty-alignment: AlignCenter;}')

Expand Down