prach_worker: move variable to function body

the variable was only used inside the run_tti() function
and isn't needed elsewhere. refactor therefore.
This commit is contained in:
Andre Puschmann 2021-01-07 14:57:14 +01:00
parent 02d4dde1f5
commit 02b0f251aa
2 changed files with 2 additions and 1 deletions

View File

@ -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] = {};

View File

@ -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,