From b3a961095b9629851aecb8905d2d4fb77d7f9e85 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Tue, 24 Feb 2026 14:49:40 +0100 Subject: [PATCH] mx_lib: force wait_float_condition to accept only float as value/target --- src/aare/devices/mx_lib.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/aare/devices/mx_lib.py b/src/aare/devices/mx_lib.py index 312880d5..6e4a7498 100644 --- a/src/aare/devices/mx_lib.py +++ b/src/aare/devices/mx_lib.py @@ -119,7 +119,7 @@ def wait_string_condition(pv: PV, target: Union[str, re.Pattern], *, timeout: fl raise TimeoutError(f"timeout waiting for string {pv.pvname} == {target}; actual value == {pv.char_value}") -def wait_float_condition(pv: PV, value, *, timeout: float = 60.0, +def wait_float_condition(pv: PV, value:float, *, timeout: float = 60.0, polling: float = 0.1, tolerance: float| None = None): """wait until an epics.PV of type double reaches value pv: epics.PV @@ -143,8 +143,6 @@ def wait_float_condition(pv: PV, value, *, timeout: float = 60.0, raises: TimeoutError if a timeout occurs """ - if not (isinstance(pv, PV) and "double" not in pv.type): - raise AttributeError("argument 'pv' must be an epics.PV of type double") try: value = float(value)