discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Wideband Spectrum Analyzer


From: Santi Ortega
Subject: Re: [Discuss-gnuradio] Wideband Spectrum Analyzer
Date: Tue, 28 Oct 2008 11:43:15 +0000

USRP_SPECTRUM_SENSE.PY

How can I use the self.max_freq and self.min_freq like a global variable?
I want to use it in the def main_loop(tb):
but if I use it

That's the given error:
Traceback (most recent call last):
  File "./spectrum_output.py", line 309, in <module>
    main_loop(tb)
  File "./spectrum_output.py", line 246, in main_loop
    print min_freq, max_freq
NameError: global name 'min_freq' is not defined


I tried to put
max_freq = self.max_freq
min_freq = self.min_freq

in the
class my_top_block(gr.top_block):

    def __init__(self):
        gr.top_block.__init__(self)

where it's the first time it's used.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]