summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py14
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