From d32bfa3756cb62c6909cdda6c2a62be47e907eb0 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 19 Oct 2021 11:59:38 +0200 Subject: [PATCH] remove warning when UE is already in camping --- srsue/hdr/phy/sync.h | 10 +++------- srsue/src/phy/sync.cc | 11 ++++------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/srsue/hdr/phy/sync.h b/srsue/hdr/phy/sync.h index 677ac6a1f..73c2fd48d 100644 --- a/srsue/hdr/phy/sync.h +++ b/srsue/hdr/phy/sync.h @@ -279,15 +279,11 @@ private: std::lock_guard lock(mutex); return std::isnormal(current_srate) and current_srate > 0.0f; } - bool set_camp(float new_srate) + void set_camp(float new_srate) { std::lock_guard lock(mutex); - if (srate_mode != SRATE_CAMP) { - current_srate = new_srate; - srate_mode = SRATE_CAMP; - return true; - } - return false; + current_srate = new_srate; + srate_mode = SRATE_CAMP; } bool set_find() { diff --git a/srsue/src/phy/sync.cc b/srsue/src/phy/sync.cc index 4d0f0cfe5..e799fb96f 100644 --- a/srsue/src/phy/sync.cc +++ b/srsue/src/phy/sync.cc @@ -927,13 +927,10 @@ void sync::set_sampling_rate() return; } - if (srate.set_camp(new_srate)) { - Info("SYNC: Setting sampling rate %.2f MHz", new_srate / 1000000); - radio_h->set_rx_srate(new_srate); - radio_h->set_tx_srate(new_srate); - } else { - Error("Error setting sampling rate for cell with %d PRBs", cell.get().nof_prb); - } + srate.set_camp(new_srate); + Info("SYNC: Setting sampling rate %.2f MHz", new_srate / 1000000); + radio_h->set_rx_srate(new_srate); + radio_h->set_tx_srate(new_srate); } uint32_t sync::get_current_tti()