From 241cacef600c0cc5eaaa560959958ad2784970cb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 14 Jan 2013 17:40:40 -0600 Subject: core: gr_socket_pdu missing iostream --- gnuradio-core/src/lib/io/gr_socket_pdu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gnuradio-core/src/lib/io/gr_socket_pdu.h b/gnuradio-core/src/lib/io/gr_socket_pdu.h index e30a4cc6c..2fedb317d 100644 --- a/gnuradio-core/src/lib/io/gr_socket_pdu.h +++ b/gnuradio-core/src/lib/io/gr_socket_pdu.h @@ -30,6 +30,7 @@ #include #include #include +#include class gr_socket_pdu; typedef boost::shared_ptr gr_socket_pdu_sptr; -- cgit From e7b6bcc4639464a4661d20c055cc43948eaa7e97 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 14 Jan 2013 17:41:04 -0600 Subject: block: file_source_impl missing mutex include --- gr-blocks/lib/file_source_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gr-blocks/lib/file_source_impl.h b/gr-blocks/lib/file_source_impl.h index 600fe80ab..fc7f8053d 100644 --- a/gr-blocks/lib/file_source_impl.h +++ b/gr-blocks/lib/file_source_impl.h @@ -24,6 +24,7 @@ #define INCLUDED_BLOCKS_FILE_SOURCE_IMPL_H #include +#include namespace gr { namespace blocks { -- cgit From 5099198a501d7ef22a8cbfecfd410cf3619a36c5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 14 Jan 2013 17:41:27 -0600 Subject: core: removed redundant test settings --- gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt index 62f3d7e46..bd78c8fb4 100644 --- a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt +++ b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt @@ -43,13 +43,6 @@ include(GrTest) file(GLOB py_qa_test_files "qa_*.py") foreach(py_qa_test_file ${py_qa_test_files}) get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) - set(GR_TEST_PYTHON_DIRS - ${CMAKE_SOURCE_DIR}/gruel/src/python - ${CMAKE_BINARY_DIR}/gruel/src/swig - ${CMAKE_BINARY_DIR}/gnuradio-core/src/python - ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig - ) - set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core) GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) -- cgit From db627dafee41444f42c2c44b0aa971f41883a44f Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Tue, 15 Jan 2013 05:16:39 -0800 Subject: wxgui: dead code removal and formatting cleanup --- gr-wxgui/src/python/plotter/plotter_base.py | 67 +++++++++++++---------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py index 2fdd0f20a..41c94e5e0 100644 --- a/gr-wxgui/src/python/plotter/plotter_base.py +++ b/gr-wxgui/src/python/plotter/plotter_base.py @@ -88,9 +88,9 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): """ attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA) wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList); - self.use_persistence=False - self.persist_alpha=2.0/15 - self.clear_accum=True + self.use_persistence=False + self.persist_alpha=2.0/15 + self.clear_accum=True self._gl_init_flag = False self._resized_flag = True self._init_fcns = list() @@ -100,12 +100,12 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): self.Bind(wx.EVT_SIZE, self._on_size) self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None) - def set_use_persistence(self,enable): - self.use_persistence=enable - self.clear_accum=True + def set_use_persistence(self,enable): + self.use_persistence=enable + self.clear_accum=True - def set_persist_alpha(self,analog_alpha): - self.persist_alpha=analog_alpha + def set_persist_alpha(self,analog_alpha): + self.persist_alpha=analog_alpha def new_gl_cache(self, draw_fcn, draw_pri=50): """ @@ -141,7 +141,7 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): """ self.lock() self._resized_flag = True - self.clear_accum=True + self.clear_accum=True self.unlock() def _on_paint(self, event): @@ -153,12 +153,14 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): """ self.lock() self.SetCurrent() - #check if gl was initialized + + # check if gl was initialized if not self._gl_init_flag: GL.glClearColor(*BACKGROUND_COLOR_SPEC) for fcn in self._init_fcns: fcn() self._gl_init_flag = True - #check for a change in window size + + # check for a change in window size if self._resized_flag: self.width, self.height = self.GetSize() GL.glMatrixMode(GL.GL_PROJECTION) @@ -169,35 +171,28 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): GL.glViewport(0, 0, self.width, self.height) for cache in self._gl_caches: cache.changed(True) self._resized_flag = False - #clear, draw functions, swap - GL.glClear(GL.GL_COLOR_BUFFER_BIT) - - if False: - GL.glEnable (GL.GL_LINE_SMOOTH) - GL.glEnable (GL.GL_POLYGON_SMOOTH) - GL.glEnable (GL.GL_BLEND) - GL.glBlendFunc (GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA) - GL.glHint (GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST) #GL.GL_DONT_CARE) - GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST) - #GL.glLineWidth (1.5) - - GL.glEnable(GL.GL_MULTISAMPLE) #Enable Multisampling anti-aliasing + # clear buffer + GL.glClear(GL.GL_COLOR_BUFFER_BIT) + # draw functions for fcn in self._draw_fcns: fcn[1]() - if self.use_persistence: - if self.clear_accum: - #GL.glClear(GL.GL_ACCUM_BUFFER_BIT) - try: - GL.glAccum(GL.GL_LOAD, 1.0) - except: - pass - self.clear_accum=False - - GL.glAccum(GL.GL_MULT, 1.0-self.persist_alpha) - GL.glAccum(GL.GL_ACCUM, self.persist_alpha) - GL.glAccum(GL.GL_RETURN, 1.0) + # apply persistence + if self.use_persistence: + if self.clear_accum: + #GL.glClear(GL.GL_ACCUM_BUFFER_BIT) + try: + GL.glAccum(GL.GL_LOAD, 1.0) + except: + pass + self.clear_accum=False + + GL.glAccum(GL.GL_MULT, 1.0-self.persist_alpha) + GL.glAccum(GL.GL_ACCUM, self.persist_alpha) + GL.glAccum(GL.GL_RETURN, 1.0) + + # show result self.SwapBuffers() self.unlock() -- cgit From 2190f94d08855676a1f837c4520831d3987d1148 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Tue, 15 Jan 2013 16:22:25 -0800 Subject: grc: fixed problem of GRC_BLOCKS_PATH not being set in Windows --- grc/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 219bbe164..1156f1d76 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011 Free Software Foundation, Inc. +# Copyright 2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -100,13 +100,15 @@ file(TO_NATIVE_PATH ${GR_PYTHON_DIR} GR_PYTHON_POSTFIX) string(REPLACE "\\" "\\\\" GR_PYTHON_POSTFIX ${GR_PYTHON_POSTFIX}) CPACK_SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} + #!include \\\"winmessages.nsh\\\" WriteRegStr HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\" \\\"$INSTDIR\\\\${GRC_BLOCKS_PATH}\\\" - WriteRegStr HKLM \\\"SOFTWARE\\\\Python\\\\PythonCore\\\\2.7\\\\PythonPath\\\" \\\"gnuradio\\\" \\\"$INSTDIR\\\\${GR_PYTHON_POSTFIX}\\\" + SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000 ") CPACK_SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} + #!include \\\"winmessages.nsh\\\" DeleteRegValue HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\" - DeleteRegValue HKLM \\\"SOFTWARE\\\\Python\\\\PythonCore\\\\2.7\\\\PythonPath\\\" \\\"gnuradio\\\" + SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000 ") endif(WIN32) -- cgit From b25d27db5d14ba5182495e9963ce6e1de5d48977 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Thu, 17 Jan 2013 10:50:05 -0800 Subject: cmake: Added Fedora 18 packaging information --- cmake/Packaging/Fedora-18.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cmake/Packaging/Fedora-18.cmake diff --git a/cmake/Packaging/Fedora-18.cmake b/cmake/Packaging/Fedora-18.cmake new file mode 100644 index 000000000..2e9e78ee1 --- /dev/null +++ b/cmake/Packaging/Fedora-18.cmake @@ -0,0 +1,12 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "boost-python" "glibc") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +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_VIDEO_SDL_RUNTIME "SDL") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") +SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "gsl") +SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "numpy") -- cgit From 6d094c4992ee0abc2788d8594572f26609d17c35 Mon Sep 17 00:00:00 2001 From: Ben Reynwar Date: Fri, 18 Jan 2013 09:25:23 -0700 Subject: digital: Updated constellation_receiver_cv documentation. --- .../include/digital_constellation_receiver_cb.h | 28 ++++------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/gr-digital/include/digital_constellation_receiver_cb.h b/gr-digital/include/digital_constellation_receiver_cb.h index 3a14bb5de..92c31311f 100644 --- a/gr-digital/include/digital_constellation_receiver_cb.h +++ b/gr-digital/include/digital_constellation_receiver_cb.h @@ -41,36 +41,18 @@ digital_make_constellation_receiver_cb (digital_constellation_sptr constellation float loop_bw, float fmin, float fmax); /*! - * \brief This block takes care of receiving generic modulated signals - * through phase, frequency, and symbol synchronization. + * \brief This block does fine-phase and frequency locking and decision making. * \ingroup sync_blk * \ingroup demod_blk * \ingroup digital * - * This block takes care of receiving generic modulated signals - * through phase, frequency, and symbol synchronization. It performs - * carrier frequency and phase locking as well as symbol timing - * recovery. - * * The phase and frequency synchronization are based on a Costas loop * that finds the error of the incoming signal point compared to its * nearest constellation point. The frequency and phase of the NCO are * updated according to this error. * - * The symbol synchronization is done using a modified Mueller and - * Muller circuit from the paper: - * - * "G. R. Danesfahani, T.G. Jeans, "Optimisation of modified Mueller - * and Muller algorithm," Electronics Letters, Vol. 31, no. 13, 22 - * June 1995, pp. 1032 - 1033." - * - * This circuit interpolates the downconverted sample (using the NCO - * developed by the Costas loop) every mu samples, then it finds the - * sampling error based on this and the past symbols and the decision - * made on the samples. Like the phase error detector, there are - * optimized decision algorithms for BPSK and QPKS, but 8PSK uses - * another brute force computation against all possible symbols. The - * modifications to the M&M used here reduce self-noise. + * The decicision making itself is performed by the appropriate method of the + * passed constellation object. * */ @@ -87,13 +69,11 @@ protected: /*! * \brief Constructor to synchronize incoming M-PSK symbols * - * \param constellation constellation of points for generic modulation + * \param constellation constellation object for generic demodulation * \param loop_bw Loop bandwidth of the Costas Loop (~ 2pi/100) * \param fmin minimum normalized frequency value the loop can achieve * \param fmax maximum normalized frequency value the loop can achieve * - * The constructor also chooses which phase detector and decision maker to use in the - * work loop based on the value of M. */ digital_constellation_receiver_cb (digital_constellation_sptr constellation, float loop_bw, float fmin, float fmax); -- cgit From 5833ef59a823e5109cb39f8e0af3a583d94f1990 Mon Sep 17 00:00:00 2001 From: Ben Reynwar Date: Fri, 18 Jan 2013 09:30:24 -0700 Subject: digital: Updated pfb_clock_sync grc xml file. --- gr-digital/grc/digital_pfb_clock_sync.xml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/gr-digital/grc/digital_pfb_clock_sync.xml b/gr-digital/grc/digital_pfb_clock_sync.xml index 9e2a4cd5e..255eb7f7a 100644 --- a/gr-digital/grc/digital_pfb_clock_sync.xml +++ b/gr-digital/grc/digital_pfb_clock_sync.xml @@ -8,11 +8,9 @@ Polyphase Clock Sync digital_pfb_clock_sync_xxx from gnuradio import digital - digital.pfb_clock_sync_$(type)($sps, $alpha, $taps, $filter_size, $init_phase, $max_dev, $osps) -self.$(id).set_beta($beta) + digital.pfb_clock_sync_$(type)($sps, $loop_bw, $taps, $filter_size, $init_phase, $max_dev, $osps) set_taps($taps) - set_alpha($alpha) - set_beta($beta) + set_loop_bandwidth($loop_bw) Type @@ -40,13 +38,8 @@ self.$(id).set_beta($beta) real - Alpha - alpha - real - - - Beta - beta + Loop Bandwidth + loop_bw real -- cgit From ad65dd6c70d11dba26ecbad07a6290801151e044 Mon Sep 17 00:00:00 2001 From: Ben Reynwar Date: Fri, 18 Jan 2013 09:33:45 -0700 Subject: digital: Fixed bug in digital_bert_rx.py (thanks Charles Ru) --- gr-digital/examples/narrowband/digital_bert_rx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gr-digital/examples/narrowband/digital_bert_rx.py b/gr-digital/examples/narrowband/digital_bert_rx.py index ab7e988eb..4055aa244 100755 --- a/gr-digital/examples/narrowband/digital_bert_rx.py +++ b/gr-digital/examples/narrowband/digital_bert_rx.py @@ -114,7 +114,7 @@ class rx_psk_block(gr.top_block): if(options.rx_freq is not None): symbol_rate = options.bitrate / self._demodulator.bits_per_symbol() - self._source = uhd_receiver(options.args, options.bitrate, + self._source = uhd_receiver(options.args, symbol_rate, options.samples_per_symbol, options.rx_freq, options.rx_gain, options.spec, -- cgit From d3c7e93f2143e31ed5ff80aa21c8d983df92d19f Mon Sep 17 00:00:00 2001 From: Balint Seeber Date: Fri, 18 Jan 2013 16:26:09 -0800 Subject: Removed check for pending events during mouse drag of GRC blocks on FlowGraph canvas. This is always true on Windows with latest PyGTK and so blocks would never move with mouse movement. Disabling the check appears to have no adverse effects. --- grc/gui/FlowGraph.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 67e5af97b..6af4bcb62 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -494,8 +494,9 @@ class FlowGraph(Element): Move a selected element to the new coordinate. Auto-scroll the scroll bars at the boundaries. """ - #to perform a movement, the mouse must be pressed, no pending events - if gtk.events_pending() or not self.mouse_pressed: return + #to perform a movement, the mouse must be pressed + # (no longer checking pending events via gtk.events_pending() - always true in Windows) + if not self.mouse_pressed: return #perform autoscrolling width, height = self.get_size() x, y = coordinate -- cgit From 6b9b1f762eacd6ad53727cf116d12a76d6e8b6b8 Mon Sep 17 00:00:00 2001 From: Balint Seeber Date: Fri, 18 Jan 2013 16:28:10 -0800 Subject: Added PaintDC to 'plotter_base' so WX GL sinks will work under Windows. Changed 'notebook' SetSelection (deprecated) to ChangeSelection. --- gr-wxgui/src/python/forms/forms.py | 3 ++- gr-wxgui/src/python/plotter/plotter_base.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gr-wxgui/src/python/forms/forms.py b/gr-wxgui/src/python/forms/forms.py index f1d0038ab..cabc5860b 100644 --- a/gr-wxgui/src/python/forms/forms.py +++ b/gr-wxgui/src/python/forms/forms.py @@ -500,7 +500,8 @@ class notebook(_chooser_base): self._add_widget(self._notebook) def _handle(self, event): self[INT_KEY] = self._notebook.GetSelection() - def _update(self, i): self._notebook.SetSelection(i) + # SetSelection triggers a page change event (deprecated, breaks on Windows) and ChangeSelection does not + def _update(self, i): self._notebook.ChangeSelection(i) # ---------------------------------------------------------------- # Stand-alone test application diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py index 41c94e5e0..f1cbaf3c7 100644 --- a/gr-wxgui/src/python/plotter/plotter_base.py +++ b/gr-wxgui/src/python/plotter/plotter_base.py @@ -151,6 +151,8 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): Resize the view port if the width or height changed. Redraw the screen, calling the draw functions. """ + # create device context (needed on Windows, noop on X) + dc = wx.PaintDC(self) self.lock() self.SetCurrent() -- cgit From 1c35a739b6bc7d46132f9304843888e77fb1d22e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 20 Jan 2013 17:18:12 -0800 Subject: volk: remove bad find_package missing components, this is declared in top level --- volk/apps/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/volk/apps/CMakeLists.txt b/volk/apps/CMakeLists.txt index a89a9409d..04bc3beb5 100644 --- a/volk/apps/CMakeLists.txt +++ b/volk/apps/CMakeLists.txt @@ -18,8 +18,6 @@ ######################################################################## # Setup profiler ######################################################################## -find_package(Boost COMPONENTS unit_test_framework) - if(Boost_FOUND AND UNIX) #uses mkdir and $HOME if(MSVC) -- cgit From 75e3954c0cfcd42898a323a178afabef5ba12e29 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 20 Jan 2013 17:19:45 -0800 Subject: volk: the profiler is no longer strictly unix --- volk/apps/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volk/apps/CMakeLists.txt b/volk/apps/CMakeLists.txt index 04bc3beb5..03ad92b79 100644 --- a/volk/apps/CMakeLists.txt +++ b/volk/apps/CMakeLists.txt @@ -18,7 +18,7 @@ ######################################################################## # Setup profiler ######################################################################## -if(Boost_FOUND AND UNIX) #uses mkdir and $HOME +if(Boost_FOUND) if(MSVC) include_directories(${CMAKE_SOURCE_DIR}/msvc) @@ -46,4 +46,4 @@ install( COMPONENT "volk" ) -endif(Boost_FOUND AND UNIX) +endif(Boost_FOUND) -- cgit From 648214ef4a77b5eb22f4e9715a7469ddc02583c1 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 1 Feb 2013 12:36:15 -0800 Subject: cmake: Allows Unix systems with /usr/lib64 to use Boost installations in non-standard locations --- cmake/Modules/GrBoost.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index 23bea41ad..2b4e4bac2 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -34,9 +34,9 @@ set(BOOST_REQUIRED_COMPONENTS thread ) -if(UNIX AND EXISTS "/usr/lib64") +if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -endif(UNIX AND EXISTS "/usr/lib64") +endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") if(MSVC) if (NOT DEFINED BOOST_ALL_DYN_LINK) -- cgit From a57dbeeed3d12df16caccf0d6fefad337a0dc48d Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 5 Feb 2013 12:54:59 -0500 Subject: build: disable certain Boost versions we know are buggy to fix Issue #513. Creates a new list of version to test against. If any version matches the list of bad versions, set Boost to Not Found. --- cmake/Modules/GrBoost.cmake | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index 23bea41ad..ef9a624c4 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -50,14 +50,38 @@ if(MSVC) endif(BOOST_ALL_DYN_LINK) endif(MSVC) -# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669 +find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) + +# This does not allow us to disable specific versions. It is used +# internally by cmake to know the formation newer versions. As newer +# Boost version beyond what is shown here are produced, we must extend +# this list. To disable Boost versions, see below. set(Boost_ADDITIONAL_VERSIONS "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" - "1.50.0" "1.50" "1.51.0" "1.51" "1.53.0" "1.53" "1.54.0" "1.54" + "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" ) -find_package(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) + +# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669 +# Similar problems with Boost 1.46 and 1.47. + +# For any unsuitable Boost version, add the version number below in +# the following format: XXYYZZ +# Where: +# XX is the major version ('10' for version 1) +# YY is the minor version number ('46' for 1.46) +# ZZ is the patcher version number (typically just '00') +set(Boost_NOGO_VERSIONS + 104600 104700 105200 +) + +foreach(ver ${Boost_NOGO_VERSIONS}) + if(${Boost_VERSION} EQUAL ${ver}) + MESSAGE(STATUS "Found incompatible Boost (version ${Boost_VERSION}). Disabling.") + set(Boost_FOUND FALSE) + endif(${Boost_VERSION} EQUAL ${ver}) +endforeach(ver) -- cgit From f27346b27085ea1a78bdada66a1a8e77bbf8a299 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 23 Jan 2013 09:43:49 -0800 Subject: gruel: change scoped_lock mutex to account for Boost deprecation boost::mutex::scoped_lock is going away someday boost::unique_lock is a drop-in replacement --- gruel/src/include/gruel/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h index 63143c8b4..c0b54b0a4 100644 --- a/gruel/src/include/gruel/thread.h +++ b/gruel/src/include/gruel/thread.h @@ -31,7 +31,7 @@ namespace gruel { typedef boost::thread thread; typedef boost::mutex mutex; - typedef boost::mutex::scoped_lock scoped_lock; + typedef boost::unique_lock scoped_lock; typedef boost::condition_variable condition_variable; } /* namespace gruel */ -- cgit From f3f3b8842d011639f6b70329eaaa72dd3047da41 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 23 Jan 2013 09:49:30 -0800 Subject: blocks: fix use of bare boost::mutex::scoped_lock gr_file_source gr::blocks::file_source --- gnuradio-core/src/lib/io/gr_file_source.cc | 10 +++++----- gr-blocks/lib/file_source_impl.cc | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gnuradio-core/src/lib/io/gr_file_source.cc b/gnuradio-core/src/lib/io/gr_file_source.cc index 09f3986cd..f3def0721 100644 --- a/gnuradio-core/src/lib/io/gr_file_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_source.cc @@ -89,7 +89,7 @@ gr_file_source::work (int noutput_items, if(d_fp == NULL) throw std::runtime_error("work with file not open"); - boost::mutex::scoped_lock lock(fp_mutex); // hold for the rest of this function + gruel::scoped_lock lock(fp_mutex); // hold for the rest of this function while (size) { i = fread(o, d_itemsize, size, (FILE *) d_fp); @@ -129,7 +129,7 @@ bool gr_file_source::seek (long seek_point, int whence) { // obtain exclusive access for duration of this function - boost::mutex::scoped_lock lock(fp_mutex); + gruel::scoped_lock lock(fp_mutex); return fseek((FILE *) d_fp, seek_point * d_itemsize, whence) == 0; } @@ -137,7 +137,7 @@ void gr_file_source::open(const char *filename, bool repeat) { // obtain exclusive access for duration of this function - boost::mutex::scoped_lock lock(fp_mutex); + gruel::scoped_lock lock(fp_mutex); int fd; @@ -166,7 +166,7 @@ void gr_file_source::close() { // obtain exclusive access for duration of this function - boost::mutex::scoped_lock lock(fp_mutex); + gruel::scoped_lock lock(fp_mutex); if(d_new_fp != NULL) { fclose(d_new_fp); @@ -179,7 +179,7 @@ void gr_file_source::do_update() { if(d_updated) { - boost::mutex::scoped_lock lock(fp_mutex); // hold while in scope + gruel::scoped_lock lock(fp_mutex); // hold while in scope if(d_fp) fclose(d_fp); diff --git a/gr-blocks/lib/file_source_impl.cc b/gr-blocks/lib/file_source_impl.cc index ed1f50c43..a8db31be7 100644 --- a/gr-blocks/lib/file_source_impl.cc +++ b/gr-blocks/lib/file_source_impl.cc @@ -84,7 +84,7 @@ namespace gr { file_source_impl::open(const char *filename, bool repeat) { // obtain exclusive access for duration of this function - boost::mutex::scoped_lock lock(fp_mutex); + gruel::scoped_lock lock(fp_mutex); int fd; @@ -113,7 +113,7 @@ namespace gr { file_source_impl::close() { // obtain exclusive access for duration of this function - boost::mutex::scoped_lock lock(fp_mutex); + gruel::scoped_lock lock(fp_mutex); if(d_new_fp != NULL) { fclose(d_new_fp); @@ -126,7 +126,7 @@ namespace gr { file_source_impl::do_update() { if(d_updated) { - boost::mutex::scoped_lock lock(fp_mutex); // hold while in scope + gruel::scoped_lock lock(fp_mutex); // hold while in scope if(d_fp) fclose(d_fp); @@ -150,7 +150,7 @@ namespace gr { if(d_fp == NULL) throw std::runtime_error("work with file not open"); - boost::mutex::scoped_lock lock(fp_mutex); // hold for the rest of this function + gruel::scoped_lock lock(fp_mutex); // hold for the rest of this function while(size) { i = fread(o, d_itemsize, size, (FILE*)d_fp); -- cgit From 40c9245a9aa656b4ef1d9962ca57aa967db58e28 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 12 Feb 2013 18:22:01 -0500 Subject: analog: fix a floating point accuracy issue in the CTCSS squelch block. --- gr-analog/lib/ctcss_squelch_ff_impl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gr-analog/lib/ctcss_squelch_ff_impl.cc b/gr-analog/lib/ctcss_squelch_ff_impl.cc index db49b4f6e..60cd94fdb 100644 --- a/gr-analog/lib/ctcss_squelch_ff_impl.cc +++ b/gr-analog/lib/ctcss_squelch_ff_impl.cc @@ -115,11 +115,12 @@ namespace gr { d_goertzel_c.input(in); d_goertzel_r.input(in); + float rounder = 100000; float d_out_l, d_out_c, d_out_r; if(d_goertzel_c.ready()) { - d_out_l = abs(d_goertzel_l.output()); - d_out_c = abs(d_goertzel_c.output()); - d_out_r = abs(d_goertzel_r.output()); + d_out_l = floor(rounder*abs(d_goertzel_l.output()))/rounder; + d_out_c = floor(rounder*abs(d_goertzel_c.output()))/rounder; + d_out_r = floor(rounder*abs(d_goertzel_r.output()))/rounder; //printf("d_out_l=%f d_out_c=%f d_out_r=%f\n", d_out_l, d_out_c, d_out_r); d_mute = (d_out_c < d_level || d_out_c < d_out_l || d_out_c < d_out_r); -- cgit From 600c04a799627b882e8760f131a189bbad616540 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 12 Feb 2013 19:08:45 -0500 Subject: build: fixing generated includes, deps, and header installation. --- gr-analog/include/analog/CMakeLists.txt | 3 ++- gr-analog/swig/CMakeLists.txt | 2 +- gr-blocks/swig/CMakeLists.txt | 2 +- gr-filter/include/filter/CMakeLists.txt | 2 +- gr-filter/swig/CMakeLists.txt | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gr-analog/include/analog/CMakeLists.txt b/gr-analog/include/analog/CMakeLists.txt index 4de94a88b..b113dacc4 100644 --- a/gr-analog/include/analog/CMakeLists.txt +++ b/gr-analog/include/analog/CMakeLists.txt @@ -75,11 +75,12 @@ add_custom_target(analog_generated_includes DEPENDS # Install header files ######################################################################## install(FILES - ${analog_generated_includes} + ${generated_includes} api.h cpm.h agc.h agc2.h + noise_type.h squelch_base_ff.h agc_cc.h agc_ff.h diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt index 9ed82e267..4391e5e09 100644 --- a/gr-analog/swig/CMakeLists.txt +++ b/gr-analog/swig/CMakeLists.txt @@ -33,7 +33,7 @@ set(GR_SWIG_INCLUDE_DIRS set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/analog_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib) - +set(GR_SWIG_TARGET_DEPS analog_generated_includes) set(GR_SWIG_LIBRARIES gnuradio-analog gnuradio-filter) GR_SWIG_MAKE(analog_swig analog_swig.i) diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt index aa5c7bf55..84ab5b660 100644 --- a/gr-blocks/swig/CMakeLists.txt +++ b/gr-blocks/swig/CMakeLists.txt @@ -33,7 +33,7 @@ set(GR_SWIG_INCLUDE_DIRS set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/blocks_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib) - +set(GR_SWIG_TARGET_DEPS blocks_generated_includes) set(GR_SWIG_LIBRARIES gnuradio-blocks) GR_SWIG_MAKE(blocks_swig blocks_swig.i) diff --git a/gr-filter/include/filter/CMakeLists.txt b/gr-filter/include/filter/CMakeLists.txt index c6bf109cd..4c126fcbd 100644 --- a/gr-filter/include/filter/CMakeLists.txt +++ b/gr-filter/include/filter/CMakeLists.txt @@ -77,6 +77,7 @@ add_custom_target(filter_generated_includes DEPENDS # Install header files ######################################################################## install(FILES + ${generated_includes} api.h firdes.h fir_filter.h @@ -89,7 +90,6 @@ install(FILES pm_remez.h polyphase_filterbank.h single_pole_iir.h - ${generated_includes} adaptive_fir_ccc.h adaptive_fir_ccf.h dc_blocker_cc.h diff --git a/gr-filter/swig/CMakeLists.txt b/gr-filter/swig/CMakeLists.txt index 50c5bca6d..ea8c010e0 100644 --- a/gr-filter/swig/CMakeLists.txt +++ b/gr-filter/swig/CMakeLists.txt @@ -35,7 +35,7 @@ set(GR_SWIG_INCLUDE_DIRS # FIXME: rename to filter_swig_doc.i when gnuradio-core is updated set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/gr_filter_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib) - +set(GR_SWIG_TARGET_DEPS filter_generated_includes) set(GR_SWIG_LIBRARIES gnuradio-filter gnuradio-fft) GR_SWIG_MAKE(filter_swig filter_swig.i) -- cgit From df4cd09f0f4c80b36edf17d9c1d7ca28d3fd3ba4 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Wed, 13 Feb 2013 14:03:58 -0500 Subject: build: allowing user to override check for bad versions of boost. Use -DENABLE_BAD_BOOST=True to use one of these Boost versions. --- cmake/Modules/GrBoost.cmake | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index dfd17fc24..38cb027f8 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -69,6 +69,11 @@ set(Boost_ADDITIONAL_VERSIONS # Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669 # Similar problems with Boost 1.46 and 1.47. +OPTION(ENABLE_BAD_BOOST "Enable known bad versions of Boost" OFF) +if(ENABLE_BAD_BOOST) + MESSAGE(STATUS "Enabling use of known bad versions of Boost.") +endif(ENABLE_BAD_BOOST) + # For any unsuitable Boost version, add the version number below in # the following format: XXYYZZ # Where: @@ -76,12 +81,17 @@ set(Boost_ADDITIONAL_VERSIONS # YY is the minor version number ('46' for 1.46) # ZZ is the patcher version number (typically just '00') set(Boost_NOGO_VERSIONS - 104600 104700 105200 -) + 104600 104700 105200 + ) foreach(ver ${Boost_NOGO_VERSIONS}) if(${Boost_VERSION} EQUAL ${ver}) - MESSAGE(STATUS "Found incompatible Boost (version ${Boost_VERSION}). Disabling.") - set(Boost_FOUND FALSE) + if(NOT ENABLE_BAD_BOOST) + MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Disabling.") + set(Boost_FOUND FALSE) + else(NOT ENABLE_BAD_BOOST) + MESSAGE(STATUS "WARNING: Found a known bad version of Boost (v${Boost_VERSION}). Continuing anyway.") + set(Boost_FOUND TRUE) + endif(NOT ENABLE_BAD_BOOST) endif(${Boost_VERSION} EQUAL ${ver}) endforeach(ver) -- cgit From 85565f41084b3ddfa2a620d6f47b663c5414546d Mon Sep 17 00:00:00 2001 From: Mike Jameson Date: Mon, 11 Feb 2013 20:35:20 +0000 Subject: uhd: fixed receive_path() --- gr-uhd/examples/python/usrp_nbfm_ptt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gr-uhd/examples/python/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py index 8d26e656e..cf992a5f2 100755 --- a/gr-uhd/examples/python/usrp_nbfm_ptt.py +++ b/gr-uhd/examples/python/usrp_nbfm_ptt.py @@ -369,7 +369,7 @@ class transmit_path(gr.hier_block2): # //////////////////////////////////////////////////////////////////////// class receive_path(gr.hier_block2): - def __init__(self, args, gain, audio_output): + def __init__(self, args, spec, antenna, gain, audio_output): gr.hier_block2.__init__(self, "receive_path", gr.io_signature(0, 0, 0), # Input signature gr.io_signature(0, 0, 0)) # Output signature -- cgit From e9044d16e8a075234abfda2db5db243e2bdee026 Mon Sep 17 00:00:00 2001 From: Tim O'Shea Date: Wed, 13 Feb 2013 11:29:57 -0500 Subject: core: cleaning warnings --- gnuradio-core/src/lib/io/gr_message_debug.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnuradio-core/src/lib/io/gr_message_debug.cc b/gnuradio-core/src/lib/io/gr_message_debug.cc index 27f4c65fd..1327c31ba 100644 --- a/gnuradio-core/src/lib/io/gr_message_debug.cc +++ b/gnuradio-core/src/lib/io/gr_message_debug.cc @@ -71,7 +71,7 @@ gr_message_debug::print_verbose(pmt::pmt_t msg) size_t offset(0); const uint8_t* d = (const uint8_t*) pmt_uniform_vector_elements(vector, offset); for(size_t i=0; i +#include #ifndef GR_BASIC_BLOCK_H class gr_basic_block; -- cgit From 5f90465feed9949d00bc8c639fa4e911162449bd Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 14 Feb 2013 09:50:52 -0500 Subject: filter: fixing synthesis filter output rate when using 2x oversampling. --- gr-filter/lib/pfb_synthesizer_ccf_impl.cc | 52 ++++++++++++++++--------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/gr-filter/lib/pfb_synthesizer_ccf_impl.cc b/gr-filter/lib/pfb_synthesizer_ccf_impl.cc index 9dd519d57..f89b48b12 100644 --- a/gr-filter/lib/pfb_synthesizer_ccf_impl.cc +++ b/gr-filter/lib/pfb_synthesizer_ccf_impl.cc @@ -47,8 +47,8 @@ namespace gr { : gr_sync_interpolator("pfb_synthesizer_ccf", gr_make_io_signature(1, numchans, sizeof(gr_complex)), gr_make_io_signature(1, 1, sizeof(gr_complex)), - numchans), - d_updated (false), d_numchans(numchans), d_state(0) + (twox ? numchans/2 : numchans)), + d_updated(false), d_numchans(numchans), d_state(0) { // set up 2x multiplier; if twox==True, set to 2, otherwise to 1 d_twox = (twox ? 2 : 1); @@ -56,12 +56,12 @@ namespace gr { throw std::invalid_argument("pfb_synthesizer_ccf: number of channels must be even for 2x oversampling.\n"); } - d_filters = std::vector(d_twox*d_numchans); - d_channel_map.resize(d_twox*d_numchans); + d_filters = std::vector(d_numchans); + d_channel_map.resize(d_numchans); // Create a FIR filter for each channel and zero out the taps - std::vector vtaps(0, d_twox*d_numchans); - for(unsigned int i = 0; i < d_twox*d_numchans; i++) { + std::vector vtaps(0, d_numchans); + for(unsigned int i = 0; i < d_numchans; i++) { d_filters[i] = new kernel::fir_filter_with_buffer_ccf(vtaps); d_channel_map[i] = i; } @@ -70,15 +70,15 @@ namespace gr { set_taps(taps); // Create the IFFT to handle the input channel rotations - d_fft = new fft::fft_complex(d_twox*d_numchans, false); - memset(d_fft->get_inbuf(), 0, d_twox*d_numchans*sizeof(gr_complex)); + d_fft = new fft::fft_complex(d_numchans, false); + memset(d_fft->get_inbuf(), 0, d_numchans*sizeof(gr_complex)); set_output_multiple(d_numchans); } pfb_synthesizer_ccf_impl::~pfb_synthesizer_ccf_impl() { - for(unsigned int i = 0; i < d_twox*d_numchans; i++) { + for(unsigned int i = 0; i < d_numchans; i++) { delete d_filters[i]; } } @@ -137,11 +137,11 @@ namespace gr { unsigned int i,j; int state = 0; - unsigned int ntaps = taps.size(); + unsigned int ntaps = 2*taps.size(); d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_numchans); // Create d_numchan vectors to store each channel's taps - d_taps.resize(d_twox*d_numchans); + d_taps.resize(d_numchans); // Make a vector of the taps plus fill it out with 0's to fill // each polyphase filter with exactly d_taps_per_filter @@ -152,29 +152,30 @@ namespace gr { } // Partition the filter - for(i = 0; i < d_numchans; i++) { + unsigned int halfchans = d_numchans/2; + for(i = 0; i < halfchans; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out d_taps[i] = std::vector(d_taps_per_filter, 0); - d_taps[d_numchans+i] = std::vector(d_taps_per_filter, 0); + d_taps[halfchans+i] = std::vector(d_taps_per_filter, 0); state = 0; for(j = 0; j < d_taps_per_filter; j++) { // add taps to channels in reverse order // Zero out every other tap if(state == 0) { - d_taps[i][j] = tmp_taps[i + j*d_numchans]; - d_taps[d_numchans + i][j] = 0; + d_taps[i][j] = tmp_taps[i + j*halfchans]; + d_taps[halfchans + i][j] = 0; state = 1; } else { d_taps[i][j] = 0; - d_taps[d_numchans + i][j] = tmp_taps[i + j*d_numchans]; + d_taps[halfchans + i][j] = tmp_taps[i + j*halfchans]; state = 0; } } // Build a filter for each channel and add it's taps to it d_filters[i]->set_taps(d_taps[i]); - d_filters[d_numchans + i]->set_taps(d_taps[d_numchans + i]); + d_filters[halfchans + i]->set_taps(d_taps[halfchans + i]); } } @@ -182,7 +183,7 @@ namespace gr { pfb_synthesizer_ccf_impl::print_taps() { unsigned int i, j; - for(i = 0; i < d_twox*d_numchans; i++) { + for(i = 0; i < d_numchans; i++) { printf("filter[%d]: [", i); for(j = 0; j < d_taps_per_filter; j++) { printf(" %.4e", d_taps[i][j]); @@ -204,13 +205,13 @@ namespace gr { if(map.size() > 0) { unsigned int max = (unsigned int)*std::max_element(map.begin(), map.end()); - if(max >= d_twox*d_numchans) { + if(max >= d_numchans) { throw std::invalid_argument("gr_pfb_synthesizer_ccf::set_channel_map: map range out of bounds.\n"); } d_channel_map = map; // Zero out fft buffer so that unused channels are always 0 - memset(d_fft->get_inbuf(), 0,d_twox*d_numchans*sizeof(gr_complex)); + memset(d_fft->get_inbuf(), 0, d_numchans*sizeof(gr_complex)); } } @@ -258,7 +259,8 @@ namespace gr { // Algorithm for oversampling by 2x else { - for(n = 0; n < noutput_items/d_numchans; n++) { + unsigned int halfchans = d_numchans/2; + for(n = 0; n < noutput_items/halfchans; n++) { for(i = 0; i < ninputs; i++) { in = (gr_complex*)input_items[i]; d_fft->get_inbuf()[d_channel_map[i]] = in[n]; @@ -270,13 +272,13 @@ namespace gr { // Output is sum of two filters, but the input buffer to the filters must be circularly // shifted by numchans every time through, done by using d_state to determine which IFFT // buffer position to pull from. - for(i = 0; i < d_numchans; i++) { - out[i] = d_filters[i]->filter(d_fft->get_outbuf()[d_state*d_numchans+i]); - out[i] += d_filters[d_numchans+i]->filter(d_fft->get_outbuf()[(d_state^1)*d_numchans+i]); + for(i = 0; i < halfchans; i++) { + out[i] = d_filters[i]->filter(d_fft->get_outbuf()[d_state*halfchans+i]); + out[i] += d_filters[halfchans+i]->filter(d_fft->get_outbuf()[(d_state^1)*halfchans+i]); } d_state ^= 1; - out += d_numchans; + out += halfchans; } } -- cgit From cad684190e1e286284a30d6e65ce384753ac9589 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 17 Feb 2013 09:20:39 -0800 Subject: core: fix gr_pdu_to_tagged_stream XML for type --- grc/blocks/gr_pdu_to_tagged_stream.xml | 6 +++--- grc/blocks/gr_tagged_stream_to_pdu.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/grc/blocks/gr_pdu_to_tagged_stream.xml b/grc/blocks/gr_pdu_to_tagged_stream.xml index fc1c4d16a..6d2fea97e 100644 --- a/grc/blocks/gr_pdu_to_tagged_stream.xml +++ b/grc/blocks/gr_pdu_to_tagged_stream.xml @@ -16,17 +16,17 @@ diff --git a/grc/blocks/gr_tagged_stream_to_pdu.xml b/grc/blocks/gr_tagged_stream_to_pdu.xml index e70a01608..e2f754c9e 100644 --- a/grc/blocks/gr_tagged_stream_to_pdu.xml +++ b/grc/blocks/gr_tagged_stream_to_pdu.xml @@ -16,17 +16,17 @@ -- cgit From 0dcdc099ecbb01e72b0c5935437f154e47763055 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 17 Feb 2013 10:02:06 -0800 Subject: core: fix gr_message_debug for printing PDUs --- gnuradio-core/src/lib/io/gr_message_debug.cc | 9 ++++++--- gnuradio-core/src/lib/io/gr_message_debug.h | 13 ++++++++++++- gnuradio-core/src/python/gnuradio/gr/qa_pdu.py | 2 +- grc/blocks/gr_message_debug.xml | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/gnuradio-core/src/lib/io/gr_message_debug.cc b/gnuradio-core/src/lib/io/gr_message_debug.cc index 1327c31ba..9eb1bb639 100644 --- a/gnuradio-core/src/lib/io/gr_message_debug.cc +++ b/gnuradio-core/src/lib/io/gr_message_debug.cc @@ -59,10 +59,10 @@ gr_message_debug::store(pmt::pmt_t msg) } void -gr_message_debug::print_verbose(pmt::pmt_t msg) +gr_message_debug::print_pdu(pmt::pmt_t pdu) { - pmt::pmt_t meta = pmt::pmt_car(msg); - pmt::pmt_t vector = pmt::pmt_cdr(msg); + pmt::pmt_t meta = pmt::pmt_car(pdu); + pmt::pmt_t vector = pmt::pmt_cdr(pdu); std::cout << "* MESSAGE DEBUG PRINT PDU VERBOSE *\n"; pmt::pmt_print(meta); size_t len = pmt::pmt_length(vector); @@ -110,6 +110,9 @@ gr_message_debug::gr_message_debug() message_port_register_in(pmt::mp("store")); set_msg_handler(pmt::mp("store"), boost::bind(&gr_message_debug::store, this, _1)); + + message_port_register_in(pmt::mp("print_pdu")); + set_msg_handler(pmt::mp("print_pdu"), boost::bind(&gr_message_debug::print_pdu, this, _1)); } gr_message_debug::~gr_message_debug() diff --git a/gnuradio-core/src/lib/io/gr_message_debug.h b/gnuradio-core/src/lib/io/gr_message_debug.h index 6e6e5103c..f1374e806 100644 --- a/gnuradio-core/src/lib/io/gr_message_debug.h +++ b/gnuradio-core/src/lib/io/gr_message_debug.h @@ -55,7 +55,18 @@ class GR_CORE_API gr_message_debug : public gr_block * \param msg A pmt message passed from the scheduler's message handling. */ void print(pmt::pmt_t msg); - void print_verbose(pmt::pmt_t msg); + + /*! + * \brief PDU formatted messages received in this port are printed to stdout. + * + * This port receives messages from the scheduler's message handling + * mechanism and prints it to stdout. This message handler function + * is only meant to be used by the scheduler to handle messages + * posted to port 'print'. + * + * \param pdu A PDU message passed from the scheduler's message handling. + */ + void print_pdu(pmt::pmt_t pdu); /*! * \brief Messages received in this port are stored in a vector. diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py index 572d8b186..c1110c10b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py @@ -46,7 +46,7 @@ class test_pdu(gr_unittest.TestCase): # Test that the right number of ports exist. pi = dbg.message_ports_in() po = dbg.message_ports_out() - self.assertEqual(pmt.pmt_length(pi), 2) + self.assertEqual(pmt.pmt_length(pi), 3) self.assertEqual(pmt.pmt_length(po), 0) pi = snk3.message_ports_in() diff --git a/grc/blocks/gr_message_debug.xml b/grc/blocks/gr_message_debug.xml index 4d73fbd9c..964f95756 100644 --- a/grc/blocks/gr_message_debug.xml +++ b/grc/blocks/gr_message_debug.xml @@ -20,7 +20,7 @@ 1 - print_pdu_verbose + print_pdu message 1 -- cgit