From c9f9209e4d4019d414f56f9126ecb9c2bd291bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Torres=20Gonz=C3=A1lez?= Date: Thu, 29 Jun 2017 17:48:45 +0200 Subject: [PATCH] scripts: Force lib-gpa to refresh values for every read --- meas_tools/calib_params.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meas_tools/calib_params.py b/meas_tools/calib_params.py index e384a30..a3ed399 100755 --- a/meas_tools/calib_params.py +++ b/meas_tools/calib_params.py @@ -34,7 +34,8 @@ import argparse as arg # Define the shell command to retrieve the WR link status -MONITOR = "gpa_ctrl ppsi" +# use -f to force refresh every read +MONITOR = "gpa_ctrl ppsi -f" # Regular expressions RTT_REGEX = r'servo/rtt.*\d+' @@ -62,7 +63,7 @@ def main(): values = [None, ] * args.samples - if args.key == "rtt": + if args.key == "rtt" or args.key == "crtt": regex = RRTT else: print("Invalid key used as argument (%s)" % args.key) @@ -75,7 +76,9 @@ def main(): drxm = int(RRXM.search(statout).group().split(":")[-1].strip()) drxs = int(RRXS.search(statout).group().split(":")[-1].strip()) print("BitSlides: M -> %d ps | S -> %d ps" % (drxm, drxs)) - sub = drxm + drxs + sub = 0 + if args.key == "crtt": + sub = drxm + drxs for i in range(args.samples): statout = subprocess.check_output([MONITOR], shell=True,