grc: Fix YML block generation

This fixes the template syntax that removes a set of variables from sink
blocks. Previously, this was causing NameErrors when trying to generate
a flowgraph containing a sink block.

Signed-off-by: Eric Wild <ewild@sysmocom.de>
This commit is contained in:
Mike Walters 2020-07-28 21:28:05 +01:00 committed by Eric Wild
parent ad72126289
commit 5cf6f4df96
1 changed files with 2 additions and 2 deletions

View File

@ -122,11 +122,11 @@ templates:
${'%'} if context.get('nchan')() > ${n}:
self.${'$'}{id}.set_center_freq(${'$'}{${'freq' + str(n)}}, ${n})
self.${'$'}{id}.set_freq_corr(${'$'}{${'corr' + str(n)}}, ${n})
${'%'} if context.get('sourk') == 'source':
% if sourk == 'source':
self.${'$'}{id}.set_dc_offset_mode(${'$'}{${'dc_offset_mode' + str(n)}}, ${n})
self.${'$'}{id}.set_iq_balance_mode(${'$'}{${'iq_balance_mode' + str(n)}}, ${n})
self.${'$'}{id}.set_gain_mode(${'$'}{${'gain_mode' + str(n)}}, ${n})
${'%'} endif
% endif
self.${'$'}{id}.set_gain(${'$'}{${'gain' + str(n)}}, ${n})
self.${'$'}{id}.set_if_gain(${'$'}{${'if_gain' + str(n)}}, ${n})
self.${'$'}{id}.set_bb_gain(${'$'}{${'bb_gain' + str(n)}}, ${n})