diff options
author | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-06-04 16:08:44 +0000 |
---|---|---|
committer | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-06-04 16:08:44 +0000 |
commit | c7dbfcc7d78275f76d8c2a8ef21e3100721874be (patch) | |
tree | c57b7b49ba153b6858a86de8714c2737f55bbc26 /gnuradio-examples/python/ofdm/receive_path.py | |
parent | d476abb6debdf8ef5c0adf97af50a9b704605e2a (diff) |
merge ordm/receiver branch -r5574:5659. Reworks OFDM receiver with refactored OFDM blocks. A few bug fixes for other blocks have also been slipped in.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5661 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/ofdm/receive_path.py')
-rw-r--r-- | gnuradio-examples/python/ofdm/receive_path.py | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/gnuradio-examples/python/ofdm/receive_path.py b/gnuradio-examples/python/ofdm/receive_path.py index 1c9c23844c..0e44ffde02 100644 --- a/gnuradio-examples/python/ofdm/receive_path.py +++ b/gnuradio-examples/python/ofdm/receive_path.py @@ -28,7 +28,6 @@ import sys # from current dir from pick_bitrate import pick_rx_bitrate -import ofdm # ///////////////////////////////////////////////////////////////////////////// # receive path @@ -43,40 +42,22 @@ class receive_path(gr.hier_block): self._log = options.log self._rx_callback = rx_callback # this callback is fired when there's a packet available - if 0: - - chan_coeffs = gr.firdes.low_pass (1.0, # gain - 2.0, # sampling rate - bw, # midpoint of trans. band - 1*bw, # width of trans. band - gr.firdes.WIN_KAISER) # filter type - else: - chan_coeffs = [ 1.0, 0.0, 0 ] - self.chan_filt = gr.fft_filter_ccc(1, chan_coeffs) - - self.ofdm_demod = ofdm.ofdm_demod(fg, options) - # receiver - self.packet_receiver = \ - blks.demod_ofdm_pkts(fg, - self.ofdm_demod, - access_code=None, - callback=self._rx_callback, - threshold=-1) + self.ofdm_receiver = \ + blks.demod_ofdm_pkts(fg, options, + callback=self._rx_callback) # Carrier Sensing Blocks - alpha = 0.001 - thresh = 30 # in dB, will have to adjust - self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha) - fg.connect(self.chan_filt, self.probe) + #alpha = 0.001 + #thresh = 30 # in dB, will have to adjust + #self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha) + #fg.connect(self.chan_filt, self.probe) # Display some information about the setup if self._verbose: self._print_verbage() - fg.connect(self.chan_filt, self.packet_receiver) - #fg.connect(self.chan_filt, gr.file_sink(gr.sizeof_gr_complex, "ofdmrx_chflt.dat")) - gr.hier_block.__init__(self, fg, self.chan_filt, None) + gr.hier_block.__init__(self, fg, self.ofdm_receiver, None) def carrier_sensed(self): """ |