summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/multi-antenna
diff options
context:
space:
mode:
authoreb2008-02-08 04:36:24 +0000
committereb2008-02-08 04:36:24 +0000
commit05005e3d3fad3c9baee9906714510b5d12e0fa6f (patch)
tree6f3785d80ac03b213dce984c9eb14be9b4c86571 /gnuradio-examples/python/multi-antenna
parent42ad2adb86981f4488edbe33169683f787b807c3 (diff)
downloadgnuradio-05005e3d3fad3c9baee9906714510b5d12e0fa6f.tar.gz
gnuradio-05005e3d3fad3c9baee9906714510b5d12e0fa6f.tar.bz2
gnuradio-05005e3d3fad3c9baee9906714510b5d12e0fa6f.zip
Removed gr.flow_graph, gr.hier_block and friends. From here on out
all work on the trunk must use gr.top_block and gr.hier_block2. Merged eb/fg-no-more -r7602:7606 into trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7607 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/multi-antenna')
-rwxr-xr-xgnuradio-examples/python/multi-antenna/multi_fft.py14
-rwxr-xr-xgnuradio-examples/python/multi-antenna/multi_file.py6
-rwxr-xr-xgnuradio-examples/python/multi-antenna/multi_scope.py11
3 files changed, 15 insertions, 16 deletions
diff --git a/gnuradio-examples/python/multi-antenna/multi_fft.py b/gnuradio-examples/python/multi-antenna/multi_fft.py
index 3a8d48195..0f1dbb102 100755
--- a/gnuradio-examples/python/multi-antenna/multi_fft.py
+++ b/gnuradio-examples/python/multi-antenna/multi_fft.py
@@ -6,7 +6,7 @@ from gnuradio.eng_option import eng_option
from gnuradio import eng_notation
from gnuradio import optfir
from optparse import OptionParser
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider
+from gnuradio.wxgui import stdgui2, fftsink2, waterfallsink2, scopesink2, form, slider
import wx
from usrpm import usrp_dbid
import time
@@ -16,10 +16,10 @@ import sys
# required FPGA that can do 4 rx channels.
-class my_graph(stdgui.gui_flow_graph):
+class my_graph(stdgui2.std_top_block):
def __init__(self, frame, panel, vbox, argv):
- stdgui.gui_flow_graph.__init__(self)
+ stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
self.frame = frame
self.panel = panel
@@ -89,9 +89,9 @@ class my_graph(stdgui.gui_flow_graph):
#print len(chan_filt_coeffs)
for i in range(nchan):
- scope = fftsink.fft_sink_c(self, panel, sample_rate=input_rate/sw_decim,
- title="Input %d" % (i,),
- ref_level=80, y_per_div=20)
+ scope = fftsink2.fft_sink_c(panel, sample_rate=input_rate/sw_decim,
+ title="Input %d" % (i,),
+ ref_level=80, y_per_div=20)
vbox.Add(scope.win, 10, wx.EXPAND)
if options.filter:
@@ -121,7 +121,7 @@ class my_graph(stdgui.gui_flow_graph):
def main ():
- app = stdgui.stdapp(my_graph, "Multi Scope", nstatus=1)
+ app = stdgui2.stdapp(my_graph, "Multi Scope", nstatus=1)
app.MainLoop()
if __name__ == '__main__':
diff --git a/gnuradio-examples/python/multi-antenna/multi_file.py b/gnuradio-examples/python/multi-antenna/multi_file.py
index d5a5d8721..f887b9cf6 100755
--- a/gnuradio-examples/python/multi-antenna/multi_file.py
+++ b/gnuradio-examples/python/multi-antenna/multi_file.py
@@ -6,8 +6,6 @@ from gnuradio.eng_option import eng_option
from gnuradio import eng_notation
from gnuradio import optfir
from optparse import OptionParser
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider
-import wx
from usrpm import usrp_dbid
import time
import os.path
@@ -16,10 +14,10 @@ import sys
# required FPGA that can do 4 rx channels.
-class my_graph(gr.flow_graph):
+class my_graph(gr.top_block):
def __init__(self):
- gr.flow_graph.__init__(self)
+ gr.top_block.__init__(self)
parser = OptionParser (option_class=eng_option)
#parser.add_option("-S", "--subdev", type="subdev", default=(0, None),
diff --git a/gnuradio-examples/python/multi-antenna/multi_scope.py b/gnuradio-examples/python/multi-antenna/multi_scope.py
index b35e91651..8db183d6f 100755
--- a/gnuradio-examples/python/multi-antenna/multi_scope.py
+++ b/gnuradio-examples/python/multi-antenna/multi_scope.py
@@ -6,7 +6,7 @@ from gnuradio.eng_option import eng_option
from gnuradio import eng_notation
from gnuradio import optfir
from optparse import OptionParser
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider
+from gnuradio.wxgui import stdgui2, fftsink2, waterfallsink2, scopesink2, form, slider
import wx
from usrpm import usrp_dbid
import time
@@ -16,10 +16,10 @@ import sys
# required FPGA that can do 4 rx channels.
-class my_graph(stdgui.gui_flow_graph):
+class my_top_block(stdgui2.std_top_block):
def __init__(self, frame, panel, vbox, argv):
- stdgui.gui_flow_graph.__init__(self)
+ stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
self.frame = frame
self.panel = panel
@@ -78,7 +78,8 @@ class my_graph(stdgui.gui_flow_graph):
self.connect(self.u, di)
# our destination (8 float inputs)
- self.scope = scopesink.scope_sink_f(self, panel, sample_rate=input_rate/sw_decim)
+ self.scope = scopesink2.scope_sink_f(panel, sample_rate=input_rate/sw_decim,
+ num_inputs=2*nchan)
# taps for channel filter
chan_filt_coeffs = optfir.low_pass (1, # gain
@@ -131,7 +132,7 @@ class my_graph(stdgui.gui_flow_graph):
def main ():
- app = stdgui.stdapp(my_graph, "Multi Scope", nstatus=1)
+ app = stdgui2.stdapp(my_top_block, "Multi Scope", nstatus=1)
app.MainLoop()
if __name__ == '__main__':