From aae1a953fc5d21686f227dec86acfc8fcf6dc717 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 6 Feb 2016 16:24:14 -0800 Subject: [PATCH] Init matched filter output variable. --- firmware/baseband/matched_filter.cpp | 1 + firmware/baseband/matched_filter.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/baseband/matched_filter.cpp b/firmware/baseband/matched_filter.cpp index 511410df..9471a202 100644 --- a/firmware/baseband/matched_filter.cpp +++ b/firmware/baseband/matched_filter.cpp @@ -38,6 +38,7 @@ void MatchedFilter::configure( taps_reversed_ = std::make_unique(taps_count); taps_count_ = taps_count; decimation_factor_ = decimation_factor; + output = 0; std::reverse_copy(&taps[0], &taps[taps_count], &taps_reversed_[0]); } diff --git a/firmware/baseband/matched_filter.hpp b/firmware/baseband/matched_filter.hpp index d3ee30be..49045db8 100644 --- a/firmware/baseband/matched_filter.hpp +++ b/firmware/baseband/matched_filter.hpp @@ -71,7 +71,7 @@ private: size_t taps_count_ { 0 }; size_t decimation_factor_ { 1 }; size_t decimation_phase { 0 }; - float output; + float output { 0 }; void shift_by_decimation_factor();