From 6cefdf067fab81b9127c32874a96d47ea1222aac Mon Sep 17 00:00:00 2001 From: ismagom Date: Mon, 21 Dec 2015 13:14:02 +0100 Subject: [PATCH] Added interface to ue_sync to disable integer cfo correction --- srslte/include/srslte/ue/ue_sync.h | 3 +++ srslte/lib/sync/src/sync.c | 5 ----- srslte/lib/ue/src/ue_sync.c | 5 +++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/srslte/include/srslte/ue/ue_sync.h b/srslte/include/srslte/ue/ue_sync.h index e81c348d2..7900829e0 100644 --- a/srslte/include/srslte/ue/ue_sync.h +++ b/srslte/include/srslte/ue/ue_sync.h @@ -150,6 +150,9 @@ SRSLTE_API int srslte_ue_sync_zerocopy(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_set_cfo(srslte_ue_sync_t *q, float cfo); +SRSLTE_API void srslte_ue_sync_cfo_i_detec_en(srslte_ue_sync_t *q, + bool enable); + SRSLTE_API void srslte_ue_sync_reset(srslte_ue_sync_t *q); SRSLTE_API void srslte_ue_sync_set_N_id_2(srslte_ue_sync_t *q, diff --git a/srslte/lib/sync/src/sync.c b/srslte/lib/sync/src/sync.c index b9014c87f..23114254d 100644 --- a/srslte/lib/sync/src/sync.c +++ b/srslte/lib/sync/src/sync.c @@ -403,11 +403,6 @@ int srslte_sync_find(srslte_sync_t *q, cf_t *input, uint32_t find_offset, uint32 fprintf(stderr, "Error calling finding PSS sequence\n"); return SRSLTE_ERROR; } - if (q->max_offset<128) { - float temp[128]; - srslte_vec_sc_prod_fff(q->pss.conv_output_avg, 1e8, temp, q->max_offset); - srslte_vec_fprint_f(stdout, temp, q->max_offset); - } } q->mean_peak_value = SRSLTE_VEC_EMA(q->peak_value, q->mean_peak_value, MEANPEAK_EMA_ALPHA); diff --git a/srslte/lib/ue/src/ue_sync.c b/srslte/lib/ue/src/ue_sync.c index 9620cdc91..3ddffcf49 100644 --- a/srslte/lib/ue/src/ue_sync.c +++ b/srslte/lib/ue/src/ue_sync.c @@ -253,6 +253,11 @@ uint32_t srslte_ue_sync_get_sfidx(srslte_ue_sync_t *q) { return q->sf_idx; } +void srslte_ue_sync_cfo_i_detec_en(srslte_ue_sync_t *q, bool enable) { + srslte_sync_cfo_i_detec_en(&q->strack, enable); + srslte_sync_cfo_i_detec_en(&q->sfind, enable); +} + float srslte_ue_sync_get_cfo(srslte_ue_sync_t *q) { return 15000 * srslte_sync_get_cfo(&q->strack); }