From 95ead7117e59e0979aec51b85b49537ab728cad4 Mon Sep 17 00:00:00 2001 From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:04:23 +0200 Subject: [PATCH] fix: init_motor_map receive motor position from motor_thread --- .../examples/motor_movement/motor_example.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bec_widgets/examples/motor_movement/motor_example.py b/bec_widgets/examples/motor_movement/motor_example.py index 3e034194..a946e8bd 100644 --- a/bec_widgets/examples/motor_movement/motor_example.py +++ b/bec_widgets/examples/motor_movement/motor_example.py @@ -135,8 +135,8 @@ class MotorApp(QWidget): def init_motor_map(self): # Get motor limits - limit_x_min, limit_x_max = self.get_motor_limits(dev.samx) - limit_y_min, limit_y_max = self.get_motor_limits(dev.samy) + limit_x_min, limit_x_max = self.motor_thread.get_motor_limits(dev.samx) + limit_y_min, limit_y_max = self.motor_thread.get_motor_limits(dev.samy) self.offset_x = limit_x_min self.offset_y = limit_y_min @@ -181,12 +181,12 @@ class MotorApp(QWidget): # Update the display self.image_map.updateImage(self.image_map_data, levels=(0, 255)) - def get_motor_limits(self, motor): - """Get the limits of a motor""" - high_limit = motor.high_limit - low_limit = motor.low_limit - - return low_limit, high_limit + # def get_motor_limits(self, motor): + # """Get the limits of a motor""" + # high_limit = motor.high_limit + # low_limit = motor.low_limit + # + # return low_limit, high_limit def update_all_motor_limits( self, x_limit: list = None, y_limit: list = None