summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-01-04 15:30:10 -0800
committerMartin Braun <martin.braun@ettus.com>2019-01-04 16:43:10 -0800
commit84a479f3a895f366bcebc4f3d8e8c699d10f409d (patch)
treea54a63ed33931c87ef81901c40467bda6821694e /gr-uhd
parent3d32b5e9afd1b2df89d769d5eb399ac5b18399ec (diff)
uhd: grc: Don't set antenna if no value is given
For some attributes in the GRC bindings, we'd skip the setters at make() time when no value was given. This also adds this behaviour for the antenna.
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index 96ba6dbf3f..3139a5e6b3 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -175,7 +175,9 @@ templates:
${'%'} else:
self.${'$'}{id}.set_gain(${'$'}{${'gain' + str(n)}}, ${n})
${'%'} endif
+ ${'%'} 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