From 23bb3a5b5f8430478ab1ff7b9d394214f757deac Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 16 Oct 2009 14:02:10 -0700 Subject: [PATCH] Work in progress, updating usrp_rx_flex.py Optimized channel bandwith filter Optimized matched filter --- gr-pager/apps/usrp_rx_flex.grc | 823 ++++++++++++++++++++++----------- gr-pager/apps/usrp_rx_flex.py | 118 +++-- 2 files changed, 640 insertions(+), 301 deletions(-) diff --git a/gr-pager/apps/usrp_rx_flex.grc b/gr-pager/apps/usrp_rx_flex.grc index c324eaa3..2d16e1cd 100644 --- a/gr-pager/apps/usrp_rx_flex.grc +++ b/gr-pager/apps/usrp_rx_flex.grc @@ -1,6 +1,6 @@ - Sun Oct 11 14:19:38 2009 + Sat Oct 17 11:46:38 2009 options @@ -25,7 +25,7 @@ window_size - 1280, 1024 + 4095,4095 generate_options @@ -83,7 +83,7 @@ variable id - decim + sample_rate _enabled @@ -91,11 +91,11 @@ value - 16 + adc_rate/decim _coordinate - (310, 11) + (382, 12) _rotation @@ -106,7 +106,7 @@ variable id - sample_rate + freq _enabled @@ -114,11 +114,11 @@ value - adc_rate/decim + band_freq+(channel-61)*25e3 _coordinate - (382, 12) + (480, 11) _rotation @@ -126,22 +126,117 @@ - variable + wxgui_fftsink2 id - channel_rate + wxgui_fftsink2_0 _enabled True - value - 25e3 + type + complex + + + title + FLEX Spectrum + + + samp_rate + sample_rate + + + baseband_freq + band_freq + + + y_per_div + 10 + + + y_divs + 10 + + + ref_level + 0 + + + ref_scale + 65536 + + + fft_size + 1024 + + + fft_rate + 30 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win_size + + + + grid_pos + 0,0,1,1 + + + notebook + displays,0 + + + _coordinate + (34, 508) + + + _rotation + 180 + + + + notebook + + id + displays + + + _enabled + True + + + style + wx.NB_TOP + + + labels + ['RX Spectrum','Baseband'] + + + grid_pos + 1, 0, 1, 5 + + + notebook + _coordinate - (751, 13) + (9, 209) _rotation @@ -149,22 +244,22 @@ - variable + import id - freq + import_0 _enabled True - value - band_freq+(channel-61)*25e3 + import + import os, math _coordinate - (480, 11) + (10, 76) _rotation @@ -172,22 +267,58 @@ - variable + usrp_simple_source_x id - channel_decim + usrp_source _enabled True - value - int(sample_rate/channel_rate) + type + complex + + + format + + + + which + 0 + + + decimation + decim + + + frequency + band_freq + + + lo_offset + float('inf') + + + gain + rx_gain + + + side + A + + + rx_ant + RXA + + + hb_filters + _coordinate - (854, 11) + (32, 734) _rotation @@ -195,22 +326,124 @@ - variable + gr_quadrature_demod_cf + + id + fm_demod + + + _enabled + True + + + gain + demod_k + + + _coordinate + (599, 774) + + + _rotation + 0 + + + + gr_freq_xlating_fir_filter_xxx id + gr_freq_xlating_fir_filter_xxx_0 + + + _enabled + True + + + type + ccc + + + decim + channel_decim + + + taps channel_taps + + center_freq + band_freq-freq+offset + + + samp_rate + sample_rate + + + _coordinate + (321, 750) + + + _rotation + 0 + + + + wxgui_scopesink2 + + id + wxgui_scopesink2_0 + _enabled True - value - firdes.low_pass(10**1, sample_rate, 10e3, 2.5e3) + type + complex + + + title + Channel Waveform + + + samp_rate + channel_rate + + + v_scale + 8e3 + + + t_scale + 20.0/channel_rate + + + ac_couple + False + + + xy_mode + False + + + num_inputs + 1 + + + win_size + + + + grid_pos + 0, 0, 1, 1 + + + notebook + displays, 1 _coordinate - (588, 12) + (594, 620) _rotation @@ -221,7 +454,7 @@ wxgui_fftsink2 id - wxgui_fftsink2_0 + wxgui_fftsink2_1 _enabled @@ -233,15 +466,15 @@ title - FLEX Spectrum + Channel Spectrum samp_rate - sample_rate + channel_rate baseband_freq - band_freq + freq y_per_div @@ -279,17 +512,21 @@ avg_alpha 0 + + win_size + + grid_pos - 0,0,1,1 + 1, 0, 1, 1 notebook - displays,0 + displays, 0 _coordinate - (34, 508) + (344, 511) _rotation @@ -297,10 +534,33 @@ - usrp_simple_source_x + variable id - usrp_source + decim + + + _enabled + True + + + value + 20 + + + _coordinate + (310, 11) + + + _rotation + 0 + + + + gr_moving_average_xx + + id + gr_moving_average_xx_0 _enabled @@ -308,47 +568,69 @@ type - complex + float - format - + length + 8 - which + scale + 1.0/8.0 + + + max_iter + 4000 + + + _coordinate + (831, 758) + + + _rotation 0 + + + variable - decimation - decim + id + ma_ntaps - frequency - band_freq + _enabled + True - lo_offset - float('inf') + value + channel_rate/symbol_rate - gain - rx_gain + _coordinate + (833, 851) - side - A + _rotation + 0 + + + + variable + + id + symbol_rate - rx_ant - RXA + _enabled + True - hb_filters - + value + 3200 _coordinate - (32, 734) + (590, 12) _rotation @@ -356,22 +638,22 @@ - import + variable id - import_0 + nchan_taps _enabled True - import - import os + value + len(channel_taps) _coordinate - (10, 76) + (328, 1009) _rotation @@ -382,7 +664,7 @@ variable id - config_filename + channel_decim _enabled @@ -390,11 +672,11 @@ value - os.environ["HOME"]+"/.gnuradio/config.conf" + int(sample_rate/channel_rate) _coordinate - (9, 133) + (906, 12) _rotation @@ -402,10 +684,10 @@ - variable_config + variable id - saved_band_freq + deviation _enabled @@ -413,31 +695,34 @@ value - 930.5125e6 + 4800 - type - real + _coordinate + (688, 14) - config_file - config_filename + _rotation + 0 + + + variable - section - gr-pager + id + demod_k - option - band_center + _enabled + True - writeback - band_freq + value + 3*channel_rate/(2*math.pi*deviation) _coordinate - (228, 311) + (598, 857) _rotation @@ -445,10 +730,33 @@ - variable_config + variable id - saved_offset + channel_taps + + + _enabled + True + + + value + firdes.low_pass(10, sample_rate, passband/2.0, (channel_rate-passband)/2.0) + + + _coordinate + (325, 857) + + + _rotation + 0 + + + + variable + + id + config_filename _enabled @@ -456,8 +764,31 @@ value + os.environ["HOME"]+"/.gnuradio/config.conf" + + + _coordinate + (9, 133) + + + _rotation 0 + + + variable_config + + id + saved_band_freq + + + _enabled + True + + + value + 930.5125e6 + type real @@ -472,15 +803,15 @@ option - freq_offset + band_center writeback - offset + band_freq _coordinate - (547, 312) + (228, 311) _rotation @@ -491,7 +822,7 @@ variable_config id - saved_rx_gain + saved_channel _enabled @@ -499,7 +830,7 @@ value - 40 + 25 type @@ -515,15 +846,15 @@ option - rx_gain + channel writeback - rx_gain + channel _coordinate - (706, 312) + (387, 312) _rotation @@ -531,38 +862,42 @@ - gr_freq_xlating_fir_filter_xxx + variable_config id - gr_freq_xlating_fir_filter_xxx_0 + saved_offset _enabled True + + value + 0 + type - ccc + real - decim - channel_decim + config_file + config_filename - taps - channel_taps + section + gr-pager - center_freq - band_freq-freq+offset + option + freq_offset - samp_rate - sample_rate + writeback + offset _coordinate - (321, 750) + (547, 312) _rotation @@ -570,34 +905,42 @@ - notebook + variable_config id - displays + saved_rx_gain _enabled True - style - wx.NB_TOP + value + 40 + + + type + int + + + config_file + config_filename - labels - ['RX Spectrum','Baseband'] + section + gr-pager - grid_pos - 1, 0, 1, 5 + option + rx_gain - notebook - + writeback + rx_gain _coordinate - (9, 209) + (706, 312) _rotation @@ -605,10 +948,10 @@ - variable_slider + variable_text_box id - rx_gain + band_freq _enabled @@ -616,35 +959,23 @@ label - Analog Gain + Band Freq. value - saved_rx_gain - - - min - 0 - - - max - 100 - - - num_steps - 100 - - - style - wx.SL_HORIZONTAL + saved_band_freq converver float_converter + + formatter + None + grid_pos - 0, 4, 1, 1 + 0, 0, 1, 1 notebook @@ -652,7 +983,7 @@ _coordinate - (658, 122) + (225, 121) _rotation @@ -758,54 +1089,45 @@ - variable_slider + variable id - channel + passband _enabled True - - label - Channel - value - saved_channel - - - min - 1 - - - max - 120 + 2*(deviation+symbol_rate) - num_steps - 119 + _coordinate + (327, 930) - style - wx.SL_HORIZONTAL + _rotation + 0 + + + variable - converver - float_converter + id + channel_rate - grid_pos - 0, 1, 1, 1 + _enabled + True - notebook - + value + 8*3200 _coordinate - (376, 120) + (792, 13) _rotation @@ -813,10 +1135,10 @@ - variable_text_box + variable_slider id - band_freq + channel _enabled @@ -824,23 +1146,35 @@ label - Band Freq. + Channel value - saved_band_freq + saved_channel - converver - float_converter + min + 1 - formatter - None + max + 120 + + + num_steps + 119 + + + style + wx.SL_HORIZONTAL + + + converver + int_converter grid_pos - 0, 0, 1, 1 + 0, 1, 1, 1 notebook @@ -848,7 +1182,7 @@ _coordinate - (225, 121) + (376, 120) _rotation @@ -856,58 +1190,54 @@ - wxgui_scopesink2 + variable_slider id - wxgui_scopesink2_0 + rx_gain _enabled True - type - complex - - - title - Baseband Waveform + label + Analog Gain - samp_rate - channel_rate + value + saved_rx_gain - v_scale - 1e3 + min + 0 - t_scale - 20.0/channel_rate + max + 100 - ac_couple - False + num_steps + 100 - xy_mode - False + style + wx.SL_HORIZONTAL - num_inputs - 1 + converver + int_converter grid_pos - 0, 0, 1, 1 + 0, 4, 1, 1 notebook - displays, 1 + _coordinate - (593, 551) + (658, 122) _rotation @@ -915,10 +1245,10 @@ - wxgui_fftsink2 + wxgui_scopesink2 id - wxgui_fftsink2_1 + wxgui_scopesink2_0_0 _enabled @@ -926,55 +1256,39 @@ type - complex + float title - Channel Spectrum + Baseband samp_rate channel_rate - baseband_freq - freq - - - y_per_div - 10 - - - y_divs - 10 - - - ref_level - 0 - - - ref_scale - 65536 + v_scale + 1 - fft_size - 1024 + t_scale + 40.0/channel_rate - fft_rate - 30 + ac_couple + False - peak_hold + xy_mode False - average - False + num_inputs + 1 - avg_alpha - 0 + win_size + grid_pos @@ -982,60 +1296,17 @@ notebook - displays, 0 + displays, 1 _coordinate - (344, 511) + (797, 601) _rotation 180 - - variable_config - - id - saved_channel - - - _enabled - True - - - value - 25 - - - type - int - - - config_file - config_filename - - - section - gr-pager - - - option - channel - - - writeback - channel - - - _coordinate - (387, 312) - - - _rotation - 0 - - gr_freq_xlating_fir_filter_xxx_0 wxgui_fftsink2_1 @@ -1060,4 +1331,22 @@ 0 0 + + gr_freq_xlating_fir_filter_xxx_0 + fm_demod + 0 + 0 + + + fm_demod + gr_moving_average_xx_0 + 0 + 0 + + + gr_moving_average_xx_0 + wxgui_scopesink2_0_0 + 0 + 0 + diff --git a/gr-pager/apps/usrp_rx_flex.py b/gr-pager/apps/usrp_rx_flex.py index 7d634527..73b11f90 100755 --- a/gr-pager/apps/usrp_rx_flex.py +++ b/gr-pager/apps/usrp_rx_flex.py @@ -2,7 +2,7 @@ ################################################## # Gnuradio Python Flow Graph # Title: USRP FLEX Pager Receiver (Single Channel) -# Generated: Sun Oct 11 14:15:06 2009 +# Generated: Sat Oct 17 11:46:38 2009 ################################################## from gnuradio import eng_notation @@ -16,7 +16,7 @@ from grc_gnuradio import usrp as grc_usrp from grc_gnuradio import wxgui as grc_wxgui from optparse import OptionParser import ConfigParser -import os +import os, math import wx class usrp_rx_flex(grc_wxgui.top_block_gui): @@ -28,6 +28,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): # Variables ################################################## self.config_filename = config_filename = os.environ["HOME"]+"/.gnuradio/config.conf" + self.symbol_rate = symbol_rate = 3200 self._saved_channel_config = ConfigParser.ConfigParser() self._saved_channel_config.read(config_filename) try: saved_channel = self._saved_channel_config.getint("gr-pager", "channel") @@ -38,10 +39,14 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): try: saved_band_freq = self._saved_band_freq_config.getfloat("gr-pager", "band_center") except: saved_band_freq = 930.5125e6 self.saved_band_freq = saved_band_freq - self.decim = decim = 16 + self.deviation = deviation = 4800 + self.decim = decim = 20 + self.adc_rate = adc_rate = 64e6 + self.sample_rate = sample_rate = adc_rate/decim + self.passband = passband = 2*(deviation+symbol_rate) + self.channel_rate = channel_rate = 8*3200 self.channel = channel = saved_channel self.band_freq = band_freq = saved_band_freq - self.adc_rate = adc_rate = 64e6 self._saved_rx_gain_config = ConfigParser.ConfigParser() self._saved_rx_gain_config.read(config_filename) try: saved_rx_gain = self._saved_rx_gain_config.getint("gr-pager", "rx_gain") @@ -52,13 +57,14 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): try: saved_offset = self._saved_offset_config.getfloat("gr-pager", "freq_offset") except: saved_offset = 0 self.saved_offset = saved_offset - self.sample_rate = sample_rate = adc_rate/decim self.freq = freq = band_freq+(channel-61)*25e3 - self.channel_rate = channel_rate = 25e3 + self.channel_taps = channel_taps = firdes.low_pass(10, sample_rate, passband/2.0, (channel_rate-passband)/2.0) self.rx_gain = rx_gain = saved_rx_gain self.offset = offset = saved_offset + self.nchan_taps = nchan_taps = len(channel_taps) + self.ma_ntaps = ma_ntaps = channel_rate/symbol_rate self.freq_text = freq_text = freq - self.channel_taps = channel_taps = firdes.low_pass(10**1, sample_rate, 10e3, 2.5e3) + self.demod_k = demod_k = 3*channel_rate/(2*math.pi*deviation) self.channel_decim = channel_decim = int(sample_rate/channel_rate) ################################################## @@ -79,7 +85,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): value=self.channel, callback=self.set_channel, label="Channel", - converter=forms.float_converter(), + converter=forms.int_converter(), proportion=0, ) self._channel_slider = forms.slider( @@ -91,7 +97,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): maximum=120, num_steps=119, style=wx.SL_HORIZONTAL, - cast=float, + cast=int, proportion=1, ) self.GridAdd(_channel_sizer, 0, 1, 1, 1) @@ -110,7 +116,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): value=self.rx_gain, callback=self.set_rx_gain, label="Analog Gain", - converter=forms.float_converter(), + converter=forms.int_converter(), proportion=0, ) self._rx_gain_slider = forms.slider( @@ -122,7 +128,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): maximum=100, num_steps=100, style=wx.SL_HORIZONTAL, - cast=float, + cast=int, proportion=1, ) self.GridAdd(_rx_gain_sizer, 0, 4, 1, 1) @@ -161,7 +167,9 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): ################################################## # Blocks ################################################## + self.fm_demod = gr.quadrature_demod_cf(demod_k) self.gr_freq_xlating_fir_filter_xxx_0 = gr.freq_xlating_fir_filter_ccc(channel_decim, (channel_taps), band_freq-freq+offset, sample_rate) + self.gr_moving_average_xx_0 = gr.moving_average_ff(8, 1.0/8.0, 4000) self.usrp_source = grc_usrp.simple_source_c(which=0, side="A", rx_ant="RXA") self.usrp_source.set_decim_rate(decim) self.usrp_source.set_frequency(band_freq, verbose=True) @@ -200,15 +208,26 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.displays.GetPage(0).GridAdd(self.wxgui_fftsink2_1.win, 1, 0, 1, 1) self.wxgui_scopesink2_0 = scopesink2.scope_sink_c( self.displays.GetPage(1).GetWin(), - title="Baseband Waveform", + title="Channel Waveform", sample_rate=channel_rate, - v_scale=1e3, + v_scale=8e3, t_scale=20.0/channel_rate, ac_couple=False, xy_mode=False, num_inputs=1, ) self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0.win, 0, 0, 1, 1) + self.wxgui_scopesink2_0_0 = scopesink2.scope_sink_f( + self.displays.GetPage(1).GetWin(), + title="Baseband", + sample_rate=channel_rate, + v_scale=1, + t_scale=40.0/channel_rate, + ac_couple=False, + xy_mode=False, + num_inputs=1, + ) + self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0.win, 1, 0, 1, 1) ################################################## # Connections @@ -217,6 +236,9 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.connect((self.usrp_source, 0), (self.gr_freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.usrp_source, 0), (self.wxgui_fftsink2_0, 0)) self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.wxgui_scopesink2_0, 0)) + self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.fm_demod, 0)) + self.connect((self.fm_demod, 0), (self.gr_moving_average_xx_0, 0)) + self.connect((self.gr_moving_average_xx_0, 0), (self.wxgui_scopesink2_0_0, 0)) def set_config_filename(self, config_filename): self.config_filename = config_filename @@ -245,6 +267,11 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self._saved_rx_gain_config.set("gr-pager", "rx_gain", str(self.rx_gain)) self._saved_rx_gain_config.write(open(self.config_filename, 'w')) + def set_symbol_rate(self, symbol_rate): + self.symbol_rate = symbol_rate + self.set_ma_ntaps(self.channel_rate/self.symbol_rate) + self.set_passband(2*(self.deviation+self.symbol_rate)) + def set_saved_channel(self, saved_channel): self.saved_channel = saved_channel self.set_channel(self.saved_channel) @@ -253,11 +280,40 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.saved_band_freq = saved_band_freq self.set_band_freq(self.saved_band_freq) + def set_deviation(self, deviation): + self.deviation = deviation + self.set_demod_k(3*self.channel_rate/(2*math.pi*self.deviation)) + self.set_passband(2*(self.deviation+self.symbol_rate)) + def set_decim(self, decim): self.decim = decim self.set_sample_rate(self.adc_rate/self.decim) self.usrp_source.set_decim_rate(self.decim) + def set_adc_rate(self, adc_rate): + self.adc_rate = adc_rate + self.set_sample_rate(self.adc_rate/self.decim) + + def set_sample_rate(self, sample_rate): + self.sample_rate = sample_rate + self.wxgui_fftsink2_0.set_sample_rate(self.sample_rate) + self.set_channel_decim(int(self.sample_rate/self.channel_rate)) + self.set_channel_taps(firdes.low_pass(10, self.sample_rate, self.passband/2.0, (self.channel_rate-self.passband)/2.0)) + + def set_passband(self, passband): + self.passband = passband + self.set_channel_taps(firdes.low_pass(10, self.sample_rate, self.passband/2.0, (self.channel_rate-self.passband)/2.0)) + + def set_channel_rate(self, channel_rate): + self.channel_rate = channel_rate + self.wxgui_scopesink2_0.set_sample_rate(self.channel_rate) + self.wxgui_fftsink2_1.set_sample_rate(self.channel_rate) + self.set_ma_ntaps(self.channel_rate/self.symbol_rate) + self.set_channel_decim(int(self.sample_rate/self.channel_rate)) + self.set_demod_k(3*self.channel_rate/(2*math.pi*self.deviation)) + self.set_channel_taps(firdes.low_pass(10, self.sample_rate, self.passband/2.0, (self.channel_rate-self.passband)/2.0)) + self.wxgui_scopesink2_0_0.set_sample_rate(self.channel_rate) + def set_channel(self, channel): self.channel = channel self.set_freq(self.band_freq+(self.channel-61)*25e3) @@ -275,19 +331,15 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.set_freq(self.band_freq+(self.channel-61)*25e3) self.wxgui_fftsink2_0.set_baseband_freq(self.band_freq) self.usrp_source.set_frequency(self.band_freq) + self.gr_freq_xlating_fir_filter_xxx_0.set_center_freq(self.band_freq-self.freq+self.offset) self._saved_band_freq_config = ConfigParser.ConfigParser() self._saved_band_freq_config.read(self.config_filename) if not self._saved_band_freq_config.has_section("gr-pager"): self._saved_band_freq_config.add_section("gr-pager") self._saved_band_freq_config.set("gr-pager", "band_center", str(self.band_freq)) self._saved_band_freq_config.write(open(self.config_filename, 'w')) - self.gr_freq_xlating_fir_filter_xxx_0.set_center_freq(self.band_freq-self.freq+self.offset) self._band_freq_text_box.set_value(self.band_freq) - def set_adc_rate(self, adc_rate): - self.adc_rate = adc_rate - self.set_sample_rate(self.adc_rate/self.decim) - def set_saved_rx_gain(self, saved_rx_gain): self.saved_rx_gain = saved_rx_gain self.set_rx_gain(self.saved_rx_gain) @@ -296,23 +348,16 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): self.saved_offset = saved_offset self.set_offset(self.saved_offset) - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_channel_decim(int(self.sample_rate/self.channel_rate)) - self.set_channel_taps(firdes.low_pass(10**1, self.sample_rate, 10e3, 2.5e3)) - self.wxgui_fftsink2_0.set_sample_rate(self.sample_rate) - def set_freq(self, freq): self.freq = freq - self.wxgui_fftsink2_1.set_baseband_freq(self.freq) self.gr_freq_xlating_fir_filter_xxx_0.set_center_freq(self.band_freq-self.freq+self.offset) + self.wxgui_fftsink2_1.set_baseband_freq(self.freq) self.set_freq_text(self.freq) - def set_channel_rate(self, channel_rate): - self.channel_rate = channel_rate - self.set_channel_decim(int(self.sample_rate/self.channel_rate)) - self.wxgui_fftsink2_1.set_sample_rate(self.channel_rate) - self.wxgui_scopesink2_0.set_sample_rate(self.channel_rate) + def set_channel_taps(self, channel_taps): + self.channel_taps = channel_taps + self.gr_freq_xlating_fir_filter_xxx_0.set_taps((self.channel_taps)) + self.set_nchan_taps(len(self.channel_taps)) def set_rx_gain(self, rx_gain): self.rx_gain = rx_gain @@ -328,23 +373,28 @@ class usrp_rx_flex(grc_wxgui.top_block_gui): def set_offset(self, offset): self.offset = offset + self.gr_freq_xlating_fir_filter_xxx_0.set_center_freq(self.band_freq-self.freq+self.offset) self._saved_offset_config = ConfigParser.ConfigParser() self._saved_offset_config.read(self.config_filename) if not self._saved_offset_config.has_section("gr-pager"): self._saved_offset_config.add_section("gr-pager") self._saved_offset_config.set("gr-pager", "freq_offset", str(self.offset)) self._saved_offset_config.write(open(self.config_filename, 'w')) - self.gr_freq_xlating_fir_filter_xxx_0.set_center_freq(self.band_freq-self.freq+self.offset) self._offset_slider.set_value(self.offset) self._offset_text_box.set_value(self.offset) + def set_nchan_taps(self, nchan_taps): + self.nchan_taps = nchan_taps + + def set_ma_ntaps(self, ma_ntaps): + self.ma_ntaps = ma_ntaps + def set_freq_text(self, freq_text): self.freq_text = freq_text self._freq_text_static_text.set_value(self.freq_text) - def set_channel_taps(self, channel_taps): - self.channel_taps = channel_taps - self.gr_freq_xlating_fir_filter_xxx_0.set_taps((self.channel_taps)) + def set_demod_k(self, demod_k): + self.demod_k = demod_k def set_channel_decim(self, channel_decim): self.channel_decim = channel_decim -- 2.30.2