summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorTom2009-12-10 00:32:49 -0500
committerTom2009-12-10 00:32:49 -0500
commit28a55d174516831f55f0089be9a3c9080496c4ec (patch)
tree708d6fb07b399adcd633fc5e569268967f0a3a07 /gnuradio-core
parent101be00674a59e347932aa586ca07f1722665964 (diff)
downloadgnuradio-28a55d174516831f55f0089be9a3c9080496c4ec.tar.gz
gnuradio-28a55d174516831f55f0089be9a3c9080496c4ec.tar.bz2
gnuradio-28a55d174516831f55f0089be9a3c9080496c4ec.zip
Adding accessor functions to set alpha and beta gains for the FLL.
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc2
-rw-r--r--gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h14
-rw-r--r--gnuradio-core/src/lib/general/gr_fll_band_edge_cc.i2
3 files changed, 16 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc
index 5ed9cf5f5..156ad278a 100644
--- a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc
+++ b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc
@@ -130,7 +130,7 @@ gr_fll_band_edge_cc::work (int noutput_items,
error = out_lower - out_upper;
d_freq = d_freq + d_beta * error;
- d_phase = d_phase + d_freq + d_alpha * error;
+ d_phase = d_phase + d_freq; // + d_alpha * error;
if(d_phase > M_PI)
d_phase -= M_TWOPI;
diff --git a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h
index ca268859a..feb5e0a77 100644
--- a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h
+++ b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h
@@ -78,7 +78,19 @@ public:
* Resets the filter taps with the new prototype filter
* \param taps (vector/list of gr_complex) The band-edge filter
*/
- void set_taps (const std::vector<gr_complex> &taps);
+ void set_taps (const std::vector<gr_complex> &taps);
+
+ /*!
+ * Set the alpha gainvalue
+ * \param alpha (float) new gain value
+ */
+ void set_alpha(float alpha) { d_alpha = alpha; }
+
+ /*!
+ * Set the beta gain value
+ * \param beta (float) new gain value
+ */
+ void set_beta(float beta) { d_beta = beta; }
/*!
* Print the taps to screen.
diff --git a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.i b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.i
index 9891d1405..13714951b 100644
--- a/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.i
+++ b/gnuradio-core/src/lib/general/gr_fll_band_edge_cc.i
@@ -35,4 +35,6 @@ class gr_fll_band_edge_cc : public gr_sync_block
~gr_fll_band_edge_cc ();
void set_taps (const std::vector<gr_complex> &taps);
+ void set_alpha (float alpha);
+ void set_beta (float beta);
};