refactoring and log of coorinate work
This commit is contained in:
@@ -80,7 +80,7 @@ class SmaractMotorTweak(QWidget, Ui_MotorTweak):
|
||||
|
||||
self.set_motor_validator()
|
||||
self._drive_val.setText(self._pv_drive.get(as_string=True))
|
||||
self._drive_val.returnPressed.connect(self.move_motor_to_position)
|
||||
self._drive_val.returnPressed.connect(self.move_abs)
|
||||
|
||||
self.jog_forward.hide()
|
||||
self.jog_reverse.hide()
|
||||
@@ -120,7 +120,7 @@ class SmaractMotorTweak(QWidget, Ui_MotorTweak):
|
||||
lineedit.setValidator(QDoubleValidator(min, max, 5, lineedit))
|
||||
|
||||
|
||||
def move_relative(self, dist, delay=None):
|
||||
def move_rel(self, dist, delay=None):
|
||||
cur = self._pv_readback.get()
|
||||
target = cur + dist
|
||||
if delay:
|
||||
@@ -158,7 +158,7 @@ class SmaractMotorTweak(QWidget, Ui_MotorTweak):
|
||||
def is_done(self):
|
||||
return self._pv_status.get() in (0, 3)
|
||||
|
||||
def move_motor_to_position(self, drive=None, wait=False, assert_position=False):
|
||||
def move_abs(self, drive=None, wait=False, assert_position=False):
|
||||
if assert_position:
|
||||
wait=True
|
||||
if drive is None:
|
||||
|
||||
Reference in New Issue
Block a user