Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 5th, 2013  |  syntax: None  |  size: 1.32 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
  2. index 25b0a4c..e392f6a 100644
  3. --- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
  4. +++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
  5. @@ -25,6 +25,7 @@ MAIN_TMPL = """\
  6.         <key>uhd_usrp_$(sourk)</key>
  7.         <throttle>1</throttle>
  8.         <import>from gnuradio import uhd</import>
  9. +       <import>import time</import>
  10.         <make>uhd.usrp_$(sourk)(
  11.         device_addr=\$dev_addr,
  12.         stream_args=uhd.stream_args(
  13. @@ -56,8 +57,10 @@ self.\$(id).set_subdev_spec(\$sd_spec$(m), $m)
  14.  \#end if
  15.  ########################################################################
  16.  #end for
  17. -\#if \$sync()
  18. +\#if \$sync() == 'sync'
  19.  self.\$(id).set_time_unknown_pps(uhd.time_spec())
  20. +\#elif \$sync() == 'pc_clock'
  21. +self.\$(id).set_time_now(uhd.time_spec(time.time()), uhd.ALL_MBOARDS)
  22.  \#end if
  23.  self.\$(id).set_samp_rate(\$samp_rate)
  24.  #for $n in range($max_nchan)
  25. @@ -166,6 +169,10 @@ self.\$(id).set_bandwidth(\$bw$(n), $n)
  26.                         <key>sync</key>
  27.                 </option>
  28.                 <option>
  29. +                       <name>PC Clock</name>
  30. +                       <key>pc_clock</key>
  31. +               </option>
  32. +               <option>
  33.                         <name>don't sync</name>
  34.                         <key></key>
  35.                 </option>
clone this paste RAW Paste Data