From edf76ec230df7cae0f3f57e7025c14a0024db499 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Thu, 27 Feb 2025 15:17:56 +0100 Subject: [PATCH] Fix automatic resampler configuration. --- src/algorithms/acquisition/libs/acq_conf_fpga.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/algorithms/acquisition/libs/acq_conf_fpga.cc b/src/algorithms/acquisition/libs/acq_conf_fpga.cc index db4c0db42..1f77f0ff2 100644 --- a/src/algorithms/acquisition/libs/acq_conf_fpga.cc +++ b/src/algorithms/acquisition/libs/acq_conf_fpga.cc @@ -96,10 +96,10 @@ bool Acq_Conf_Fpga::ConfigureAutomaticResampler(std::vector 1) { - for (auto it = downsampling_filter_specs.begin(); it != downsampling_filter_specs.end(); ++it) + for (uint32_t k = 0; k < downsampling_filter_specs.size(); k++) { - uint32_t dec_factor = it->first; - uint32_t filter_delay = it->second; + uint32_t dec_factor = downsampling_filter_specs[k].first; + uint32_t filter_delay = downsampling_filter_specs[k].second; // Select the FPGA-supported downsampling factor that is the closest to, but smaller than, the target downsampling factor if (optimal_downsampling_factor >= dec_factor) { @@ -107,7 +107,7 @@ bool Acq_Conf_Fpga::ConfigureAutomaticResampler(std::vector