Hi all, We created a new module called radar(gr-radar folder created) and a block called lfm_source_c. Eventually, this new block will create a chirp style signal. We are trying to use in a Python file. The Python code was working perfectly fine when we used the gr signal source to generate a square wave. The wave transmitted to a scope sink and to our USRP N210.
We successfully installed the new module with "make install". We added an "import radar" statement at the beginning of the file which in and of itself didn't cause any errors. We got a whole list of errors when we tried to use the source in python. src = radar.lfm_source_c (wave_freq, pulse_width, pulse_rep_int, sample_rate, 2.0, 0) gr-radar is in our home path, but not the GNU Radio path (which I think is correct). Can anyone give us any insight into this problem? This is the first block we've created so don't have any experience with this. I will also include our error list below. Thanks for any help you can give! Below is the terminal output: Traceback (most recent call last): File "chirp_test_gui.py", line 82, in <module> main () File "chirp_test_gui.py", line 78, in main app = stdgui2.stdapp(tx_sink, "Transmitted Signal", nstatus=1) File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 38, in __init__ wx.App.__init__ (self, redirect=False) File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__ self._BootstrapApp() File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 42, in OnInit self._max_noutput_items) File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 64, in __init__ self.panel = stdpanel (self, self, top_block_maker, max_nouts) File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 86, in __init__ self.top_block = top_block_maker (frame, self, vbox, sys.argv) File "chirp_test_gui.py", line 69, in __init__ sig0 = tx_test(options.freq,options.pulse_width,options.pulse_rep_int,options.samp_rate) File "chirp_test_gui.py", line 26, in __init__ 0) # DC Offset File "/usr/local/lib/python2.7/dist-packages/radar/radar_swig.py", line 319, in __init__ def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") AttributeError: No constructor defined
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio