From ce16514534e5d7ebbc4fe46e2b09a25ccc5fdafd Mon Sep 17 00:00:00 2001
From: trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Wed, 2 Jan 2008 17:35:35 +0000
Subject: Merging ofdm2 branch -r7047:7321 into trunk. This updates the OFDM
 code to hier_block2 in blks2impl and removed from blksimpl. The new code
 implements a decision feedback sync loop to lock the phase/freq, removes two
 unnecessary premables and performs frame sync and equalization off single
 preamble symbol. Also adds/updates Python plotting tools and a branchless
 clip algorithm in gr_math.h.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7324 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gnuradio-examples/python/ofdm/receive_path.py | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'gnuradio-examples/python/ofdm/receive_path.py')

diff --git a/gnuradio-examples/python/ofdm/receive_path.py b/gnuradio-examples/python/ofdm/receive_path.py
index 2ebaad8838..b758bc4d0c 100644
--- a/gnuradio-examples/python/ofdm/receive_path.py
+++ b/gnuradio-examples/python/ofdm/receive_path.py
@@ -20,7 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-from gnuradio import gr, gru, blks
+from gnuradio import gr, gru, blks2
 from gnuradio import usrp
 from gnuradio import eng_notation
 import copy
@@ -33,8 +33,13 @@ from pick_bitrate import pick_rx_bitrate
 #                              receive path
 # /////////////////////////////////////////////////////////////////////////////
 
-class receive_path(gr.hier_block):
-    def __init__(self, fg, rx_callback, options):
+class receive_path(gr.hier_block2):
+    def __init__(self, rx_callback, options):
+
+	gr.hier_block2.__init__(self, "receive_path",
+				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+				gr.io_signature(0, 0, 0)) # Output signature
+
 
         options = copy.copy(options)    # make a copy so we can destructively modify
 
@@ -44,20 +49,20 @@ class receive_path(gr.hier_block):
 
         # receiver
         self.ofdm_rx = \
-                     blks.ofdm_demod(fg, options, callback=self._rx_callback)
+                     blks2.ofdm_demod(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.ofdm_rx.ofdm_recv.chan_filt, self.probe)
+
+        self.connect(self, self.ofdm_rx)
+        self.connect(self.ofdm_rx, self.probe)
 
         # Display some information about the setup
         if self._verbose:
             self._print_verbage()
         
-        gr.hier_block.__init__(self, fg, self.ofdm_rx, None)
-
     def carrier_sensed(self):
         """
         Return True if we think carrier is present.
-- 
cgit v1.2.3