summaryrefslogtreecommitdiff
path: root/gr-qtgui/examples/pyqt_waterfall_f.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 14:28:22 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 14:40:43 -0500
commitfd110bdbbe8bc40781c34f33c70deec5b7931109 (patch)
treeef18e813add19b09c57cc21cb672ea602701405b /gr-qtgui/examples/pyqt_waterfall_f.py
parent0c9c16fb008b02a5af39fb22e18acfff2dbd933a (diff)
analog: Removing reference to gr.sig_source_X and gr.noise_source_X where possible.
Passing make and make test. Examples and apps need testing. gr-filter relies on sig_source and noise_source, so can't remove them from core.
Diffstat (limited to 'gr-qtgui/examples/pyqt_waterfall_f.py')
-rwxr-xr-xgr-qtgui/examples/pyqt_waterfall_f.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/gr-qtgui/examples/pyqt_waterfall_f.py b/gr-qtgui/examples/pyqt_waterfall_f.py
index 29ae259e5f..ff79924843 100755
--- a/gr-qtgui/examples/pyqt_waterfall_f.py
+++ b/gr-qtgui/examples/pyqt_waterfall_f.py
@@ -28,7 +28,13 @@ try:
from PyQt4 import QtGui, QtCore
import sip
except ImportError:
- print "Error: Program requires PyQt4 and gr-qtgui."
+ sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n")
+ sys.exit(1)
+
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
class dialog_box(QtGui.QWidget):
@@ -139,11 +145,11 @@ class my_top_block(gr.top_block):
self.qapp = QtGui.QApplication(sys.argv)
- src1 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0)
- src2 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0)
+ src1 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f1, 0.1, 0)
+ src2 = analog.sig_source_f(Rs, analog.GR_SIN_WAVE, f2, 0.1, 0)
src = gr.add_ff()
thr = gr.throttle(gr.sizeof_float, 100*npts)
- self.snk1 = qtgui.waterfall_sink_f(npts, gr.firdes.WIN_BLACKMAN_hARRIS,
+ self.snk1 = qtgui.waterfall_sink_f(npts, filter.firdes.WIN_BLACKMAN_hARRIS,
0, Rs,
"Real Waterfall Example")