aboutsummaryrefslogtreecommitdiffstats
path: root/host/python
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/python
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/python')
-rw-r--r--host/python/uhd/usrp/cal/usrp_calibrator.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/python/uhd/usrp/cal/usrp_calibrator.py b/host/python/uhd/usrp/cal/usrp_calibrator.py
index bb98e045a..c129fb17d 100644
--- a/host/python/uhd/usrp/cal/usrp_calibrator.py
+++ b/host/python/uhd/usrp/cal/usrp_calibrator.py
@@ -91,6 +91,7 @@ class USRPCalibratorBase:
lo_offset = 0.0
min_freq = None
max_freq = None
+ tune_settling_time = 0
def __init__(self, usrp, meas_dev, direction, **kwargs):
self._usrp = usrp
@@ -200,6 +201,7 @@ class USRPCalibratorBase:
self._noise[freq] = {}
tune_req = uhd.types.TuneRequest(freq)
self._usrp.set_rx_freq(tune_req, self._chan)
+ time.sleep(self.tune_settling_time)
for gain in self._gains:
self._usrp.set_rx_gain(gain, self._chan)
self._noise[freq][gain] = get_usrp_power(self._streamer)
@@ -401,6 +403,9 @@ class X410Calibrator(USRPCalibratorBase):
default_rate = 3.84e6
min_freq = 1e6
max_freq = 8e9
+ # X410 non-timed tunes are currently very poke-intensive, so we give it some
+ # time to clear the command queue
+ tune_settling_time = .5
###############################################################################
# The dispatch function