From 6f26e5cc3dd0300a5275734d0209a51ef71c4d4f Mon Sep 17 00:00:00 2001 From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:45:28 +0100 Subject: [PATCH] refactor: using motor.readback.read() to access motor coordinates --- 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 1a31427d..051fc959 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.read()[self.motor_x_name]["value"] - y = self.motor_y.read()[self.motor_y_name]["value"] + x = self.motor_x.readback.read()[self.motor_x_name]["value"] + y = self.motor_y.readback.read()[self.motor_y_name]["value"] return x, y def retrieve_coordinates(self) -> tuple: