From 4752011a1ffabc6cedfeb38284b9c8cc42156908 Mon Sep 17 00:00:00 2001 From: x12sa Date: Thu, 15 Jan 2026 11:19:16 +0100 Subject: [PATCH] Fix Smaract wait for connection --- csaxs_bec/devices/smaract/smaract_ophyd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csaxs_bec/devices/smaract/smaract_ophyd.py b/csaxs_bec/devices/smaract/smaract_ophyd.py index 0e810c2..d17a48a 100644 --- a/csaxs_bec/devices/smaract/smaract_ophyd.py +++ b/csaxs_bec/devices/smaract/smaract_ophyd.py @@ -13,6 +13,7 @@ from ophyd_devices.utils.socket import SocketIO, SocketSignal, raise_if_disconne from csaxs_bec.devices.smaract.smaract_controller import SmaractController from csaxs_bec.devices.smaract.smaract_errors import SmaractCommunicationError, SmaractError +from ophyd.device import DEFAULT_CONNECTION_TIMEOUT logger = bec_logger.logger @@ -153,6 +154,11 @@ class SmaractMotor(Device, PositionerBase): self.low_limit_travel.put(limits[0]) self.high_limit_travel.put(limits[1]) + def wait_for_connection(self, all_signals:bool=False, timeout:float|object = DEFAULT_CONNECTION_TIMEOUT): + self.controller.on() + logger.info(f"Connected to controller") + super().wait_for_connection(all_signals=all_signals, timeout=timeout) + @property def limits(self): return (self.low_limit_travel.get(), self.high_limit_travel.get())