0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

refactor: motor_example.py get coordinates by .readback.get() method

This commit is contained in:
wyzula-jan
2024-01-15 16:14:15 +01:00
parent 6f26e5cc3d
commit bf819bcf48

View File

@ -1181,8 +1181,8 @@ class MotorControl(QThread):
def get_coordinates(self) -> tuple: def get_coordinates(self) -> tuple:
"""Get current motor position""" """Get current motor position"""
x = self.motor_x.readback.read()[self.motor_x_name]["value"] x = self.motor_x.readback.get()
y = self.motor_y.readback.read()[self.motor_y_name]["value"] y = self.motor_y.readback.get()
return x, y return x, y
def retrieve_coordinates(self) -> tuple: def retrieve_coordinates(self) -> tuple: