mx_lib: force wait_float_condition to accept only float as value/target
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user