From 0fbeee72a17ce420a0036f2680e530a97a469517 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 13 Mar 2018 20:47:31 +0100 Subject: [PATCH] Fixed offset int in previous commit --- srsue/hdr/phy/phch_recv.h | 2 +- srsue/src/phy/phch_recv.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/srsue/hdr/phy/phch_recv.h b/srsue/hdr/phy/phch_recv.h index 3d00b631b..8b87f0521 100644 --- a/srsue/hdr/phy/phch_recv.h +++ b/srsue/hdr/phy/phch_recv.h @@ -168,7 +168,7 @@ private: void set_cell(srslte_cell_t cell); ret_code run_subframe(uint32_t sf_idx); ret_code run_subframe_sync(srslte_ue_sync_t *ue_sync, uint32_t sf_idx); - ret_code run_multiple_subframes(cf_t *buffer, uint32_t offset, uint32_t sf_idx, uint32_t nof_sf); + ret_code run_multiple_subframes(cf_t *buffer, int offset, uint32_t sf_idx, uint32_t nof_sf); float rssi(); float rsrp(); float rsrp_n(); diff --git a/srsue/src/phy/phch_recv.cc b/srsue/src/phy/phch_recv.cc index b186e0ae1..2799cb999 100644 --- a/srsue/src/phy/phch_recv.cc +++ b/srsue/src/phy/phch_recv.cc @@ -1090,7 +1090,7 @@ phch_recv::measure::ret_code phch_recv::measure::run_subframe_sync(srslte_ue_syn } phch_recv::measure::ret_code phch_recv::measure::run_multiple_subframes(cf_t *input_buffer, - uint32_t offset, + int offset, uint32_t sf_idx, uint32_t max_sf) { @@ -1099,7 +1099,7 @@ phch_recv::measure::ret_code phch_recv::measure::run_multiple_subframes(cf_t *in ret_code ret = IDLE; offset = offset-sf_len/2; - while (offset < 0) { + while (offset < 0 && sf_idx < max_sf) { offset += sf_len; sf_idx ++; }