mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(positioner_box): fixed motor moving flags for spinner
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import uuid
|
||||
from abc import abstractmethod
|
||||
from ast import Tuple
|
||||
from typing import Callable, TypedDict
|
||||
|
||||
from bec_lib.device import Positioner
|
||||
@ -140,10 +139,12 @@ class PositionerBoxBase(BECWidget, CompactPopupWidget):
|
||||
if setpoint_val is not None:
|
||||
break
|
||||
|
||||
for moving_signal in ["motor_done_move", "motor_is_moving"]:
|
||||
is_moving = signals.get(f"{device}_{moving_signal}", {}).get("value")
|
||||
if is_moving is not None:
|
||||
break
|
||||
if f"{device}_motor_done_move" in signals:
|
||||
is_moving = not signals[f"{device}_motor_done_move"].get("value")
|
||||
elif f"{device}_motor_is_moving" in signals:
|
||||
is_moving = signals[f"{device}_motor_is_moving"].get("value")
|
||||
else:
|
||||
is_moving = None
|
||||
|
||||
if is_moving is not None:
|
||||
spinner.setVisible(True)
|
||||
|
@ -23,8 +23,8 @@ class SpinnerWidget(QWidget):
|
||||
self.timer = QTimer(self)
|
||||
self.timer.timeout.connect(self.rotate)
|
||||
self.time = 0
|
||||
self.duration = 50
|
||||
self.speed = 50
|
||||
self.duration = 40
|
||||
self.speed = 40
|
||||
self._started = False
|
||||
|
||||
def start(self):
|
||||
|
Reference in New Issue
Block a user