From d844168c1f7f31543ff747bb6f2ef3a2f7f1077e Mon Sep 17 00:00:00 2001 From: appel_c Date: Thu, 28 Mar 2024 10:29:54 +0100 Subject: [PATCH] refactor: add set for positioner protocol --- ophyd_devices/ophyd_base_devices/bec_protocols.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ophyd_devices/ophyd_base_devices/bec_protocols.py b/ophyd_devices/ophyd_base_devices/bec_protocols.py index 8aa1c0e..6343727 100644 --- a/ophyd_devices/ophyd_base_devices/bec_protocols.py +++ b/ophyd_devices/ophyd_base_devices/bec_protocols.py @@ -354,6 +354,19 @@ class BECPositionerProtocol(Protocol): DeviceStatus: DeviceStatus object """ + def set(self, position: float) -> DeviceStatus: + """Set method for positioners. + + In principle, a set command is the same as move. This comes from ophyd upstream. + We will have to review whether BEC requires both. + + Args: + position: position to move to + + Returns: + DeviceStatus: DeviceStatus object + """ + @runtime_checkable class BECFlyerProtocol(BECScanProtocol, Protocol):