From 93b9b9d9ef360aafd0852800dc51341fb069f91a Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 2 Oct 2015 17:49:33 -0700 Subject: [PATCH] LinearErrorFilter constructor. --- firmware/baseband/clock_recovery.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/firmware/baseband/clock_recovery.hpp b/firmware/baseband/clock_recovery.hpp index 69723375..ee1ab8de 100644 --- a/firmware/baseband/clock_recovery.hpp +++ b/firmware/baseband/clock_recovery.hpp @@ -66,6 +66,14 @@ private: class LinearErrorFilter { public: + LinearErrorFilter( + const float filter_alpha = 0.95f, + const float error_weight = -1.0f + ) : filter_alpha { filter_alpha }, + error_weight { error_weight } + { + } + float operator()( const float error ) { @@ -74,9 +82,9 @@ public: } private: - float filter_alpha { 0.95f }; + const float filter_alpha; + const float error_weight; float error_filtered { 0.0f }; - float error_weight { 0.5f }; }; class FixedErrorFilter {