From bf819bcf4845c3e7e9f3c3e288a2fb21d20617e1 Mon Sep 17 00:00:00 2001 From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:14:15 +0100 Subject: [PATCH] refactor: motor_example.py get coordinates by .readback.get() method --- bec_widgets/examples/motor_movement/motor_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bec_widgets/examples/motor_movement/motor_example.py b/bec_widgets/examples/motor_movement/motor_example.py index 051fc959..2936ed31 100644 --- a/bec_widgets/examples/motor_movement/motor_example.py +++ b/bec_widgets/examples/motor_movement/motor_example.py @@ -1181,8 +1181,8 @@ class MotorControl(QThread): def get_coordinates(self) -> tuple: """Get current motor position""" - x = self.motor_x.readback.read()[self.motor_x_name]["value"] - y = self.motor_y.readback.read()[self.motor_y_name]["value"] + x = self.motor_x.readback.get() + y = self.motor_y.readback.get() return x, y def retrieve_coordinates(self) -> tuple: