Skip to content

Commit

Permalink
Add EMA and PNR IVUs with a IVU layout duplicated from the DELTA layout
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelLyra8 committed Oct 7, 2024
1 parent f05304b commit 60eb049
Show file tree
Hide file tree
Showing 5 changed files with 453 additions and 9 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_())
5 changes: 3 additions & 2 deletions pyqt-apps/siriushla/as_ap_launcher/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,9 @@ def _create_id_menu(self):
self.add_object_to_level1(menu, All)

idlist = ['SI-06SB:ID-APU22', 'SI-07SP:ID-APU22',
'SI-09SA:ID-APU22', 'SI-11SP:ID-APU58',
'SI-10SB:ID-DELTA52', 'SI-17SA:ID-APU22']
'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
25 changes: 24 additions & 1 deletion 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,12 +60,16 @@ def _setupUi(self):
self._gbox_epu = QGroupBox('DELTA', self)
self._gbox_epu.setLayout(self._setupDELTALayout())

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_ivu, 3, 0, 1, 3)
lay.setColumnStretch(0, 1)
lay.setColumnStretch(1, 15)
lay.setColumnStretch(2, 1)
Expand Down Expand Up @@ -128,6 +132,25 @@ def _setupDELTALayout(self):
self._channels_mov.append(ch_mov)

return lay

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

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

idlist = ['SI-08SB:ID-IVU18', 'SI-14SB:ID-IVU18']
for idname in idlist:
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()
Expand Down
Loading

0 comments on commit 60eb049

Please sign in to comment.