Added interface to ue_sync to disable integer cfo correction

master
ismagom 9 years ago
parent ba0fecfb96
commit 6cefdf067f

@ -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, SRSLTE_API void srslte_ue_sync_set_cfo(srslte_ue_sync_t *q,
float cfo); 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_reset(srslte_ue_sync_t *q);
SRSLTE_API void srslte_ue_sync_set_N_id_2(srslte_ue_sync_t *q, SRSLTE_API void srslte_ue_sync_set_N_id_2(srslte_ue_sync_t *q,

@ -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"); fprintf(stderr, "Error calling finding PSS sequence\n");
return SRSLTE_ERROR; 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); q->mean_peak_value = SRSLTE_VEC_EMA(q->peak_value, q->mean_peak_value, MEANPEAK_EMA_ALPHA);

@ -253,6 +253,11 @@ uint32_t srslte_ue_sync_get_sfidx(srslte_ue_sync_t *q) {
return q->sf_idx; 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) { float srslte_ue_sync_get_cfo(srslte_ue_sync_t *q) {
return 15000 * srslte_sync_get_cfo(&q->strack); return 15000 * srslte_sync_get_cfo(&q->strack);
} }

Loading…
Cancel
Save