On Wed, Dec 21, 2011 at 8:36 AM, Sebastian Döring
<sdoer...@rhrk.uni-kl.de>wrote:
>
> Thank you guys - it worked!
> The line positions have a changed a bit and so I simply attached the new
> code (gnuradio build 20.12.2011).
>
> --- a/usrp_spectrum_sense.py    2011-12-20 12:44:55.000000000 +0100
> +++ b/usrp_spectrum_sense.py    2011-12-21 14:26:19.252873684 +0100
> @@ -28,9 +28,14 @@
>
>  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")
>
>  +class ThreadClass(threading.Thread):
> +    def run(self):
> +        return
> +
>  class tune(gr.feval_dd):
>     """
>     This class allows C++ code to callback into python.
> @@ -240,6 +245,9 @@
>
>
>  if __name__ == '__main__':
> +    t = ThreadClass()
> +    t.start()
> +
>     tb = my_top_block()
>     try:
>         tb.start()
>
> Regards
> Sebastian
>

Sebastian, thanks for the report!

Tom T., thanks for the patch! I updated the code in maint/master/next. It
worked on my machine, too. If anyone who wants to use
usrp_spectrum_sense.py and has more issues, please let us know.

Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to