summaryrefslogtreecommitdiff
path: root/gr-uhd/grc
diff options
context:
space:
mode:
authorJosh Blum2013-04-05 22:02:09 -0500
committerJosh Blum2013-06-25 14:13:45 -0700
commita88769e6f5ec9d6d3739d0b56dd9185c9c54009b (patch)
treea57ba0a90e1c950f0ec844ad2fc0bda9acae14b2 /gr-uhd/grc
parent8ac5ef26333baa467bdefa16e30113e611344e95 (diff)
downloadgnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.tar.gz
gnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.tar.bz2
gnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.zip
uhd: added a usrp PC sync option
Diffstat (limited to 'gr-uhd/grc')
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index 25b0a4c46..e392f6a60 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -25,6 +25,7 @@ MAIN_TMPL = """\
<key>uhd_usrp_$(sourk)</key>
<throttle>1</throttle>
<import>from gnuradio import uhd</import>
+ <import>import time</import>
<make>uhd.usrp_$(sourk)(
device_addr=\$dev_addr,
stream_args=uhd.stream_args(
@@ -56,8 +57,10 @@ self.\$(id).set_subdev_spec(\$sd_spec$(m), $m)
\#end if
########################################################################
#end for
-\#if \$sync()
+\#if \$sync() == 'sync'
self.\$(id).set_time_unknown_pps(uhd.time_spec())
+\#elif \$sync() == 'pc_clock'
+self.\$(id).set_time_now(uhd.time_spec(time.time()), uhd.ALL_MBOARDS)
\#end if
self.\$(id).set_samp_rate(\$samp_rate)
#for $n in range($max_nchan)
@@ -166,6 +169,10 @@ self.\$(id).set_bandwidth(\$bw$(n), $n)
<key>sync</key>
</option>
<option>
+ <name>PC Clock</name>
+ <key>pc_clock</key>
+ </option>
+ <option>
<name>don't sync</name>
<key></key>
</option>