From 3868a90728478e541d7b1b4864da1fbef59bcf34 Mon Sep 17 00:00:00 2001 From: Tim O'Shea Date: Wed, 8 May 2013 23:25:28 +0100 Subject: runtime: fix for thread safety issue during simultaneous use of stream tags and performance counters --- gnuradio-core/src/lib/runtime/gr_block_detail.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index af80e61cf..ecc0c1f98 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc @@ -261,6 +261,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) d_var_input_buffers_full[i] = 0; } for(size_t i=0; i < d_output.size(); i++) { + gr::thread::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast(d_output[i]->space_available()) / static_cast(d_output[i]->bufsize()); d_avg_output_buffers_full[i] = pfull; @@ -290,6 +291,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) } for(size_t i=0; i < d_output.size(); i++) { + gr::thread::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast(d_output[i]->space_available()) / static_cast(d_output[i]->bufsize()); -- cgit From 00796f668331ee9d4d00817dbe224b57be164d1a Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 8 May 2013 23:07:32 -0400 Subject: runtime: forgot to go back to the 'old' style using gruel. --- gnuradio-core/src/lib/runtime/gr_block_detail.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index ecc0c1f98..4922ea083 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc @@ -261,7 +261,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) d_var_input_buffers_full[i] = 0; } for(size_t i=0; i < d_output.size(); i++) { - gr::thread::scoped_lock guard(*d_output[i]->mutex()); + gruel::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast(d_output[i]->space_available()) / static_cast(d_output[i]->bufsize()); d_avg_output_buffers_full[i] = pfull; @@ -291,7 +291,7 @@ gr_block_detail::stop_perf_counters(int noutput_items, int nproduced) } for(size_t i=0; i < d_output.size(); i++) { - gr::thread::scoped_lock guard(*d_output[i]->mutex()); + gruel::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast(d_output[i]->space_available()) / static_cast(d_output[i]->bufsize()); -- cgit From 6681c27c4bf6bb648684e4d716983a556ad860e8 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 12 May 2013 11:25:35 +1000 Subject: utils: fix modtool template output signature --- gr-utils/src/python/modtool/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py index 58617336e..d7cfffd06 100644 --- a/gr-utils/src/python/modtool/templates.py +++ b/gr-utils/src/python/modtool/templates.py @@ -136,7 +136,7 @@ namespace gr { #if $blocktype == 'sink' #set $outputsig = '0, 0, 0' #else -#set $outputsig = '<+MIN_IN+>, <+MAX_IN+>, sizeof (<+float+>)' +#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof (<+float+>)' #end if /* * The private constructor -- cgit From 4850598303359963de1b84791f0d66b8f9c9ad9c Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 14 May 2013 18:36:25 +0100 Subject: modtool: fixed some setup for noblock gen. --- gr-utils/src/python/modtool/templates.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py index d7cfffd06..878baaadf 100644 --- a/gr-utils/src/python/modtool/templates.py +++ b/gr-utils/src/python/modtool/templates.py @@ -230,9 +230,10 @@ namespace gr { */ class ${modname.upper()}_API $blockname { + public: ${blockname}(${arglist}); ~${blockname}(); - private: + private: }; #else /*! @@ -496,12 +497,16 @@ gr_modtool help -- Shows the help for a given command. ''' # SWIG string Templates['swig_block_magic'] = """#if $version == '36' +#if $blocktype != 'noblock' GR_SWIG_BLOCK_MAGIC($modname, $blockname); +#end if %include "${modname}_${blockname}.h" #else %include "${modname}/${blockname}.h" +#if $blocktype != 'noblock' GR_SWIG_BLOCK_MAGIC2($modname, $blockname); #end if +#end if """ ## Old stuff -- cgit From 97dc187c612d8aa126215db708f265566fce0fda Mon Sep 17 00:00:00 2001 From: Marcus Leech Date: Tue, 19 Mar 2013 14:29:17 -0400 Subject: wxgui: make dummy set_callback stub in nongl sinks. Doesn't work, but also doesn't break the code. --- gr-wxgui/src/python/fftsink_nongl.py | 4 +++- gr-wxgui/src/python/waterfallsink_nongl.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gr-wxgui/src/python/fftsink_nongl.py b/gr-wxgui/src/python/fftsink_nongl.py index c38abbb22..473cc424c 100644 --- a/gr-wxgui/src/python/fftsink_nongl.py +++ b/gr-wxgui/src/python/fftsink_nongl.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2003,2004,2005,2006,2007,2009,2010 Free Software Foundation, Inc. +# Copyright 2003-2007,2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -99,6 +99,8 @@ class fft_sink_base(object): def _set_n(self): self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) + def set_callback(self, callb): + return class fft_sink_f(gr.hier_block2, fft_sink_base): def __init__(self, parent, baseband_freq=0, ref_scale=2.0, diff --git a/gr-wxgui/src/python/waterfallsink_nongl.py b/gr-wxgui/src/python/waterfallsink_nongl.py index 213415c82..bf77b4b13 100644 --- a/gr-wxgui/src/python/waterfallsink_nongl.py +++ b/gr-wxgui/src/python/waterfallsink_nongl.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2003,2004,2005,2007,2008 Free Software Foundation, Inc. +# Copyright 2003-2005,2007,2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -71,6 +71,9 @@ class waterfall_sink_base(object): def _set_n(self): self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) + def set_callback(self, callb): + return + class waterfall_sink_f(gr.hier_block2, waterfall_sink_base): def __init__(self, parent, baseband_freq=0, y_per_div=10, ref_level=50, sample_rate=1, fft_size=512, -- cgit From a0d37142a7b5144061af65c7bec2a4854a54a51c Mon Sep 17 00:00:00 2001 From: Tim Monahan-Mitchell Date: Sun, 19 May 2013 10:51:42 -0700 Subject: modtool: fix typo in help string --- gr-utils/src/python/modtool/modtool_newmod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gr-utils/src/python/modtool/modtool_newmod.py b/gr-utils/src/python/modtool/modtool_newmod.py index 0613d5fbe..e3b0e8e79 100644 --- a/gr-utils/src/python/modtool/modtool_newmod.py +++ b/gr-utils/src/python/modtool/modtool_newmod.py @@ -37,7 +37,7 @@ class ModToolNewModule(ModTool): def setup_parser(self): " Initialise the option parser for 'gr_modtool newmod' " parser = ModTool.setup_parser(self) - parser.usage = '%prog rm [options]. \n Call %prog without any options to run it interactively.' + parser.usage = '%prog nm [options]. \n Call %prog without any options to run it interactively.' ogroup = OptionGroup(parser, "New out-of-tree module options") ogroup.add_option("--srcdir", type="string", help="Source directory for the module template.") -- cgit From 41262d60f8d317edf3b1336417f499416ac42629 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Tue, 21 May 2013 09:16:02 -0700 Subject: Packaging work * Added missing wxgui Python OpenGL dependency * Added Ubuntu 13.04 support --- cmake/Packaging/Fedora-17.cmake | 2 +- cmake/Packaging/Fedora-18.cmake | 2 +- cmake/Packaging/Ubuntu-12.04.cmake | 2 +- cmake/Packaging/Ubuntu-12.10.cmake | 2 +- cmake/Packaging/Ubuntu-13.04.cmake | 12 ++++++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 cmake/Packaging/Ubuntu-13.04.cmake diff --git a/cmake/Packaging/Fedora-17.cmake b/cmake/Packaging/Fedora-17.cmake index 2e9e78ee1..13573ebac 100644 --- a/cmake/Packaging/Fedora-17.cmake +++ b/cmake/Packaging/Fedora-17.cmake @@ -4,7 +4,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy") +SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Fedora-18.cmake b/cmake/Packaging/Fedora-18.cmake index 2e9e78ee1..13573ebac 100644 --- a/cmake/Packaging/Fedora-18.cmake +++ b/cmake/Packaging/Fedora-18.cmake @@ -4,7 +4,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy") +SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Ubuntu-12.04.cmake b/cmake/Packaging/Ubuntu-12.04.cmake index 702ce574f..40f748fdf 100644 --- a/cmake/Packaging/Ubuntu-12.04.cmake +++ b/cmake/Packaging/Ubuntu-12.04.cmake @@ -4,7 +4,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-12.10.cmake b/cmake/Packaging/Ubuntu-12.10.cmake index 702ce574f..40f748fdf 100644 --- a/cmake/Packaging/Ubuntu-12.10.cmake +++ b/cmake/Packaging/Ubuntu-12.10.cmake @@ -4,7 +4,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-13.04.cmake b/cmake/Packaging/Ubuntu-13.04.cmake new file mode 100644 index 000000000..40f748fdf --- /dev/null +++ b/cmake/Packaging/Ubuntu-13.04.cmake @@ -0,0 +1,12 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") +SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl") +SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy") -- cgit From 21b7a228ae98c2e8f51ba80ba711b0cc32d6aa0c Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 22 May 2013 21:39:47 -0700 Subject: filter: fix pfb_arb_resampler XML for I/O types --- gr-filter/grc/pfb_arb_resampler.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gr-filter/grc/pfb_arb_resampler.xml b/gr-filter/grc/pfb_arb_resampler.xml index 774cb9186..3ad0d394a 100644 --- a/gr-filter/grc/pfb_arb_resampler.xml +++ b/gr-filter/grc/pfb_arb_resampler.xml @@ -56,10 +56,10 @@ in - complex + $type.input out - complex + $type.output -- cgit From bbd55843d06cb2a9ae1f025b3ef358595ed02299 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 23 May 2013 16:37:57 -0400 Subject: qtgui: init FFT Size box for QTGUI sink to the right FFT value. Issue #542. --- gr-qtgui/lib/SpectrumGUIClass.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc index d2dbc7772..3efba3f40 100644 --- a/gr-qtgui/lib/SpectrumGUIClass.cc +++ b/gr-qtgui/lib/SpectrumGUIClass.cc @@ -133,6 +133,10 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent, // GUI Thread only qApp->processEvents(); + + // Set the FFT Size combo box to display the right number + int idx = _spectrumDisplayForm->FFTSizeComboBox->findText(QString("%1").arg(_fftSize)); + _spectrumDisplayForm->FFTSizeComboBox->setCurrentIndex(idx); } void -- cgit From d1f48160a87388369c54c7c6eeef404c1a31fe3e Mon Sep 17 00:00:00 2001 From: Tim O'Shea Date: Thu, 23 May 2013 09:20:21 -0400 Subject: grc: remove "c" key shortcut for create heir action --- grc/gui/Actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py index 8087f4955..fab026c5e 100644 --- a/grc/gui/Actions.py +++ b/grc/gui/Actions.py @@ -202,7 +202,7 @@ BLOCK_CREATE_HIER = Action( label='C_reate Hier', tooltip='Create hier block from selected blocks', stock_id=gtk.STOCK_CONNECT, - keypresses=(gtk.keysyms.c, NO_MODS_MASK), +# keypresses=(gtk.keysyms.c, NO_MODS_MASK), ) BLOCK_CUT = Action( label='Cu_t', -- cgit From 2ebafea749da3101f4fb43d77444cedbc719ee08 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 24 May 2013 17:20:46 -0400 Subject: modtool: Fixes for intial templates of a block. 1. adds '$' to args in the GRC xml tag. 2. sets <+ITYPE+> and <+OTYPE+> for all I/O data types in io_signature and in work functions to be more clear what needs modification. Conflicts: gr-utils/src/python/modtool/templates.py --- gr-utils/src/python/modtool/code_generator.py | 2 ++ gr-utils/src/python/modtool/templates.py | 33 ++++++++++++++------------- gr-utils/src/python/modtool/util_functions.py | 6 +++++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/gr-utils/src/python/modtool/code_generator.py b/gr-utils/src/python/modtool/code_generator.py index 525b3d1e9..f6bfcd984 100644 --- a/gr-utils/src/python/modtool/code_generator.py +++ b/gr-utils/src/python/modtool/code_generator.py @@ -26,6 +26,7 @@ from util_functions import str_to_fancyc_comment from util_functions import str_to_python_comment from util_functions import strip_default_values from util_functions import strip_arg_types +from util_functions import strip_arg_types_grc class GRMTemplate(Cheetah.Template.Template): """ An extended template class """ @@ -43,6 +44,7 @@ class GRMTemplate(Cheetah.Template.Template): searchList['str_to_python_comment'] = str_to_python_comment searchList['strip_default_values'] = strip_default_values searchList['strip_arg_types'] = strip_arg_types + searchList['strip_arg_types_grc'] = strip_arg_types_grc Cheetah.Template.Template.__init__(self, src, searchList=searchList) self.grblocktype = self.grtypelist[searchList['blocktype']] diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py index 878baaadf..362912c06 100644 --- a/gr-utils/src/python/modtool/templates.py +++ b/gr-utils/src/python/modtool/templates.py @@ -118,7 +118,8 @@ namespace gr { ${blockname}::sptr ${blockname}::make(${strip_default_values($arglist)}) { - return gnuradio::get_initial_sptr (new ${blockname}_impl(${strip_arg_types($arglist)})); + return gnuradio::get_initial_sptr + (new ${blockname}_impl(${strip_arg_types($arglist)})); } #if $blocktype == 'decimator' @@ -131,12 +132,12 @@ namespace gr { #if $blocktype == 'source' #set $inputsig = '0, 0, 0' #else -#set $inputsig = '<+MIN_IN+>, <+MAX_IN+>, sizeof (<+float+>)' +#set $inputsig = '<+MIN_IN+>, <+MAX_IN+>, sizeof(<+ITYPE+>)' #end if #if $blocktype == 'sink' #set $outputsig = '0, 0, 0' #else -#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof (<+float+>)' +#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof(<+OTYPE+>)' #end if /* * The private constructor @@ -175,8 +176,8 @@ namespace gr { gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; + const <+ITYPE*> *in = (const <+ITYPE*> *) input_items[0]; + <+OTYPE*> *out = (<+OTYPE*> *) output_items[0]; // Do <+signal processing+> // Tell runtime system how many input items we consumed on @@ -194,8 +195,8 @@ namespace gr { gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; + const <+ITYPE+> *in = (const <+ITYPE+> *) input_items[0]; + <+OTYPE+> *out = (<+OTYPE+> *) output_items[0]; // Do <+signal processing+> @@ -294,12 +295,12 @@ import numpy #if $blocktype == 'source' #set $inputsig = '0, 0, 0' #else -#set $inputsig = '<+MIN_IN+>, <+MAX_IN+>, gr.sizeof_<+float+>' +#set $inputsig = '<+MIN_IN+>, <+MAX_IN+>, gr.sizeof_<+ITYPE+>' #end if #if $blocktype == 'sink' #set $outputsig = '0, 0, 0' #else -#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, gr.sizeof_<+float+>' +#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, gr.sizeof_<+OTYPE+>' #end if #end if #if $blocktype == 'interpolator' @@ -455,7 +456,7 @@ Templates['grc_xml'] = ''' ${modname}_$blockname $modname import $modname - ${modname}.${blockname}(${strip_arg_types($arglist)}) + ${modname}.${blockname}(${strip_arg_types_grc($arglist)})