[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] problem with my program ( fft display frequency spott
From: |
Icsor Onai |
Subject: |
[Discuss-gnuradio] problem with my program ( fft display frequency spotting) |
Date: |
Wed, 26 Oct 2005 19:15:51 +0000 (GMT) |
Hello everybody,
I tried do a program that use the board mc4020 but
occured errors when I execute your script.
I would like to know if somebody implemented a fft
display frequency spotting using the board mc4020.
I find a program using the usrp developed by Chuck
Swiger but I didn`t find a program to the board mc4020
My program is this:
"
#!/usr/bin/env python
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it
and/or modify
# it under the terms of the GNU General Public License
as published by
# the Free Software Foundation; either version 2, or
(at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be
useful,
# but WITHOUT ANY WARRANTY; without even the implied
warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General
Public License
# along with GNU Radio; see the file COPYING. If not,
write to
# the Free Software Foundation, Inc., 59 Temple Place
- Suite 330,
# Boston, MA 02111-1307, USA.
#
from gnuradio import gr
from gnuradio import mc4020
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from gnuradio.wxgui import stdgui, fftsink
from optparse import OptionParser
import wx
import wx.lib.evtmgr as em
class app_flow_graph (stdgui.gui_flow_graph):
def __init__(self, frame, panel, vbox, argv):
stdgui.gui_flow_graph.__init__ (self, frame,
panel, vbox, argv)
wx.ToolTip.Enable(True)
wx.ToolTip.SetDelay(0)
parser = OptionParser (option_class=eng_option)
(options, args) = parser.parse_args ()
input_rate = 20e6
src = mc4020.source (input_rate,
mc4020.MCC_CH3_EN | mc4020.MCC_ALL_1V)
cvt = gr.short_to_float ()
block, fft_win = fftsink.make_fft_sink_f
(self, panel, "Rx Data", 512, input_rate)
self.connect (src, cvt)
self.connect (cvt, block)
vbox.Add (fft_win, 1, wx.EXPAND)
self.update_status_bar ()
em.eventManager.Register(self.Mouse, wx.EVT_MOTION,
fft_win)
def Mouse(self,event):
fRel = ( event.GetX() - 48 ) / 141.5 - 2
self.fft.win.SetToolTip(wx.ToolTip(eng_notation.num_to_str(self.frequency
+ (fRel*1e6))))
def handle_text_enter (self, event):
str = event.GetString ()
self.tc_freq.Clear ()
cvt.set_rx_freq (0, eng_notation.str_to_num
(str))
self.update_status_bar ()
self.frame.GetStatusBar().SetStatusText (msg,
1)
def main ():
app = stdgui.stdapp (app_flow_graph, "FFT")
app.MainLoop ()
if __name__ == '__main__':
main ()
"
Thanks
_______________________________________________________
Promoção Yahoo! Acesso Grátis: a cada hora navegada você
acumula cupons e concorre a mais de 500 prêmios! Participe!
http://yahoo.fbiz.com.br/
- [Discuss-gnuradio] problem with my program ( fft display frequency spotting),
Icsor Onai <=