From ff400da5585fbc771e6adc2eae9d2b445be3ad07 Mon Sep 17 00:00:00 2001 From: x07maop Date: Thu, 17 Nov 2016 15:55:36 +0100 Subject: [PATCH] Script execution --- script/local.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/local.py b/script/local.py index 32b7f00..06e6ee1 100644 --- a/script/local.py +++ b/script/local.py @@ -108,6 +108,12 @@ def wait_device(dev, value, timeout=-1): dev.waitValue(value,timeout) print "Done waiting" +def wait_device_in_range(dev, value, range, timeout=-1): + timeout = int(timeout *1000) if timeout>0 else timeout + print "Waiting " + dev.getName() + " = " + str(value) + dev.waitValueInRange(value, range, timeout) + print "Done waiting" + def convert_file(input_file_name, output_file_name, pol = None): print "Converting data file: " + input_file_name + " to " + output_file_name sep = "\t"