[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/04: filter: allow changing sample delay
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/04: filter: allow changing sample delay from GRC |
Date: |
Thu, 1 May 2014 23:04:00 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 3a1e1c8d4f2291a191c1094593a8f96b54e2f880
Author: Sean Nowlan <address@hidden>
Date: Thu May 1 18:33:55 2014 -0400
filter: allow changing sample delay from GRC
---
gr-filter/grc/filter_pfb_arb_resampler.xml | 8 ++++++++
gr-filter/grc/filter_pfb_decimator.xml | 8 ++++++++
gr-filter/grc/filter_pfb_interpolator.xml | 8 ++++++++
gr-filter/python/filter/pfb.py | 15 ++++++++++++++-
4 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/gr-filter/grc/filter_pfb_arb_resampler.xml
b/gr-filter/grc/filter_pfb_arb_resampler.xml
index 7bceeac..b528adc 100644
--- a/gr-filter/grc/filter_pfb_arb_resampler.xml
+++ b/gr-filter/grc/filter_pfb_arb_resampler.xml
@@ -17,6 +17,7 @@
taps=None,
#end if
flt_size=$nfilts)
+self.$(id).declare_sample_delay($samp_delay)
</make>
<callback>set_taps($taps)</callback>
<callback>set_rate($rrate)</callback>
@@ -68,6 +69,13 @@
<value>100</value>
<type>real</type>
</param>
+ <param>
+ <name>Sample Delay</name>
+ <key>samp_delay</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
<sink>
<name>in</name>
<type>$type.input</type>
diff --git a/gr-filter/grc/filter_pfb_decimator.xml
b/gr-filter/grc/filter_pfb_decimator.xml
index 3a82876..2ad9e05 100644
--- a/gr-filter/grc/filter_pfb_decimator.xml
+++ b/gr-filter/grc/filter_pfb_decimator.xml
@@ -16,6 +16,7 @@
$atten,
$fft_rot,
$fft_filts)
+self.$(id).declare_sample_delay($samp_delay)
</make>
<callback>set_taps($taps)</callback>
<callback>set_channel(int($channel))</callback>
@@ -72,6 +73,13 @@
<key>False</key>
</option>
</param>
+ <param>
+ <name>Sample Delay</name>
+ <key>samp_delay</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/gr-filter/grc/filter_pfb_interpolator.xml
b/gr-filter/grc/filter_pfb_interpolator.xml
index 59749ab..0ad5909 100644
--- a/gr-filter/grc/filter_pfb_interpolator.xml
+++ b/gr-filter/grc/filter_pfb_interpolator.xml
@@ -13,6 +13,7 @@
$interp,
$taps,
$atten)
+self.$(id).declare_sample_delay($samp_delay)
</make>
<callback>set_taps($taps)</callback>
<param>
@@ -32,6 +33,13 @@
<value>100</value>
<type>real</type>
</param>
+ <param>
+ <name>Sample Delay</name>
+ <key>samp_delay</key>
+ <value>0</value>
+ <type>int</type>
+ <hide>part</hide>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/gr-filter/python/filter/pfb.py b/gr-filter/python/filter/pfb.py
index 0704125..c08f9d1 100644
--- a/gr-filter/python/filter/pfb.py
+++ b/gr-filter/python/filter/pfb.py
@@ -130,6 +130,10 @@ class interpolator_ccf(gr.hier_block2):
def set_taps(self, taps):
self.pfb.set_taps(taps)
+ def declare_sample_delay(self, delay):
+ self.pfb.declare_sample_delay(delay)
+
+
class decimator_ccf(gr.hier_block2):
'''
Make a Polyphase Filter decimator (complex in, complex out, floating-point
taps)
@@ -184,6 +188,9 @@ class decimator_ccf(gr.hier_block2):
def set_channel(self, chan):
self.pfb.set_channel(chan)
+ def declare_sample_delay(self, delay):
+ self.pfb.declare_sample_delay(delay)
+
class arb_resampler_ccf(gr.hier_block2):
'''
@@ -256,6 +263,8 @@ class arb_resampler_ccf(gr.hier_block2):
def set_rate(self, rate):
self.pfb.set_rate(rate)
+ def declare_sample_delay(self, delay):
+ self.pfb.declare_sample_delay(delay)
class arb_resampler_fff(gr.hier_block2):
'''
@@ -328,6 +337,8 @@ class arb_resampler_fff(gr.hier_block2):
def set_rate(self, rate):
self.pfb.set_rate(rate)
+ def declare_sample_delay(self, delay):
+ self.pfb.declare_sample_delay(delay)
class arb_resampler_ccc(gr.hier_block2):
'''
@@ -381,6 +392,9 @@ class arb_resampler_ccc(gr.hier_block2):
def set_rate(self, rate):
self.pfb.set_rate(rate)
+ def declare_sample_delay(self, delay):
+ self.pfb.declare_sample_delay(delay)
+
class channelizer_hier_ccf(gr.hier_block2):
"""
@@ -457,4 +471,3 @@ class channelizer_hier_ccf(gr.hier_block2):
self.connect(self.fft, self.v2ss)
for i in range(0, len(outchans)):
self.connect((self.v2ss, i), (self, i))
-