From 490b1195935007031759ec815b1d4a3046a5907a Mon Sep 17 00:00:00 2001
From: Josh Blum
Date: Thu, 3 Sep 2009 11:37:27 -0700
Subject: 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.
---
grc/blocks/band_pass_filter.xml | 19 ++++++++++---------
grc/blocks/band_reject_filter.xml | 19 ++++++++++---------
grc/blocks/gr_noise_source_x.xml | 2 +-
grc/blocks/gr_sig_source_x.xml | 2 +-
grc/blocks/high_pass_filter.xml | 19 ++++++++++---------
grc/blocks/low_pass_filter.xml | 19 ++++++++++---------
grc/blocks/options.xml | 8 ++++----
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 @@
from gnuradio import gr
from gnuradio.gr import firdes
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))
- set_taps(firdes.$(type.fcn)($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))
+ $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))
+ set_taps(firdes.$(type.fcn)($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))
FIR Type
type
@@ -118,27 +118,28 @@
Window
- window
- enum
+ win
+ firdes.WIN_HAMMING
+ int
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 @@
from gnuradio import gr
from gnuradio.gr import firdes
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))
- set_taps(firdes.band_reject($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, firdes.$window, $beta))
+ $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))
+ set_taps(firdes.band_reject($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))
FIR Type
type
@@ -84,27 +84,28 @@
Window
- window
- enum
+ win
+ firdes.WIN_HAMMING
+ int
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 @@
Noise Type
noise_type
gr.GR_GAUSSIAN
- raw
+ int
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 @@
from gnuradio import gr
from gnuradio.gr import firdes
gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.low_pass(
- $gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))
- set_taps(firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, firdes.$window, $beta))
+ $gain, $samp_rate, $cutoff_freq, $width, $win, $beta))
+ set_taps(firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta))
FIR Type
type
@@ -79,27 +79,28 @@
Window
- window
- enum
+ win
+ firdes.WIN_HAMMING
+ int
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 @@
Options
options
- from gnuradio import gr
-#if $generate_options() == 'wx_gui'
+ from gnuradio import gr
+ from gnuradio.gr import firdes
+ #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
-
+#end if
if $run: self.start()
else: self.stop(); self.wait()
--
cgit