[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/06: repeat: Adding dynamic interpolation
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/06: repeat: Adding dynamic interpolation |
Date: |
Sun, 27 Dec 2015 21:43:02 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 31de0f5d7542e1d323af399a022bc59c54d00de6
Author: Kevin McQuiggin <address@hidden>
Date: Sun Aug 30 09:37:38 2015 +0200
repeat: Adding dynamic interpolation
* Added void set_interpolation(int) setter
* Added int interpolation() getter
---
gr-blocks/grc/blocks_repeat.xml | 1 +
gr-blocks/include/gnuradio/blocks/repeat.h | 14 ++++++++++++++
gr-blocks/lib/repeat_impl.cc | 7 +++++++
gr-blocks/lib/repeat_impl.h | 4 ++++
4 files changed, 26 insertions(+)
diff --git a/gr-blocks/grc/blocks_repeat.xml b/gr-blocks/grc/blocks_repeat.xml
index c6c17c9..793d014 100644
--- a/gr-blocks/grc/blocks_repeat.xml
+++ b/gr-blocks/grc/blocks_repeat.xml
@@ -9,6 +9,7 @@
<key>blocks_repeat</key>
<import>from gnuradio import blocks</import>
<make>blocks.repeat($type.size*$vlen, $interp)</make>
+ <callback>set_interpolation($interp)</callback>
<param>
<name>Type</name>
<key>type</key>
diff --git a/gr-blocks/include/gnuradio/blocks/repeat.h
b/gr-blocks/include/gnuradio/blocks/repeat.h
index 622b066..1de2a74 100644
--- a/gr-blocks/include/gnuradio/blocks/repeat.h
+++ b/gr-blocks/include/gnuradio/blocks/repeat.h
@@ -46,6 +46,20 @@ namespace gr {
* \param repeat number of times to repeat the input
*/
static sptr make(size_t itemsize, int repeat);
+
+ /*!
+ * \brief Return current interpolation
+ */
+ virtual int interpolation() const = 0;
+
+ /*!
+ * \brief sets the interpolation
+ *
+ * Call this method in a callback to adjust the interpolation at run
time.
+ *
+ * \param interp interpolation to be set
+ */
+ virtual void set_interpolation(int interp) = 0;
};
} /* namespace blocks */
diff --git a/gr-blocks/lib/repeat_impl.cc b/gr-blocks/lib/repeat_impl.cc
index 9c2ccc6..b32efef 100644
--- a/gr-blocks/lib/repeat_impl.cc
+++ b/gr-blocks/lib/repeat_impl.cc
@@ -45,6 +45,13 @@ namespace gr {
{
}
+ void
+ repeat_impl::set_interpolation(int interp)
+ {
+ d_interp = interp;
+ sync_interpolator::set_interpolation(d_interp);
+ }
+
int
repeat_impl::work(int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gr-blocks/lib/repeat_impl.h b/gr-blocks/lib/repeat_impl.h
index 1942729..2f4f411 100644
--- a/gr-blocks/lib/repeat_impl.h
+++ b/gr-blocks/lib/repeat_impl.h
@@ -36,6 +36,10 @@ namespace gr {
public:
repeat_impl(size_t itemsize, int d_interp);
+ int interpolation() const { return d_interp; }
+ void set_interpolation(int interp);
+
+
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
- [Commit-gnuradio] [gnuradio] branch master updated (cf67421 -> 7278728), git, 2015/12/27
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'mmueller/blocks_repeat_add_dynamic_interp', git, 2015/12/27
- [Commit-gnuradio] [gnuradio] 02/06: Provided thread safety to dynamic repeat, git, 2015/12/27
- [Commit-gnuradio] [gnuradio] 01/06: repeat: Adding dynamic interpolation,
git <=
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'drmpeg/dvbt-ofdm-fix', git, 2015/12/27
- [Commit-gnuradio] [gnuradio] 03/06: gr-dtv: Vastly improved OFDM symbol acquisition for DVB-T receiver., git, 2015/12/27
- [Commit-gnuradio] [gnuradio] 04/06: Merge branch 'maint', git, 2015/12/27