diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2019-09-27 10:54:45 -0400 |
---|---|---|
committer | Michael Dickens <michael.dickens@ettus.com> | 2019-11-06 08:48:20 -0500 |
commit | 4a62f2ba91e9e895a582ea7dc7340474ca4b2408 (patch) | |
tree | ffdf41d9008cd14438975ed27ef226b322f2055a | |
parent | 19cac6cb29e664cbeac731964588732b61c8573b (diff) |
qtgui: usrp source gain callbacks not rendered
In the 3.8 gen_uhd_usrp_blocks.py generated an invalid statement for the
set_gain callbacks, so they were never rendered to the output py.
Fixes #2791
-rw-r--r-- | gr-uhd/grc/gen_uhd_usrp_blocks.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py index 38f0c6f364..a24cec9a15 100644 --- a/gr-uhd/grc/gen_uhd_usrp_blocks.py +++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py @@ -220,8 +220,10 @@ templates: % if sourk == 'source': - ${'$'}{'set_rx_agc(True, ${n})' if context.get('rx_agc${n}')() == 'Enabled' else ''} - ${'$'}{'set_rx_agc(False, ${n})' if context.get('rx_agc${n}')() == 'Disabled' else ''} - - ${'$'}{'set_gain(${'$'}{${'gain' + str(n)}}, ${n})' if not bool(eval(context.get('norm_gain${n}')())) and context.get('rx_agc${n}')() != 'Enabled' else ''} - - ${'$'}{'set_normalized_gain(${'$'}{${'gain' + str(n)}}, ${n})' if bool(eval(context.get('norm_gain${n}')())) and context.get('rx_agc${n}')() != 'Enabled' else ''} + - | + ${'%'} if context.get('rx_agc${n}')() != 'Enabled': + self.${'$'}{id}.set_${'$'}{'normalized_' if bool(eval(context.get('norm_gain${n}')())) else ''}gain(${'$'}{${'gain' + str(n)}}, ${n}) + ${'%'} endif % else: - self.${'$'}{id}.set_${'$'}{'normalized_' if bool(eval(context.get('norm_gain${n}')())) else ''}gain(${'$'}{${'gain' + str(n)}}, ${n}) % endif |