mirror of https://github.com/PentHertz/srsLTE.git
Do not restart insync/outsync counters after multiple events
This commit is contained in:
parent
57505725e0
commit
b5166e10cd
|
@ -705,23 +705,23 @@ void phch_recv::run_thread()
|
|||
}
|
||||
|
||||
void phch_recv::in_sync() {
|
||||
out_of_sync_cnt = 0;
|
||||
in_sync_cnt++;
|
||||
// Send RRC in-sync signal after 100 ms consecutive subframes
|
||||
if (in_sync_cnt == NOF_IN_SYNC_SF) {
|
||||
rrc->in_sync();
|
||||
in_sync_cnt = 0;
|
||||
out_of_sync_cnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Out of sync called by worker or phch_recv every 1 or 5 ms
|
||||
void phch_recv::out_of_sync() {
|
||||
in_sync_cnt = 0;
|
||||
// Send RRC out-of-sync signal after 200 ms consecutive subframes
|
||||
out_of_sync_cnt++;
|
||||
if (out_of_sync_cnt >= NOF_OUT_OF_SYNC_SF) {
|
||||
rrc->out_of_sync();
|
||||
out_of_sync_cnt = 0;
|
||||
in_sync_cnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -412,13 +412,13 @@ void phch_worker::work_imp()
|
|||
update_measurements();
|
||||
|
||||
if (chest_ok) {
|
||||
if (phy->avg_rsrp_dbm > -130.0 && phy->avg_snr_db > -20.0) {
|
||||
if (phy->avg_rsrp_dbm > -130.0 && phy->avg_snr_db > -10.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);
|
||||
phy->avg_snr_db, phy->avg_rsrp_dbm);
|
||||
chest_loop->in_sync();
|
||||
} else {
|
||||
log_h->warning("SNR=%.1f dB RSRP=%.1f dBm, sync=out-of-sync from channel estimator\n",
|
||||
10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)), phy->avg_rsrp_dbm);
|
||||
phy->avg_snr_db, phy->avg_rsrp_dbm);
|
||||
chest_loop->out_of_sync();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue