rework motor tweak
This commit is contained in:
13
zoom.py
13
zoom.py
@@ -70,7 +70,7 @@ class Zoom(QGroupBox, Ui_Zoom):
|
||||
buttons=((1, "1"), (200, "200"), (400, "400"), (600, "600"), (800, "800"), (1000, "1000"),)
|
||||
|
||||
zoom=QApplication.instance()._zoom
|
||||
current_zoom_value = zoom.get_rb()
|
||||
current_zoom_value = zoom.get_val()
|
||||
|
||||
# zoom widgets
|
||||
layout = QVBoxLayout()
|
||||
@@ -306,21 +306,22 @@ class QopticZoom(object):
|
||||
self._pv[name]=pv
|
||||
return pv
|
||||
|
||||
def get_rb(self) -> int:
|
||||
# get_rb somtimes lags. therefore get_sp will get the last set_point without usage of pvs
|
||||
def get_rbv(self) -> int:
|
||||
# get_rbv lags. therefore get_val is often the better choicewill get the last set_point without usage of pvs
|
||||
# default do not get the RBV, because this might be delayed
|
||||
try:
|
||||
pv = self.getPv('POS_RB') #default do not get the RBV, because this might be delayed
|
||||
pv = self.getPv('POS_RB')
|
||||
except AttributeError:
|
||||
val=self._val; _log.debug('simulated mode:{}'.format(val))
|
||||
return val
|
||||
else:
|
||||
return pv.get()
|
||||
|
||||
def get_sp(self) -> int:
|
||||
def get_val(self) -> int:
|
||||
try:
|
||||
val=self._val
|
||||
except AttributeError:
|
||||
pv=self.getPv('POS_RB') # default do not get the RBV, because this might be delayed
|
||||
pv=self.getPv('POS_SP')
|
||||
self._val=val=pv.get()
|
||||
return val
|
||||
|
||||
|
||||
Reference in New Issue
Block a user