From 3c33e2015647ae5d8d80ded05e132a3355b5fb6c Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 5 Nov 2015 22:08:35 -0800 Subject: [PATCH] Rename MatchedFilter::decimation_factor. --- firmware/baseband/matched_filter.cpp | 4 ++-- firmware/baseband/matched_filter.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/baseband/matched_filter.cpp b/firmware/baseband/matched_filter.cpp index 2c843316..8f80d5e7 100644 --- a/firmware/baseband/matched_filter.cpp +++ b/firmware/baseband/matched_filter.cpp @@ -27,7 +27,7 @@ namespace matched_filter { bool MatchedFilter::execute_once( const sample_t input ) { - samples_[taps_count_ - decimation_factor + decimation_phase] = input; + samples_[taps_count_ - decimation_factor_ + decimation_phase] = input; advance_decimation_phase(); if( is_new_decimation_cycle() ) { @@ -65,7 +65,7 @@ bool MatchedFilter::execute_once( } void MatchedFilter::shift_by_decimation_factor() { - std::move(&samples_[decimation_factor], &samples_[taps_count_], &samples_[0]); + std::move(&samples_[decimation_factor_], &samples_[taps_count_], &samples_[0]); } } /* namespace matched_filter */ diff --git a/firmware/baseband/matched_filter.hpp b/firmware/baseband/matched_filter.hpp index e065590c..7925dadc 100644 --- a/firmware/baseband/matched_filter.hpp +++ b/firmware/baseband/matched_filter.hpp @@ -51,7 +51,7 @@ public: samples_ = std::make_unique(taps.size()); taps_reversed_ = std::make_unique(taps.size()); taps_count_ = taps.size(); - decimation_factor = decimation_factor; + decimation_factor_ = decimation_factor; std::reverse_copy(taps.cbegin(), taps.cend(), &taps_reversed_[0]); } @@ -67,14 +67,14 @@ private: std::unique_ptr samples_; std::unique_ptr taps_reversed_; size_t taps_count_ { 0 }; - size_t decimation_factor { 1 }; + size_t decimation_factor_ { 1 }; size_t decimation_phase { 0 }; float output; void shift_by_decimation_factor(); void advance_decimation_phase() { - decimation_phase = (decimation_phase + 1) % decimation_factor; + decimation_phase = (decimation_phase + 1) % decimation_factor_; } bool is_new_decimation_cycle() {