Added minimal UE synch tweak and fix

This commit is contained in:
Xavier Arteaga 2019-04-12 17:48:49 +02:00
parent a1a797589a
commit b037fb8e51
2 changed files with 5 additions and 3 deletions

View File

@ -297,8 +297,8 @@ private:
uint32_t out_of_sync_cnt; uint32_t out_of_sync_cnt;
uint32_t in_sync_cnt; uint32_t in_sync_cnt;
const static uint32_t NOF_OUT_OF_SYNC_SF = 200; const static uint32_t NOF_OUT_OF_SYNC_SF = 20;
const static uint32_t NOF_IN_SYNC_SF = 100; const static uint32_t NOF_IN_SYNC_SF = 10;
// State machine for SYNC thread // State machine for SYNC thread
class sync_state { class sync_state {

View File

@ -393,6 +393,8 @@ void sync::run_thread()
// If not camping, clear SFN sync // If not camping, clear SFN sync
if (!phy_state.is_camping()) { if (!phy_state.is_camping()) {
force_camping_sfn_sync = false; force_camping_sfn_sync = false;
} else {
out_of_sync();
} }
if (log_phy_lib_h) { if (log_phy_lib_h) {
@ -673,7 +675,7 @@ void sync::in_sync()
// Out of sync called by worker or sync every 1 or 5 ms // Out of sync called by worker or sync every 1 or 5 ms
void sync::out_of_sync() void sync::out_of_sync()
{ {
// Send RRC out-of-sync signal after 200 ms consecutive subframes // Send RRC out-of-sync signal after NOF_OUT_OF_SYNC_SF consecutive subframes
Info("Out-of-sync %d/%d\n", out_of_sync_cnt, NOF_OUT_OF_SYNC_SF); Info("Out-of-sync %d/%d\n", out_of_sync_cnt, NOF_OUT_OF_SYNC_SF);
out_of_sync_cnt++; out_of_sync_cnt++;
if (out_of_sync_cnt == NOF_OUT_OF_SYNC_SF) { if (out_of_sync_cnt == NOF_OUT_OF_SYNC_SF) {