diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2019-09-27 11:16:26 -0400 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-11-01 15:10:35 +0100 |
commit | 8eb1a354c0b5126b6c0b7d55b68963a155088b3a (patch) | |
tree | 5caecf0c0e0da6020a86c6430b0419b2666f2b5d /gr-uhd/grc/gen_uhd_usrp_blocks.py | |
parent | 3411bf55fac0e17fa80d12a0fd2b288346b2724e (diff) |
gr-uhd: multichannel uhd object not populating channels
Due to the way the template interprets the stream_chans value as string,
it always returns True and the '[]' from stream chans was used as the
channels parameter.
With this change, channels in the case where stream chans is empty,
chans populates as before, which is range(num_chans)
python3 outputs a range object, so it is necessary to add a list
surrounding the range command as well
Fixes #2789
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
-rw-r--r-- | gr-uhd/grc/gen_uhd_usrp_blocks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py index db83b4203a..38f0c6f364 100644 --- a/gr-uhd/grc/gen_uhd_usrp_blocks.py +++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py @@ -144,10 +144,10 @@ templates: ${'%'} if stream_args: args=${'$'}{stream_args}, ${'%'} endif - ${'%'} if stream_chans: + ${'%'} if eval(stream_chans): channels=${'$'}{stream_chans}, ${'%'} else: - channels=range(${'$'}{nchan}), + channels=list(range(0,${'$'}{nchan})), ${'%'} endif ), ${'%'} if len_tag_name: |