mx_lib: force wait_float_condition to accept only float as value/target

This commit is contained in:
2026-02-24 14:49:40 +01:00
parent ce11e2bb55
commit b3a961095b
+1 -3
View File
@@ -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)