From 34ca9a7f93939f974a16065c94ed582429986e75 Mon Sep 17 00:00:00 2001
From: hbilel <haithem.bilel@alcatelonetouch.com>
Date: Wed, 22 Feb 2017 11:52:01 +0100
Subject: [PATCH]   [OAI-UE] issue#214 fix timing offset compensation

---
 targets/RT/USER/lte-ue.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 64f8f42d0f..00825c7419 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -731,6 +731,9 @@ void *UE_thread(void *arg) {
                         readBlockSize=UE->frame_parms.samples_per_tti;
                         writeBlockSize=UE->frame_parms.samples_per_tti;
                     } else {
+                        // set TO compensation to zero
+                        UE->rx_offset_diff = 0;
+                        // compute TO compensation that should be applied for this frame
                         if ( UE->rx_offset < 5*UE->frame_parms.samples_per_tti  &&
                                 UE->rx_offset > 0 )
                             UE->rx_offset_diff = -1 ;
@@ -738,7 +741,7 @@ void *UE_thread(void *arg) {
                                 UE->rx_offset < 10*UE->frame_parms.samples_per_tti )
                             UE->rx_offset_diff = 1;
 
-                        LOG_D(PHY,"SET rx_off_diff to %d\n",UE->rx_offset_diff);
+                        LOG_D(PHY,"AbsSubframe %d.%d SET rx_off_diff to %d rx_offset %d \n",proc->frame_rx,sub_frame,UE->rx_offset_diff,UE->rx_offset);
                         readBlockSize=UE->frame_parms.samples_per_tti -
                                       UE->frame_parms.ofdm_symbol_size -
                                       UE->frame_parms.nb_prefix_samples0 -
-- 
GitLab