summaryrefslogtreecommitdiff
path: root/gr-qtgui/examples/pyqt_time_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/examples/pyqt_time_c.py')
-rwxr-xr-xgr-qtgui/examples/pyqt_time_c.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/gr-qtgui/examples/pyqt_time_c.py b/gr-qtgui/examples/pyqt_time_c.py
index 04425e11f1..cadee33cad 100755
--- a/gr-qtgui/examples/pyqt_time_c.py
+++ b/gr-qtgui/examples/pyqt_time_c.py
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr
+from gnuradio import gr, filter
import sys
try:
@@ -142,16 +142,16 @@ 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 = gr.channel_model(0.01)
+ channel = filter.channel_model(0.01)
thr = gr.throttle(gr.sizeof_gr_complex, 100*npts)
self.snk1 = qtgui.time_sink_c(npts, Rs,
- "Complex Time Example", 3)
+ "Complex Time Example", 1)
self.connect(src1, (src,0))
self.connect(src2, (src,1))
self.connect(src, channel, thr, (self.snk1, 0))
- self.connect(src1, (self.snk1, 1))
- self.connect(src2, (self.snk1, 2))
+ #self.connect(src1, (self.snk1, 1))
+ #self.connect(src2, (self.snk1, 2))
self.ctrl_win = control_box()
self.ctrl_win.attach_signal1(src1)
@@ -169,14 +169,16 @@ class my_top_block(gr.top_block):
pyWin, QtCore.SLOT("setTitle(int, QString)"))
pyWin.emit(QtCore.SIGNAL("setTitle(int, QString)"), 0, "Re{sum}")
self.snk1.set_title(1, "Im{Sum}")
- self.snk1.set_title(2, "Re{src1}")
- self.snk1.set_title(3, "Im{src1}")
- self.snk1.set_title(4, "Re{src2}")
- self.snk1.set_title(5, "Im{src2}")
+ #self.snk1.set_title(2, "Re{src1}")
+ #self.snk1.set_title(3, "Im{src1}")
+ #self.snk1.set_title(4, "Re{src2}")
+ #self.snk1.set_title(5, "Im{src2}")
# Can also set the color of a curve
#self.snk1.set_color(5, "blue")
+ self.snk1.set_update_time(0.5)
+
#pyWin.show()
self.main_box = dialog_box(pyWin, self.ctrl_win)
self.main_box.show()