projects
/
debian
/
gnuradio
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding accessors to Goertzel filter GR block to call setparms from implementation...
[debian/gnuradio]
/
gnuradio-core
/
src
/
lib
/
filter
/
gr_goertzel_fc.cc
diff --git
a/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc
b/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc
index a93751b2f09db8838923a884e9c27d9347a531bf..938a522f40217494396fd29f291e0ddae2f36c03 100644
(file)
--- a/
gnuradio-core/src/lib/filter/gr_goertzel_fc.cc
+++ b/
gnuradio-core/src/lib/filter/gr_goertzel_fc.cc
@@
-1,6
+1,6
@@
/* -*- c++ -*- */
/*
/* -*- c++ -*- */
/*
- * Copyright 2006,2010 Free Software Foundation, Inc.
+ * Copyright 2006,2010
,2011
Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
*
* This file is part of GNU Radio
*
@@
-42,6
+42,8
@@
gr_goertzel_fc::gr_goertzel_fc(int rate, int len, float freq)
d_goertzel(rate, len, freq)
{
d_len = len;
d_goertzel(rate, len, freq)
{
d_len = len;
+ d_rate = rate;
+ d_freq = freq;
}
int gr_goertzel_fc::work(int noutput_items,
}
int gr_goertzel_fc::work(int noutput_items,
@@
-58,3
+60,17
@@
int gr_goertzel_fc::work(int noutput_items,
return noutput_items;
}
return noutput_items;
}
+
+void
+gr_goertzel_fc::set_freq(float freq)
+{
+ d_freq = freq;
+ d_goertzel.gri_setparms(d_rate, d_len, d_freq);
+}
+
+void
+gr_goertzel_fc::set_rate(int rate)
+{
+ d_rate = rate;
+ d_goertzel.gri_setparms(d_rate, d_len, d_freq);
+}