From abb91a9055ef38669004d7edd5c9aeff4607c86d Mon Sep 17 00:00:00 2001 From: ismagom Date: Mon, 20 Apr 2015 13:28:56 +0200 Subject: [PATCH] Disable AGC (not working) --- srslte/include/srslte/agc/agc.h | 4 ++-- srslte/lib/ue/src/ue_sync.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/srslte/include/srslte/agc/agc.h b/srslte/include/srslte/agc/agc.h index 3ab72898e..4e770aed7 100644 --- a/srslte/include/srslte/agc/agc.h +++ b/srslte/include/srslte/agc/agc.h @@ -43,8 +43,8 @@ #include "srslte/config.h" -#define SRSLTE_AGC_DEFAULT_TARGET 0.5 -#define SRSLTE_AGC_DEFAULT_BW (5e-1) +#define SRSLTE_AGC_DEFAULT_TARGET 0.4 +#define SRSLTE_AGC_DEFAULT_BW (5e-2) typedef enum SRSLTE_API { SRSLTE_AGC_MODE_ENERGY = 0, diff --git a/srslte/lib/ue/src/ue_sync.c b/srslte/lib/ue/src/ue_sync.c index e33b5bbdf..fbe5c73b4 100644 --- a/srslte/lib/ue/src/ue_sync.c +++ b/srslte/lib/ue/src/ue_sync.c @@ -81,9 +81,11 @@ clean_exit: } int srslte_ue_sync_start_agc(srslte_ue_sync_t *q, double (set_gain_callback)(void*, double)) { - int n = srslte_agc_init_uhd(&q->agc, SRSLTE_AGC_MODE_PEAK_AMPLITUDE, set_gain_callback, q->stream); - q->do_agc = n==0?true:false; - return n; + //int n = srslte_agc_init_uhd(&q->agc, SRSLTE_AGC_MODE_PEAK_AMPLITUDE, set_gain_callback, q->stream); + //q->do_agc = n==0?true:false; + //return n; + set_gain_callback(q->stream, 40); + return 0; } int srslte_ue_sync_init(srslte_ue_sync_t *q,