diff options
author | Thomas Tsou | 2011-12-21 10:55:09 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-12-21 10:55:09 -0500 |
commit | 8b05eb2b8e3b8350e449bbe3f5fac37bc08e2850 (patch) | |
tree | cb4aaa8b855b89c98661f68cc87acd3d11ebb618 | |
parent | f6a63cd40001514d1118eb482e2926eb2dc7e685 (diff) | |
download | gnuradio-8b05eb2b8e3b8350e449bbe3f5fac37bc08e2850.tar.gz gnuradio-8b05eb2b8e3b8350e449bbe3f5fac37bc08e2850.tar.bz2 gnuradio-8b05eb2b8e3b8350e449bbe3f5fac37bc08e2850.zip |
uhd: bug fix for GIL issues in bin_statistics. The usrp_spectrum_sense.py program looks like it's working again.
-rwxr-xr-x | gr-uhd/examples/usrp_spectrum_sense.py | 13 |
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() |