summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Demel <demel@ant.uni-bremen.de>2020-06-22 17:19:39 +0200
committermormj <34754695+mormj@users.noreply.github.com>2020-06-24 12:41:16 -0400
commit3790e10d86435f7b6f3dcc70647c1041d7e16ff2 (patch)
tree783975d541e81e90418143c0d213d9aa58ddffa2
parent6246f5a4b2b4c51476ad3e60d00cfe774e5fceda (diff)
uhd: Add default value to uhd.time_spec call
With pybind11 `uhd.time_spec()` doesn't work anymore because default values are not defined.
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index d49a427dc2..6b9eb938b7 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -147,7 +147,7 @@ templates:
${'%'} if clock_rate():
self.${'$'}{id}.set_clock_rate(${'$'}{clock_rate}, uhd.ALL_MBOARDS)
${'%'} endif
-
+
% for m in range(max_mboards):
${'%'} if context.get('num_mboards')() > ${m}:
########################################################################
@@ -165,28 +165,28 @@ templates:
########################################################################
${'%'} endif
% endfor # for m in range(max_mboards)
-
+
self.${'$'}{id}.set_samp_rate(${'$'}{samp_rate})
-
+
${'%'} if sync == 'sync':
- self.${'$'}{id}.set_time_unknown_pps(uhd.time_spec())
+ self.${'$'}{id}.set_time_unknown_pps(uhd.time_spec(0))
${'%'} elif sync == 'pc_clock':
self.${'$'}{id}.set_time_now(uhd.time_spec(time.time()), uhd.ALL_MBOARDS)
${'%'} else:
# No synchronization enforced.
${'%'} endif
-
+
% for n in range(max_nchan):
${'%'} if context.get('nchan')() > ${n}:
self.${'$'}{id}.set_center_freq(${'$'}{${'center_freq' + str(n)}}, ${n})
-
+
${'%'} if context.get('ant${n}')():
self.${'$'}{id}.set_antenna(${'$'}{${'ant' + str(n)}}, ${n})
${'%'} endif
${'%'} if context.get('bw${n}')():
self.${'$'}{id}.set_bandwidth(${'$'}{${'bw' + str(n)}}, ${n})
${'%'} endif
-
+
% if sourk == 'source':
${'%'} if context.get('rx_agc${n}')() == 'Enabled':
self.${'$'}{id}.set_rx_agc(True, ${n})
@@ -213,7 +213,7 @@ templates:
self.${'$'}{id}.set_gain(${'$'}{${'gain' + str(n)}}, ${n})
${'%'} endif
% endif # if sourk == 'source'
-
+
${'%'} if context.get('show_lo_controls')():
self.${'$'}{id}.set_lo_source(${'$'}{${'lo_source' + str(n)}}, uhd.ALL_LOS, ${n})
self.${'$'}{id}.set_lo_export_enabled(${'$'}{${'lo_export' + str(n)}}, uhd.ALL_LOS, ${n})
@@ -306,7 +306,7 @@ cpp_templates:
${'%'} else:
// No synchronization enforced.
${'%'} endif
- link: ['gnuradio-uhd uhd']
+ link: ['gnuradio-uhd uhd']
callbacks:
- set_samp_rate(${'$'}{samp_rate})
% for n in range(max_nchan):