diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/Packaging/Fedora-17.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Fedora-18.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-12.04.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-12.10.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-13.04.cmake | 12 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block_detail.cc | 2 | ||||
-rw-r--r-- | gr-filter/grc/pfb_arb_resampler.xml | 4 | ||||
-rw-r--r-- | gr-qtgui/lib/SpectrumGUIClass.cc | 4 | ||||
-rw-r--r-- | gr-utils/src/python/modtool/code_generator.py | 2 | ||||
-rw-r--r-- | gr-utils/src/python/modtool/modtool_newmod.py | 2 | ||||
-rw-r--r-- | gr-utils/src/python/modtool/templates.py | 40 | ||||
-rw-r--r-- | gr-utils/src/python/modtool/util_functions.py | 6 | ||||
-rw-r--r-- | gr-wxgui/src/python/fftsink_nongl.py | 4 | ||||
-rw-r--r-- | gr-wxgui/src/python/waterfallsink_nongl.py | 5 | ||||
-rw-r--r-- | grc/gui/Actions.py | 2 |
16 files changed, 65 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e4ef378..6266dddaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) set(VERSION_INFO_MAJOR_VERSION 3) set(VERSION_INFO_API_COMPAT 6) set(VERSION_INFO_MINOR_VERSION 4) -set(VERSION_INFO_MAINT_VERSION 1) +set(VERSION_INFO_MAINT_VERSION 2) include(GrVersion) #setup version info # Append -O2 optimization flag for Debug builds 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") diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index af80e61cf..4922ea083 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++) { + gruel::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast<float>(d_output[i]->space_available()) / static_cast<float>(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++) { + gruel::scoped_lock guard(*d_output[i]->mutex()); float pfull = 1.0f - static_cast<float>(d_output[i]->space_available()) / static_cast<float>(d_output[i]->bufsize()); 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 @@ </param> <sink> <name>in</name> - <type>complex</type> + <type>$type.input</type> </sink> <source> <name>out</name> - <type>complex</type> + <type>$type.output</type> </source> </block> 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 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/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.") diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py index 58617336e..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_IN+>, <+MAX_IN+>, 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+> @@ -230,9 +231,10 @@ namespace gr { */ class ${modname.upper()}_API $blockname { + public: ${blockname}(${arglist}); ~${blockname}(); - private: + private: }; #else /*! @@ -293,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' @@ -454,7 +456,7 @@ Templates['grc_xml'] = '''<?xml version="1.0"?> <key>${modname}_$blockname</key> <category>$modname</category> <import>import $modname</import> - <make>${modname}.${blockname}(${strip_arg_types($arglist)})</make> + <make>${modname}.${blockname}(${strip_arg_types_grc($arglist)})</make> <!-- Make one 'param' node for every Parameter you want settable from the GUI. Sub-nodes: * name @@ -496,12 +498,16 @@ gr_modtool help <command> -- 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 @@ -542,12 +548,12 @@ ${modname}_make_${blockname} (${strip_default_values($arglist)}) #if $blocktype == 'sink' #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 == 'source' #set $outputsig = '0, 0, 0' #else -#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof (<+float+>)' +#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof(<+OTYPE+>)' #end if /* @@ -591,8 +597,8 @@ ${modname}_${blockname}::general_work (int noutput_items, 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 @@ -610,8 +616,8 @@ ${modname}_${blockname}::work(int noutput_items, 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+> diff --git a/gr-utils/src/python/modtool/util_functions.py b/gr-utils/src/python/modtool/util_functions.py index c40dbd73b..9551056f0 100644 --- a/gr-utils/src/python/modtool/util_functions.py +++ b/gr-utils/src/python/modtool/util_functions.py @@ -81,6 +81,12 @@ def strip_arg_types(string): string = strip_default_values(string) return ", ".join([part.strip().split(' ')[-1] for part in string.split(',')]) +def strip_arg_types_grc(string): + """" Strip the argument types from a list of arguments for GRC make tag. + Example: "int arg1, double arg2" -> "$arg1, $arg2" """ + string = strip_default_values(string) + return ", ".join(['$' + part.strip().split(' ')[-1] for part in string.split(',')]) + def get_modname(): """ Grep the current module's name from gnuradio.project or CMakeLists.txt """ modname_trans = {'howto-write-a-block': 'howto'} 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, 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', |