diff options
Diffstat (limited to 'gr-qtgui/apps/pyqt_example_f.py')
-rwxr-xr-x | gr-qtgui/apps/pyqt_example_f.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gr-qtgui/apps/pyqt_example_f.py b/gr-qtgui/apps/pyqt_example_f.py index 6b2131019..2d957c85a 100755 --- a/gr-qtgui/apps/pyqt_example_f.py +++ b/gr-qtgui/apps/pyqt_example_f.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -from gnuradio import gr, blks2 +from gnuradio import gr from gnuradio import qtgui from PyQt4 import QtGui, QtCore import sys, sip @@ -117,6 +117,8 @@ class my_top_block(gr.top_block): src2 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_ff() thr = gr.throttle(gr.sizeof_float, 100*fftsize) + noise = gr.noise_source_f(gr.GR_GAUSSIAN, 0.001) + add = gr.add_ff() self.snk1 = qtgui.sink_f(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 0, Rs, "Float Signal Example", @@ -124,7 +126,9 @@ class my_top_block(gr.top_block): self.connect(src1, (src,0)) self.connect(src2, (src,1)) - self.connect(src, thr, self.snk1) + self.connect(src, thr, (add,0)) + self.connect(noise, (add,1)) + self.connect(add, self.snk1) self.ctrl_win = control_box() self.ctrl_win.attach_signal1(src1) @@ -144,5 +148,5 @@ class my_top_block(gr.top_block): if __name__ == "__main__": tb = my_top_block(); tb.start() - sys.exit(tb.qapp.exec_()) - + tb.qapp.exec_() + tb.stop() |