summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>