discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] bug in gr-wxgui/src/python/numbersink2.py


From: Achilleas Anastasopoulos
Subject: [Discuss-gnuradio] bug in gr-wxgui/src/python/numbersink2.py
Date: Wed, 06 May 2009 16:45:20 -0400
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

When the numbersink2 is instantiated with "average=True",
an error is generated.

Please see attached test case.

It is related to the instantiation of the iir filter required for averaging...

Achilleas

address@hidden gnuradio_trunk]$ svn diff gr-wxgui/src/python/numbersink2.py 
Index: gr-wxgui/src/python/numbersink2.py
===================================================================
--- gr-wxgui/src/python/numbersink2.py  (revision 10929)
+++ gr-wxgui/src/python/numbersink2.py  (working copy)
@@ -151,7 +151,7 @@
 
         sink1 = number_sink_f (panel, unit='V',label="Real Data", 
avg_alpha=0.001,
                             sample_rate=input_rate, minval=-1, maxval=1,
-                            ref_level=0, decimal_places=3)
+                            ref_level=0, decimal_places=3,average=True)
         vbox.Add (sink1.win, 1, wx.EXPAND)
         sink2 = number_sink_c (panel, unit='V',label="Complex Data", 
avg_alpha=0.001,
                             sample_rate=input_rate, minval=-1, maxval=1,




address@hidden python]$ python numbersink2.py
Traceback (most recent call last):
  File "numbersink2.py", line 169, in <module>
    main ()
  File "numbersink2.py", line 165, in main
    app = stdgui2.stdapp (test_app_flow_graph, "Number Sink Test App")
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line 
36, in __init__
    wx.App.__init__ (self, redirect=False)
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 
7935, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 
7509, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line 
39, in OnInit
    frame = stdframe (self.top_block_maker, self.title, self._nstatus)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line 
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line 
81, in __init__
    self.top_block = top_block_maker (frame, self, vbox, sys.argv)
  File "numbersink2.py", line 154, in __init__
    ref_level=0, decimal_places=3,average=True)
  File "numbersink2.py", line 95, in __init__
    self.controller[AVERAGE_KEY] = average
  File "/home/anastas/gnuradio_trunk/gr-wxgui/src/python/pubsub.py", line 52, 
in __setitem__
    sub(val)
  File "numbersink2.py", line 91, in update_avg
    if self.controller[AVERAGE_KEY]: 
avg.set_taps(self.controller[AVG_ALPHA_KEY])
  File 
"/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_py_filter.py",
 line 251, in set_taps
    return 
_gnuradio_swig_py_filter.gr_single_pole_iir_filter_ff_sptr_set_taps(*args, 
**kwargs)
TypeError: in method 'gr_single_pole_iir_filter_ff_sptr_set_taps', argument 2 
of type 'double'



reply via email to

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