From 2bd564ca225cbf1d02eb5025315bb67fe458ba00 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 31 May 2017 18:19:30 -0700 Subject: mpm: Replaced xrange with range for better Python future-proofing --- mpm/python/usrp_mpm/cores/tdc_sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mpm/python/usrp_mpm/cores') diff --git a/mpm/python/usrp_mpm/cores/tdc_sync.py b/mpm/python/usrp_mpm/cores/tdc_sync.py index c3cc308a0..6d680d32f 100644 --- a/mpm/python/usrp_mpm/cores/tdc_sync.py +++ b/mpm/python/usrp_mpm/cores/tdc_sync.py @@ -14,7 +14,7 @@ # along with this program. If not, see . # """ -TDC sync foo +TDC clock synchronization """ import time @@ -193,7 +193,7 @@ class ClockSynchronizer(object): # Now, read off 512 measurements and take the mean of them. num_meas = 256 # FIXME back to 512 self.log.trace("Reading {} TDC measurements from device...".format(num_meas)) - current_value = mean([measure_offset() for _ in xrange(num_meas)]) + current_value = mean([measure_offset() for _ in range(num_meas)]) # Run the initial value through the oracle to determine the adjustments to make. target_values = [135e-9,] # only one target for now that all DBs shift to @@ -232,7 +232,7 @@ class ClockSynchronizer(object): Return the offset (in seconds) the whatever what measured and whatever the reference is. """ - for _ in xrange(1000): # TODO replace with poll & timeout + for _ in range(1000): # TODO replace with poll & timeout rtc_offset_msb = self.peek32(self.RTC_OFFSET_1) updated = (rtc_offset_msb & 0x100) == 0x100 if updated: -- cgit v1.2.3