From 75cd5d0d00f451c2bdae9c1cc1e281e9f5eab6ba Mon Sep 17 00:00:00 2001 From: x01dc Date: Mon, 17 Aug 2026 11:31:04 +0200 Subject: [PATCH] fix(flomni,omny): expose motor tolerance to scan-server device proxy self.dev.fsamroy/.osamroy on the scan server is a generic bec_lib Positioner proxy rebuilt from serialized device info, not the real ophyd instance. tolerance was only a plain __init__ attribute, so it was dropped during serialization and flomni_rotation()/rotation() crashed with AttributeError: 'Positioner' object has no attribute 'tolerance'. Register tolerance in USER_ACCESS so it serializes and is reachable via RPC like controller already is. --- csaxs_bec/devices/omny/galil/fupr_ophyd.py | 2 +- csaxs_bec/devices/omny/galil/ogalil_ophyd.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/csaxs_bec/devices/omny/galil/fupr_ophyd.py b/csaxs_bec/devices/omny/galil/fupr_ophyd.py index 9ce05453..368581f3 100644 --- a/csaxs_bec/devices/omny/galil/fupr_ophyd.py +++ b/csaxs_bec/devices/omny/galil/fupr_ophyd.py @@ -113,7 +113,7 @@ class FuprGalilAxesReferenced(GalilAxesReferenced): class FuprGalilMotor(Device, PositionerBase): - USER_ACCESS = ["controller"] + USER_ACCESS = ["controller", "tolerance"] MOTOR_RESOLUTION = 25600 readback = Cpt(FuprGalilReadbackSignal, signal_name="readback", kind="hinted") user_setpoint = Cpt(FuprGalilSetpointSignal, signal_name="setpoint") diff --git a/csaxs_bec/devices/omny/galil/ogalil_ophyd.py b/csaxs_bec/devices/omny/galil/ogalil_ophyd.py index 88bf8399..88110f2b 100644 --- a/csaxs_bec/devices/omny/galil/ogalil_ophyd.py +++ b/csaxs_bec/devices/omny/galil/ogalil_ophyd.py @@ -241,6 +241,7 @@ class OMNYGalilMotor(Device, PositionerBase): "axis_is_referenced", "get_motor_temperature", "folerr_status", + "tolerance", ] readback = Cpt(OMNYGalilReadbackSignal, signal_name="readback", kind="hinted") user_setpoint = Cpt(GalilSetpointSignal, signal_name="setpoint")