switch to motorRecord Smaract
This commit is contained in:
27
swissmx.py
27
swissmx.py
@@ -143,7 +143,6 @@ from PyQt5.uic import loadUiType
|
||||
ts.log('Import part 4/8:')
|
||||
import pyqtUsrObj as UsrGO
|
||||
from epics_widgets.MotorTweak import MotorTweak
|
||||
from epics_widgets.SmaractMotorTweak import SmaractMotorTweak
|
||||
from epics_widgets.SimMotorTweak import SimMotorTweak
|
||||
ts.log('Import part 5/8:')
|
||||
import numpy as np
|
||||
@@ -906,7 +905,7 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
if sim&0x20:
|
||||
m_tw=SimMotorTweak()
|
||||
else:
|
||||
m_tw=SmaractMotorTweak()
|
||||
m_tw=MotorTweak()
|
||||
m_tw.connect_motor(rec, **kwargs)
|
||||
self.tweakers[kwargs['alias']] = m_tw
|
||||
return m_tw
|
||||
@@ -1019,6 +1018,8 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
|
||||
def build_group_collimator(self, toolbox):
|
||||
pfx=QApplication.instance()._cfg.value(AppCfg.GBL_DEV_PREFIX)[1]
|
||||
_log.warning('TODO: cleanup PV names!!!')
|
||||
pfx='SARES30-SMX'
|
||||
c=QWidget()
|
||||
c.setLayout(QGridLayout())
|
||||
f=lambda v: lambda x:self.move_collimator(v) #needs nested lambda to work ...
|
||||
@@ -1027,8 +1028,8 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
but.clicked.connect(f(v))
|
||||
c.layout().addWidget(but, 0, i)
|
||||
widgets = [
|
||||
self.get_tweaker(f"{pfx}1", alias="colli_x", label="colli X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}2", alias="colli_y", label="colli Y", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS1", alias="colli_x", label="colli X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS2", alias="colli_y", label="colli Y", mtype=1,),
|
||||
c,
|
||||
]
|
||||
qutilities.add_item_to_toolbox(toolbox,"Collimator",widget_list=widgets)
|
||||
@@ -1036,12 +1037,14 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
|
||||
def build_group_posttube(self, toolbox):
|
||||
pfx=QApplication.instance()._cfg.value(AppCfg.GBL_DEV_PREFIX)[1]
|
||||
_log.warning('TODO: cleanup PV names!!!')
|
||||
pfx='SARES30-SMX'
|
||||
widgets = [
|
||||
self.get_tweaker(f"{pfx}4", alias="tube_usx", label="upstream X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}6", alias="tube_usy", label="upstream Y", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}5", alias="tube_dsx", label="downstream X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}7", alias="tube_dsy", label="downstream Y", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}8", alias="tube_z", label="tube Z", mtype=1),
|
||||
self.get_tweaker(f"{pfx}:MCS4", alias="tube_usx", label="upstream X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS6", alias="tube_usy", label="upstream Y", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS5", alias="tube_dsx", label="downstream X", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS7", alias="tube_dsy", label="downstream Y", mtype=1,),
|
||||
self.get_tweaker(f"{pfx}:MCS8", alias="tube_z", label="tube Z", mtype=1),
|
||||
]
|
||||
c = QWidget()
|
||||
c.setLayout(QGridLayout())
|
||||
@@ -1067,9 +1070,11 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
|
||||
def build_group_xeye(self, toolbox):
|
||||
pfx=QApplication.instance()._cfg.value(AppCfg.GBL_DEV_PREFIX)[1]
|
||||
_log.warning('TODO: cleanup PV names!!!')
|
||||
pfx='SARES30-SMX'
|
||||
widgets=[
|
||||
self.get_tweaker(f"{pfx}14", alias="xeye_x", label="X", mtype=1),
|
||||
self.get_tweaker(f"{pfx}15", alias="xeye_y", label="Y", mtype=1),
|
||||
self.get_tweaker(f"{pfx}:MCS14", alias="xeye_x", label="X", mtype=1),
|
||||
self.get_tweaker(f"{pfx}:MCS15", alias="xeye_y", label="Y", mtype=1),
|
||||
]
|
||||
qutilities.add_item_to_toolbox(toolbox,"X-Ray Eye",widget_list=widgets)
|
||||
WndSwissMx.pv_monitor_add(widgets)
|
||||
|
||||
Reference in New Issue
Block a user