aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/cores
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-31 18:19:30 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:58 -0800
commit2bd564ca225cbf1d02eb5025315bb67fe458ba00 (patch)
treed295f722df18cad84a7aa9db6d7f084dfa6b4338 /mpm/python/usrp_mpm/cores
parentd16d342be2dee7fef1f798349eba211cce0f27f9 (diff)
downloaduhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.tar.gz
uhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.tar.bz2
uhd-2bd564ca225cbf1d02eb5025315bb67fe458ba00.zip
mpm: Replaced xrange with range for better Python future-proofing
Diffstat (limited to 'mpm/python/usrp_mpm/cores')
-rw-r--r--mpm/python/usrp_mpm/cores/tdc_sync.py6
1 files changed, 3 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
#
"""
-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: