From 36358fa34bc75a262e94cc5fd78a25b09ad215ae Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 1 Feb 2018 20:16:10 +0100 Subject: [PATCH 1/2] Use SNR as out-of-sync threshold in addition to RSRP --- srsue/src/phy/phch_worker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsue/src/phy/phch_worker.cc b/srsue/src/phy/phch_worker.cc index 8644beee6..3d051825d 100644 --- a/srsue/src/phy/phch_worker.cc +++ b/srsue/src/phy/phch_worker.cc @@ -367,7 +367,7 @@ void phch_worker::work_imp() update_measurements(); if (chest_ok) { - if (phy->avg_rsrp_dbm > -124.0) { + if (phy->avg_rsrp_dbm > -124.0 && 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)) > -30.0) { log_h->debug("SNR=%.1f dB, RSRP=%.1f dBm sync=in-sync from channel estimator\n", 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)), phy->avg_rsrp_dbm); chest_loop->in_sync(); From 5eeaf529904aebd5e5d87bc9d87ac48dcf5581f9 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 1 Feb 2018 20:16:35 +0100 Subject: [PATCH 2/2] Check for non-zero payload in log --- lib/src/common/log_filter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/common/log_filter.cc b/lib/src/common/log_filter.cc index 6720c21ad..b498d466c 100644 --- a/lib/src/common/log_filter.cc +++ b/lib/src/common/log_filter.cc @@ -126,7 +126,7 @@ void log_filter::all_log(srslte::LOG_LEVEL_ENUM level, ss << std::endl; } - if (hex_limit > 0) { + if (hex_limit > 0 && hex && size > 0) { ss << hex_string(hex, size); } str_ptr s_ptr(new std::string(ss.str()));