diff options
author | jcorgan | 2009-04-16 07:54:34 +0000 |
---|---|---|
committer | jcorgan | 2009-04-16 07:54:34 +0000 |
commit | 6556095628428156c790b1bd9be67dc3e4c0a797 (patch) | |
tree | a6a7ba667f03be27f0529f3f5ce1d10883c72c05 /gr-qtgui/src/python | |
parent | fcc7d7047805520c987fbb4f503538eccd659f34 (diff) | |
download | gnuradio-6556095628428156c790b1bd9be67dc3e4c0a797.tar.gz gnuradio-6556095628428156c790b1bd9be67dc3e4c0a797.tar.bz2 gnuradio-6556095628428156c790b1bd9be67dc3e4c0a797.zip |
Change our examples to use gr.channel_model instead of blks2.channel_model
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10861 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-qtgui/src/python')
-rwxr-xr-x | gr-qtgui/src/python/pyqt_example.py | 4 | ||||
-rwxr-xr-x | gr-qtgui/src/python/qt_digital.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gr-qtgui/src/python/pyqt_example.py b/gr-qtgui/src/python/pyqt_example.py index 27b949c81..ac636295d 100755 --- a/gr-qtgui/src/python/pyqt_example.py +++ b/gr-qtgui/src/python/pyqt_example.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from gnuradio import gr, blks2 +from gnuradio import gr from gnuradio.qtgui import qtgui from PyQt4 import QtGui, QtCore import sys, sip @@ -111,7 +111,7 @@ class my_top_block(gr.top_block): src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0) src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_cc() - channel = blks2.channel_model(0.001) + channel = gr.channel_model(0.001) thr = gr.throttle(gr.sizeof_gr_complex, 100*fftsize) self.snk1 = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, -Rs/2, Rs/2, diff --git a/gr-qtgui/src/python/qt_digital.py b/gr-qtgui/src/python/qt_digital.py index 55be56b17..2583bf1da 100755 --- a/gr-qtgui/src/python/qt_digital.py +++ b/gr-qtgui/src/python/qt_digital.py @@ -74,7 +74,7 @@ class control_panel(QtGui.QWidget): def noiseEditText(self): try: noise = self.noiseEdit.text().toDouble()[0] - self.channel.noise.set_amplitude(noise) + self.channel.set_noise_voltage(noise) self.noise = noise except RuntimeError: @@ -83,7 +83,7 @@ class control_panel(QtGui.QWidget): def freqEditText(self): try: freq = self.freqEdit.text().toDouble()[0] - self.channel.freq_offset.set_frequency(freq) + self.channel.set_frequency_offset(freq) self.freq = freq except RuntimeError: @@ -92,7 +92,7 @@ class control_panel(QtGui.QWidget): def timeEditText(self): try: to = self.timeEdit.text().toDouble()[0] - self.channel.timing_offset.set_interp_ratio(to) + self.channel.set_timing_offset(to) self.timing_offset = to except RuntimeError: @@ -121,7 +121,7 @@ class my_top_block(gr.top_block): noise = 1e-7 fo = 1e-6 to = 1.0 - channel = blks2.channel_model(noise, fo, to) + channel = gr.channel_model(noise, fo, to) thr = gr.throttle(gr.sizeof_gr_complex, 10*fftsize) self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, -1/2, 1/2, |