aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-06-23 10:30:12 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-06-24 12:05:49 -0500
commit8708164ac80763c473c11f95dbf79c16f8d5adf1 (patch)
tree2c81289bdab2a819ea076614a1c725612afe390d /host/utils
parent7044fcdca577c798b60370d988337d6a113cb639 (diff)
downloaduhd-8708164ac80763c473c11f95dbf79c16f8d5adf1.tar.gz
uhd-8708164ac80763c473c11f95dbf79c16f8d5adf1.tar.bz2
uhd-8708164ac80763c473c11f95dbf79c16f8d5adf1.zip
cal: Add tune-settling time
This is a device-specific parameter to allow for the tune to settle before proceeding with the calibration. On X410, we set this time to 500 ms. On other devices, we leave it at 0.
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/uhd_power_cal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/utils/uhd_power_cal.py b/host/utils/uhd_power_cal.py
index b9029cc60..70fcbbde6 100644
--- a/host/utils/uhd_power_cal.py
+++ b/host/utils/uhd_power_cal.py
@@ -9,6 +9,7 @@ Utility to run power calibrations with USRPs
"""
import sys
+import time
import math
import pickle
import argparse
@@ -180,6 +181,7 @@ class CalRunner:
print("=== Running calibration at frequency {:.3f} MHz...".format(freq / 1e6))
tune_req = uhd.types.TuneRequest(freq, self.lo_offset)
getattr(self.usrp, 'set_{}_freq'.format(self.dir))(tune_req, chan)
+ time.sleep(self.usrp_cal.tune_settling_time)
actual_freq = getattr(self.usrp, 'get_{}_freq'.format(self.dir))(chan)
if abs(actual_freq - freq) > 1.0:
print("WARNING: Frequency was coerced from {:.2f} MHz to {:.2f} MHz!"