Skip to content

Commit

Permalink
Merge pull request #711 from lnls-sirius/ivu_spu
Browse files Browse the repository at this point in the history
Update IDs
  • Loading branch information
xresende authored Oct 8, 2024
2 parents ec4891f + 60eb049 commit 08f806d
Show file tree
Hide file tree
Showing 5 changed files with 462 additions and 23 deletions.
10 changes: 5 additions & 5 deletions pyqt-apps/scripts/sirius-hla-si-id-control.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from siriushla.sirius_application import SiriusApplication
from siriuspy.envars import VACA_PREFIX
from siriushla.si_id_control import IDControl, APUControlWindow, \
PAPUControlWindow, DELTAControlWindow
DELTAControlWindow, IVUControlWindow


parser = _argparse.ArgumentParser(
Expand All @@ -25,15 +25,15 @@
isall = args.isall

app = SiriusApplication()
if 'PAPU' in args.device:
app.open_window(
PAPUControlWindow, parent=None, prefix=prefix, device=device)
elif 'APU' in args.device:
if 'APU' in args.device:
app.open_window(
APUControlWindow, parent=None, prefix=prefix, device=device)
elif 'DELTA' in args.device:
app.open_window(
DELTAControlWindow, parent=None, prefix=prefix, device=device)
elif 'IVU' in args.device:
app.open_window(
IVUControlWindow, parent=None, prefix=prefix, device=device)
elif not device or isall:
app.open_window(IDControl, parent=None, prefix=prefix)
sys.exit(app.exec_())
6 changes: 3 additions & 3 deletions pyqt-apps/siriushla/as_ap_launcher/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ def _create_id_menu(self):
self.add_object_to_level1(menu, All)

idlist = ['SI-06SB:ID-APU22', 'SI-07SP:ID-APU22',
'SI-08SB:ID-APU22', 'SI-09SA:ID-APU22',
'SI-11SP:ID-APU58', 'SI-10SB:ID-DELTA52',
'SI-17SA:ID-PAPU50']
'SI-08SB:ID-IVU18', 'SI-09SA:ID-APU22',
'SI-10SB:ID-DELTA52', 'SI-11SP:ID-APU58',
'SI-14SB:ID-IVU18', 'SI-17SA:ID-APU22']
for idname in idlist:
idname = SiriusPVName(idname)
beamline = IDSearch.conv_idname_2_beamline(idname)
Expand Down
3 changes: 2 additions & 1 deletion pyqt-apps/siriushla/si_id_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
from .apu import APUControlWindow
# from .epu import EPUControlWindow
from .delta import DELTAControlWindow
from .papu import PAPUControlWindow
# from .papu import PAPUControlWindow
from .ivu import IVUControlWindow
from .id_control import IDControl
47 changes: 33 additions & 14 deletions pyqt-apps/siriushla/si_id_control/id_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from .apu import APUSummaryHeader, APUSummaryWidget
from .delta import DELTASummaryHeader, DELTASummaryWidget
from .papu import PAPUSummaryHeader, PAPUSummaryWidget
from .ivu import IVUSummaryHeader, IVUSummaryWidget
from .util import get_id_icon


Expand Down Expand Up @@ -60,16 +60,16 @@ def _setupUi(self):
self._gbox_epu = QGroupBox('DELTA', self)
self._gbox_epu.setLayout(self._setupDELTALayout())

self._gbox_papu = QGroupBox('PAPU', self)
self._gbox_papu.setLayout(self._setupPAPULayout())
self._gbox_ivu = QGroupBox('IVU', self)
self._gbox_ivu.setLayout(self._setupIVULayout())

lay = QGridLayout(cwid)
lay.addWidget(self.label_mov1, 0, 0)
lay.addWidget(label, 0, 1)
lay.addWidget(self.label_mov2, 0, 2)
lay.addWidget(self._gbox_apu, 1, 0, 1, 3)
lay.addWidget(self._gbox_epu, 2, 0, 1, 3)
lay.addWidget(self._gbox_papu, 3, 0, 1, 3)
lay.addWidget(self._gbox_ivu, 3, 0, 1, 3)
lay.setColumnStretch(0, 1)
lay.setColumnStretch(1, 15)
lay.setColumnStretch(2, 1)
Expand All @@ -82,8 +82,8 @@ def _setupAPULayout(self):
lay.addWidget(self._apu_header)

idlist = ['SI-06SB:ID-APU22', 'SI-07SP:ID-APU22',
'SI-08SB:ID-APU22', 'SI-09SA:ID-APU22',
'SI-11SP:ID-APU58']
'SI-09SA:ID-APU22', 'SI-11SP:ID-APU58',
'SI-17SA:ID-APU22']
for idname in idlist:
apu_wid = APUSummaryWidget(self, self._prefix, idname)
lay.addWidget(apu_wid)
Expand Down Expand Up @@ -132,26 +132,45 @@ def _setupDELTALayout(self):
self._channels_mov.append(ch_mov)

return lay

def _setupPAPULayout(self):
def _setupIVULayout(self):
lay = QVBoxLayout()
lay.setAlignment(Qt.AlignTop)

self._epu_header = PAPUSummaryHeader(self)
lay.addWidget(self._epu_header)
self._delta_header = IVUSummaryHeader(self)
lay.addWidget(self._delta_header)

idlist = ['SI-17SA:ID-PAPU50', ]
idlist = ['SI-08SB:ID-IVU18', 'SI-14SB:ID-IVU18']
for idname in idlist:
epu_wid = PAPUSummaryWidget(self, self._prefix, idname)
lay.addWidget(epu_wid)
self._id_widgets.append(epu_wid)
delta_wid = IVUSummaryWidget(self, self._prefix, idname)
lay.addWidget(delta_wid)
self._id_widgets.append(delta_wid)
ch_mov = SiriusConnectionSignal(_PVName(idname).substitute(
prefix=self._prefix, propty='Moving-Mon'))
ch_mov.new_value_signal[int].connect(self._handle_moving_vis)
self._channels_mov.append(ch_mov)

return lay

# def _setupPAPULayout(self):
# lay = QVBoxLayout()
# lay.setAlignment(Qt.AlignTop)

# self._epu_header = PAPUSummaryHeader(self)
# lay.addWidget(self._epu_header)

# idlist = ['SI-17SA:ID-PAPU50', ]
# for idname in idlist:
# epu_wid = PAPUSummaryWidget(self, self._prefix, idname)
# lay.addWidget(epu_wid)
# self._id_widgets.append(epu_wid)
# ch_mov = SiriusConnectionSignal(_PVName(idname).substitute(
# prefix=self._prefix, propty='Moving-Mon'))
# ch_mov.new_value_signal[int].connect(self._handle_moving_vis)
# self._channels_mov.append(ch_mov)

# return lay

def _create_actions(self):
self.blctrl_enbl_act = QAction("Enable Beamline Control", self)
self.blctrl_enbl_act.triggered.connect(
Expand Down
Loading

0 comments on commit 08f806d

Please sign in to comment.