summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2009-09-03 11:37:27 -0700
committerJosh Blum2009-09-03 11:37:27 -0700
commit490b1195935007031759ec815b1d4a3046a5907a (patch)
tree561e9c1e750e0019d7590bc258600c0ddbf45b00
parent56a58932701c981e55972ad994d397733edb8c75 (diff)
downloadgnuradio-490b1195935007031759ec815b1d4a3046a5907a.tar.gz
gnuradio-490b1195935007031759ec815b1d4a3046a5907a.tar.bz2
gnuradio-490b1195935007031759ec815b1d4a3046a5907a.zip
Made the window for the pass band filters integers (take firdes.WIN_XXX).
Now a window can be controlled by a variable such as a chooser.
-rw-r--r--grc/blocks/band_pass_filter.xml19
-rw-r--r--grc/blocks/band_reject_filter.xml19
-rw-r--r--grc/blocks/gr_noise_source_x.xml2
-rw-r--r--grc/blocks/gr_sig_source_x.xml2
-rw-r--r--grc/blocks/high_pass_filter.xml19
-rw-r--r--grc/blocks/low_pass_filter.xml19
-rw-r--r--grc/blocks/options.xml8
7 files changed, 46 insertions, 42 deletions
diff --git a/grc/blocks/band_pass_filter.xml b/grc/blocks/band_pass_filter.xml
index e2e9acf4e..af083473d 100644
--- a/grc/blocks/band_pass_filter.xml
+++ b/grc/blocks/band_pass_filter.xml
@@ -10,8 +10,8 @@
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
<make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.$(type.fcn)(
- $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))</make>
- <callback>set_taps(firdes.$(type.fcn)($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))</callback>
+ $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</make>
+ <callback>set_taps(firdes.$(type.fcn)($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</callback>
<param>
<name>FIR Type</name>
<key>type</key>
@@ -118,27 +118,28 @@
</param>
<param>
<name>Window</name>
- <key>window</key>
- <type>enum</type>
+ <key>win</key>
+ <value>firdes.WIN_HAMMING</value>
+ <type>int</type>
<option>
<name>Hamming</name>
- <key>WIN_HAMMING</key>
+ <key>firdes.WIN_HAMMING</key>
</option>
<option>
<name>Hann</name>
- <key>WIN_HANN</key>
+ <key>firdes.WIN_HANN</key>
</option>
<option>
<name>Blackman</name>
- <key>WIN_BLACKMAN</key>
+ <key>firdes.WIN_BLACKMAN</key>
</option>
<option>
<name>Rectangular</name>
- <key>WIN_RECTANGULAR</key>
+ <key>firdes.WIN_RECTANGULAR</key>
</option>
<option>
<name>Kaiser</name>
- <key>WIN_KAISER</key>
+ <key>firdes.WIN_KAISER</key>
</option>
</param>
<param>
diff --git a/grc/blocks/band_reject_filter.xml b/grc/blocks/band_reject_filter.xml
index 3b58f0b51..dd5e7a9d7 100644
--- a/grc/blocks/band_reject_filter.xml
+++ b/grc/blocks/band_reject_filter.xml
@@ -10,8 +10,8 @@
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
<make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.band_reject(
- $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))</make>
- <callback>set_taps(firdes.band_reject($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))</callback>
+ $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</make>
+ <callback>set_taps(firdes.band_reject($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</callback>
<param>
<name>FIR Type</name>
<key>type</key>
@@ -84,27 +84,28 @@
</param>
<param>
<name>Window</name>
- <key>window</key>
- <type>enum</type>
+ <key>win</key>
+ <value>firdes.WIN_HAMMING</value>
+ <type>int</type>
<option>
<name>Hamming</name>
- <key>WIN_HAMMING</key>
+ <key>firdes.WIN_HAMMING</key>
</option>
<option>
<name>Hann</name>
- <key>WIN_HANN</key>
+ <key>firdes.WIN_HANN</key>
</option>
<option>
<name>Blackman</name>
- <key>WIN_BLACKMAN</key>
+ <key>firdes.WIN_BLACKMAN</key>
</option>
<option>
<name>Rectangular</name>
- <key>WIN_RECTANGULAR</key>
+ <key>firdes.WIN_RECTANGULAR</key>
</option>
<option>
<name>Kaiser</name>
- <key>WIN_KAISER</key>
+ <key>firdes.WIN_KAISER</key>
</option>
</param>
<param>
diff --git a/grc/blocks/gr_noise_source_x.xml b/grc/blocks/gr_noise_source_x.xml
index 4fcef5148..4789b4400 100644
--- a/grc/blocks/gr_noise_source_x.xml
+++ b/grc/blocks/gr_noise_source_x.xml
@@ -40,7 +40,7 @@
<name>Noise Type</name>
<key>noise_type</key>
<value>gr.GR_GAUSSIAN</value>
- <type>raw</type>
+ <type>int</type>
<option>
<name>Uniform</name>
<key>gr.GR_UNIFORM</key>
diff --git a/grc/blocks/gr_sig_source_x.xml b/grc/blocks/gr_sig_source_x.xml
index c329dba67..644cf52d0 100644
--- a/grc/blocks/gr_sig_source_x.xml
+++ b/grc/blocks/gr_sig_source_x.xml
@@ -53,7 +53,7 @@
<name>Waveform</name>
<key>waveform</key>
<value>gr.GR_COS_WAVE</value>
- <type>raw</type>
+ <type>int</type>
<option>
<name>Constant</name>
<key>gr.GR_CONST_WAVE</key>
diff --git a/grc/blocks/high_pass_filter.xml b/grc/blocks/high_pass_filter.xml
index 5be916fa9..0e29cbb36 100644
--- a/grc/blocks/high_pass_filter.xml
+++ b/grc/blocks/high_pass_filter.xml
@@ -10,8 +10,8 @@
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
<make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.high_pass(
- $gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))</make>
- <callback>set_taps(firdes.high_pass($gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))</callback>
+ $gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</make>
+ <callback>set_taps(firdes.high_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</callback>
<param>
<name>FIR Type</name>
<key>type</key>
@@ -79,27 +79,28 @@
</param>
<param>
<name>Window</name>
- <key>window</key>
- <type>enum</type>
+ <key>win</key>
+ <value>firdes.WIN_HAMMING</value>
+ <type>int</type>
<option>
<name>Hamming</name>
- <key>WIN_HAMMING</key>
+ <key>firdes.WIN_HAMMING</key>
</option>
<option>
<name>Hann</name>
- <key>WIN_HANN</key>
+ <key>firdes.WIN_HANN</key>
</option>
<option>
<name>Blackman</name>
- <key>WIN_BLACKMAN</key>
+ <key>firdes.WIN_BLACKMAN</key>
</option>
<option>
<name>Rectangular</name>
- <key>WIN_RECTANGULAR</key>
+ <key>firdes.WIN_RECTANGULAR</key>
</option>
<option>
<name>Kaiser</name>
- <key>WIN_KAISER</key>
+ <key>firdes.WIN_KAISER</key>
</option>
</param>
<param>
diff --git a/grc/blocks/low_pass_filter.xml b/grc/blocks/low_pass_filter.xml
index 27120c047..26435fd4d 100644
--- a/grc/blocks/low_pass_filter.xml
+++ b/grc/blocks/low_pass_filter.xml
@@ -10,8 +10,8 @@
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
<make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.low_pass(
- $gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))</make>
- <callback>set_taps(firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))</callback>
+ $gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</make>
+ <callback>set_taps(firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</callback>
<param>
<name>FIR Type</name>
<key>type</key>
@@ -79,27 +79,28 @@
</param>
<param>
<name>Window</name>
- <key>window</key>
- <type>enum</type>
+ <key>win</key>
+ <value>firdes.WIN_HAMMING</value>
+ <type>int</type>
<option>
<name>Hamming</name>
- <key>WIN_HAMMING</key>
+ <key>firdes.WIN_HAMMING</key>
</option>
<option>
<name>Hann</name>
- <key>WIN_HANN</key>
+ <key>firdes.WIN_HANN</key>
</option>
<option>
<name>Blackman</name>
- <key>WIN_BLACKMAN</key>
+ <key>firdes.WIN_BLACKMAN</key>
</option>
<option>
<name>Rectangular</name>
- <key>WIN_RECTANGULAR</key>
+ <key>firdes.WIN_RECTANGULAR</key>
</option>
<option>
<name>Kaiser</name>
- <key>WIN_KAISER</key>
+ <key>firdes.WIN_KAISER</key>
</option>
</param>
<param>
diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml
index a28a0b143..1798a69f8 100644
--- a/grc/blocks/options.xml
+++ b/grc/blocks/options.xml
@@ -9,8 +9,9 @@
<block>
<name>Options</name>
<key>options</key>
- <import>from gnuradio import gr
-#if $generate_options() == 'wx_gui'
+ <import>from gnuradio import gr</import>
+ <import>from gnuradio.gr import firdes</import>
+ <import>#if $generate_options() == 'wx_gui'
from grc_gnuradio import wxgui as grc_wxgui
import wx
#end if
@@ -18,8 +19,7 @@ import wx
from optparse import OptionParser
from gnuradio.eng_option import eng_option
from gnuradio import eng_notation
-#end if
-</import>
+#end if</import>
<make></make>
<callback>if $run: self.start()
else: self.stop(); self.wait()</callback>