From a88769e6f5ec9d6d3739d0b56dd9185c9c54009b Mon Sep 17 00:00:00 2001
From: Josh Blum
Date: Fri, 5 Apr 2013 22:02:09 -0500
Subject: uhd: added a usrp PC sync option
---
gr-uhd/grc/gen_uhd_usrp_blocks.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
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 = """\
uhd_usrp_$(sourk)
1
from gnuradio import uhd
+ import time
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)
@@ -165,6 +168,10 @@ self.\$(id).set_bandwidth(\$bw$(n), $n)
unknown PPS
sync
+