summaryrefslogtreecommitdiff
path: root/gr-uhd/grc/gen_uhd_usrp_blocks.py
diff options
context:
space:
mode:
authorNiki <niki@aveer.io>2020-07-09 23:12:10 -0400
committerMartin Braun <martin@gnuradio.org>2021-01-14 08:33:16 -0800
commitc4b33434853e5f5648d08e80d6f65d628f1f17b0 (patch)
tree720223825c806d2af159dfc336f95c75d060d204 /gr-uhd/grc/gen_uhd_usrp_blocks.py
parent9aac44a5d4af07254b446c5e77237e8707325cb6 (diff)
uhd: Add start time capability to GRC bindings
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index b83b06bc89..c2685d6f2e 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -55,6 +55,13 @@ parameters:
options: [sync, pc_clock, none]
option_labels: [Unknown PPS, PC Clock, No Sync]
hide: ${'$'}{ 'none' if sync else 'part'}
+- id: start_time
+ label: Start Time (seconds)
+ dtype: real
+ default: -1.0
+ options: [-1.0]
+ option_labels: [Default]
+ hide: ${'$'}{ 'none' if start_time >= 0.0 else 'part' }
- id: clock_rate
label: Clock Rate (Hz)
dtype: real
@@ -220,6 +227,9 @@ templates:
${'%'} endif
${'%'} endif # nchan > n
% endfor # for n in range(max_nchan)
+ ${'%'} if start_time() >= 0.0:
+ self.${'$'}{id}.set_start_time(uhd.time_spec(${'$'}{start_time}))
+ ${'%'} endif
callbacks:
- set_samp_rate(${'$'}{samp_rate})
% for n in range(max_nchan):