From 02b0f251aa5ae7fe6bca08654e733edbafda1586 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 7 Jan 2021 14:57:14 +0100 Subject: [PATCH] prach_worker: move variable to function body the variable was only used inside the run_tti() function and isn't needed elsewhere. refactor therefore. --- srsenb/hdr/phy/prach_worker.h | 2 +- srsenb/src/phy/prach_worker.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/srsenb/hdr/phy/prach_worker.h b/srsenb/hdr/phy/prach_worker.h index 0acbfa0fa..5939fb991 100644 --- a/srsenb/hdr/phy/prach_worker.h +++ b/srsenb/hdr/phy/prach_worker.h @@ -45,7 +45,7 @@ public: private: uint32_t cc_idx = 0; - uint32_t prach_nof_det = 0; + uint32_t prach_indices[165] = {}; float prach_offsets[165] = {}; float prach_p2avg[165] = {}; diff --git a/srsenb/src/phy/prach_worker.cc b/srsenb/src/phy/prach_worker.cc index 699dd8501..3fad394e7 100644 --- a/srsenb/src/phy/prach_worker.cc +++ b/srsenb/src/phy/prach_worker.cc @@ -128,6 +128,7 @@ int prach_worker::new_tti(uint32_t tti_rx, cf_t* buffer_rx) int prach_worker::run_tti(sf_buffer* b) { + uint32_t prach_nof_det = 0; if (srslte_prach_tti_opportunity(&prach, b->tti, -1)) { // Detect possible PRACHs if (srslte_prach_detect_offset(&prach,