summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2011-12-21 10:56:20 -0500
committerTom Rondeau2011-12-21 10:56:20 -0500
commitd0a7de063ce737f186b3e750d1b01b1707b916a6 (patch)
treeac6d41b95260586bc5def0f4750e8652e3f07c87
parentf88a1e61f291e8384ee2c3357ccbddb807ac08a9 (diff)
parent8b05eb2b8e3b8350e449bbe3f5fac37bc08e2850 (diff)
downloadgnuradio-d0a7de063ce737f186b3e750d1b01b1707b916a6.tar.gz
gnuradio-d0a7de063ce737f186b3e750d1b01b1707b916a6.tar.bz2
gnuradio-d0a7de063ce737f186b3e750d1b01b1707b916a6.zip
Merge branch 'maint'
-rwxr-xr-xgr-uhd/examples/usrp_spectrum_sense.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/gr-uhd/examples/usrp_spectrum_sense.py b/gr-uhd/examples/usrp_spectrum_sense.py
index 55e0c6152..355a55a98 100755
--- a/gr-uhd/examples/usrp_spectrum_sense.py
+++ b/gr-uhd/examples/usrp_spectrum_sense.py
@@ -28,9 +28,14 @@ from optparse import OptionParser
import sys
import math
import struct
+import threading
-sys.stderr.write("Warning: this is known to have issues on some machines+Python version combinations to seg fault due to the callback in bin_statitics. If you figure out why, we'd love to hear about it!\n")
+sys.stderr.write("Warning: this may have issues on some machines+Python version combinations to seg fault due to the callback in bin_statitics.\n\n")
+class ThreadClass(threading.Thread):
+ def run(self):
+ return
+
class tune(gr.feval_dd):
"""
This class allows C++ code to callback into python.
@@ -131,7 +136,8 @@ class my_top_block(gr.top_block):
print "Note: failed to enable realtime scheduling"
# build graph
- self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
+ self.u = uhd.usrp_source(device_addr=options.args,
+ stream_args=uhd.stream_args('fc32'))
# Set the subdevice spec
if(options.spec):
@@ -240,6 +246,9 @@ def main_loop(tb):
if __name__ == '__main__':
+ t = ThreadClass()
+ t.start()
+
tb = my_top_block()
try:
tb.start()