diff options
author | Josh Blum | 2013-04-05 22:02:09 -0500 |
---|---|---|
committer | Josh Blum | 2013-06-25 14:13:45 -0700 |
commit | a88769e6f5ec9d6d3739d0b56dd9185c9c54009b (patch) | |
tree | a57ba0a90e1c950f0ec844ad2fc0bda9acae14b2 /gr-uhd/grc/gen_uhd_usrp_blocks.py | |
parent | 8ac5ef26333baa467bdefa16e30113e611344e95 (diff) | |
download | gnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.tar.gz gnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.tar.bz2 gnuradio-a88769e6f5ec9d6d3739d0b56dd9185c9c54009b.zip |
uhd: added a usrp PC sync option
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
-rw-r--r-- | gr-uhd/grc/gen_uhd_usrp_blocks.py | 9 |
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> |