summaryrefslogtreecommitdiff
path: root/gsm-tvoid/src/python
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2008-11-25 15:03:14 +0530
committerHarald Welte <laforge@gnumonks.org>2010-06-30 13:02:55 +0200
commit714da0d58ec57c4ffbccc74c4b43eaf1d9eaaea6 (patch)
tree03dd3b4da73b74e3055d84697b691e095d533b5d /gsm-tvoid/src/python
parent69103cef228fa3430d33233332a8329584971570 (diff)
Migration of flow_graph to top_block
Initial patch to make gsm-tvoid and gssm work with current gnuradio svn (which has various API changes)
Diffstat (limited to 'gsm-tvoid/src/python')
-rwxr-xr-xgsm-tvoid/src/python/gsm_scan.py22
-rwxr-xr-xgsm-tvoid/src/python/qa_gsm.py2
2 files changed, 12 insertions, 12 deletions
diff --git a/gsm-tvoid/src/python/gsm_scan.py b/gsm-tvoid/src/python/gsm_scan.py
index a366960..aa19368 100755
--- a/gsm-tvoid/src/python/gsm_scan.py
+++ b/gsm-tvoid/src/python/gsm_scan.py
@@ -17,11 +17,11 @@ for extdir in ['../lib','../lib/.libs']:
if extdir not in sys.path:
sys.path.append(extdir)
-from gnuradio import gr, gru, blks
+from gnuradio import gr, gru, blks2
from gnuradio import usrp
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider
+from gnuradio.wxgui import stdgui2, fftsink2, waterfallsink2, scopesink2, form, slider
from optparse import OptionParser
from math import pi
import wx
@@ -161,10 +161,10 @@ def get_arfcn_from_freq(freq,region):
return arfcn
####################
-class app_flow_graph(stdgui.gui_flow_graph):
+class app_flow_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
@@ -460,31 +460,31 @@ class app_flow_graph(stdgui.gui_flow_graph):
def setup_scopes(self):
#Input FFT
if self.scopes.count("I"):
- self.input_fft_scope = fftsink.fft_sink_c (self, self.panel, fft_size=1024, sample_rate=self.input_rate)
+ self.input_fft_scope = fftsink2.fft_sink_c (self.panel, fft_size=1024, sample_rate=self.input_rate)
self.connect(self.source, self.input_fft_scope)
#Filter FFT
if self.scopes.count("F"):
- self.filter_fft_scope = fftsink.fft_sink_c (self, self.panel, fft_size=1024, sample_rate=self.input_rate)
+ self.filter_fft_scope = fftsink2.fft_sink_c (self.panel, fft_size=1024, sample_rate=self.input_rate)
self.connect(self.filter, self.filter_fft_scope)
#Burst Scope
if self.scopes.count("b"):
- self.burst_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
+ self.burst_scope = scopesink2.scope_sink_f(self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
self.connect(self.v2s, self.burst_scope)
#burst_f options
if self.options.decoder.count("f"):
if self.scopes.count("d"):
- self.demod_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.input_rate)
+ self.demod_scope = scopesink2.scope_sink_f(self.panel, sample_rate=self.input_rate)
self.connect(self.demod, self.demod_scope)
if self.scopes.count("c"):
#f_flowgraph
- self.clocked_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
+ self.clocked_scope = scopesink2.scope_sink_f(self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
self.connect(self.clocker, self.clocked_scope)
#for testing: f_flowgraph2
- #self.clocked_scope = scopesink.scope_sink_c(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
+ #self.clocked_scope = scopesink2.scope_sink_c(self.panel, sample_rate=self.gsm_symb_rate,v_scale=1)
#self.connect(self.clocker, self.clocked_scope)
#self.connect((self.clocker,1),(self.clocked_scope,1))
@@ -723,7 +723,7 @@ class app_flow_graph(stdgui.gui_flow_graph):
####################
def main():
- app = stdgui.stdapp(app_flow_graph, "GSM Scanner", nstatus=1)
+ app = stdgui2.stdapp(app_flow_graph, "GSM Scanner", nstatus=1)
app.MainLoop()
####################
diff --git a/gsm-tvoid/src/python/qa_gsm.py b/gsm-tvoid/src/python/qa_gsm.py
index 5709756..ccb3328 100755
--- a/gsm-tvoid/src/python/qa_gsm.py
+++ b/gsm-tvoid/src/python/qa_gsm.py
@@ -8,7 +8,7 @@ import gsm
class qa_gsm (gr_unittest.TestCase):
def setUp (self):
- self.fg = gr.flow_graph ()
+ self.fg = gr.top_block ()
def tearDown (self):
self.fg = None
personal git repositories of Harald Welte. Your mileage may vary