From 68250b4d30c1ed4ce1f327aa5293316da0a691f4 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 2 Oct 2015 22:34:06 -0700 Subject: [PATCH] Expose weight() of FixedErrorFilter. --- firmware/baseband/clock_recovery.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/firmware/baseband/clock_recovery.hpp b/firmware/baseband/clock_recovery.hpp index 8a6438a61..a8d40b421 100644 --- a/firmware/baseband/clock_recovery.hpp +++ b/firmware/baseband/clock_recovery.hpp @@ -91,18 +91,22 @@ class FixedErrorFilter { public: FixedErrorFilter( const float weight = (1.0f / 16.0f) - ) : weight { weight } + ) : weight_ { weight } { } float operator()( const float lateness ) const { - return (lateness < 0.0f) ? weight : -weight; + return (lateness < 0.0f) ? weight() : -weight(); + } + + float weight() const { + return weight_; } private: - const float weight; + const float weight_; }; template