diff options
Diffstat (limited to 'gr-digital/examples/receive_path.py')
-rw-r--r-- | gr-digital/examples/receive_path.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gr-digital/examples/receive_path.py b/gr-digital/examples/receive_path.py index 9bc5f7b8f..c6a26daf2 100644 --- a/gr-digital/examples/receive_path.py +++ b/gr-digital/examples/receive_path.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005,2006,2007 Free Software Foundation, Inc. +# Copyright 2005-2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -42,7 +42,6 @@ class receive_path(gr.hier_block2): self._verbose = options.verbose self._bitrate = options.bitrate # desired bit rate - self._samples_per_symbol = options.samples_per_symbol # desired samples/symbol self._rx_callback = rx_callback # this callback is fired when there's a packet available self._demod_class = demod_class # the demodulator_class we're using @@ -50,10 +49,13 @@ class receive_path(gr.hier_block2): # Get demod_kwargs demod_kwargs = self._demod_class.extract_kwargs_from_options(options) + # Build the demodulator + demodulator = self._demod_class(**demod_kwargs) + # Design filter to get actual channel we want sw_decim = 1 chan_coeffs = gr.firdes.low_pass (1.0, # gain - sw_decim * self._samples_per_symbol, # sampling rate + sw_decim * demodulator._samples_per_symbol, # sampling rate 1.0, # midpoint of trans. band 0.5, # width of trans. band gr.firdes.WIN_HANN) # filter type @@ -61,7 +63,7 @@ class receive_path(gr.hier_block2): # receiver self.packet_receiver = \ - digital.demod_pkts(self._demod_class(**demod_kwargs), + digital.demod_pkts(demodulator, access_code=None, callback=self._rx_callback, threshold=-1) |