Skip to content

Commit

Permalink
scripts: Force lib-gpa to refresh values for every read
Browse files Browse the repository at this point in the history
  • Loading branch information
felipet committed Jun 29, 2017
1 parent 441e6ef commit c9f9209
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions meas_tools/calib_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+'
Expand Down Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit c9f9209

Please sign in to comment.