diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2020-01-11 21:38:36 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-14 10:34:18 -0800 |
commit | cfdef8e6dffb0537918aa91110e86e0b81056eae (patch) | |
tree | 7e8e70dea5e4262bac5787acbbce143e9ee4c82d /gr-uhd/grc/gen_uhd_usrp_blocks.py | |
parent | 96a5e82123ddc8a3ea6ced7bb903cafacd5113fb (diff) |
uhd: Move AGC-related calls to fix TypeError
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
-rw-r--r-- | gr-uhd/grc/gen_uhd_usrp_blocks.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py index 3c4a08d96a..ffc41571a8 100644 --- a/gr-uhd/grc/gen_uhd_usrp_blocks.py +++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py @@ -188,13 +188,6 @@ templates: % for n in range(max_nchan): ${'%'} if context.get('nchan')() > ${n}: self.${'$'}{id}.set_center_freq(${'$'}{${'center_freq' + str(n)}}, ${n}) - ${'%'} if context.get('rx_agc${n}')() != 'Enabled': - ${'%'} if bool(eval(context.get('norm_gain' + '${n}')())): - self.${'$'}{id}.set_normalized_gain(${'$'}{${'gain' + str(n)}}, ${n}) - ${'%'} else: - self.${'$'}{id}.set_gain(${'$'}{${'gain' + str(n)}}, ${n}) - ${'%'} endif - ${'%'} endif # if rx_agc${n} != 'Enabled' ${'%'} if context.get('ant${n}')(): self.${'$'}{id}.set_antenna(${'$'}{${'ant' + str(n)}}, ${n}) @@ -209,6 +202,13 @@ templates: ${'%'} elif context.get('rx_agc${n}')() == 'Disabled': self.${'$'}{id}.set_rx_agc(False, ${n}) ${'%'} endif + ${'%'} if context.get('rx_agc${n}')() != 'Enabled': + ${'%'} if bool(eval(context.get('norm_gain' + '${n}')())): + self.${'$'}{id}.set_normalized_gain(${'$'}{${'gain' + str(n)}}, ${n}) + ${'%'} else: + self.${'$'}{id}.set_gain(${'$'}{${'gain' + str(n)}}, ${n}) + ${'%'} endif + ${'%'} endif # if rx_agc${n} != 'Enabled' ${'%'} if context.get('dc_offs_enb${n}')(): self.${'$'}{id}.set_auto_dc_offset(${'$'}{${'dc_offs_enb' + str(n)}}, ${n}) ${'%'} endif |