diff --git a/srslte/examples/cell_measurement.c b/srslte/examples/cell_measurement.c index 71ac710cb..6529490dc 100644 --- a/srslte/examples/cell_measurement.c +++ b/srslte/examples/cell_measurement.c @@ -35,6 +35,8 @@ #include #include +#define ENABLE_AGC_DEFAULT + #include "srslte/srslte.h" #include "srslte/rf/rf.h" #include "srslte/rf/rf_utils.h" @@ -63,7 +65,11 @@ void args_default(prog_args_t *args) { args->force_N_id_2 = -1; // Pick the best args->rf_args = ""; args->rf_freq = -1.0; +#ifdef ENABLE_AGC_DEFAULT + args->rf_gain = -1; +#else args->rf_gain = 50; +#endif } void usage(prog_args_t *args, char *prog) { diff --git a/srslte/examples/pdsch_ue.c b/srslte/examples/pdsch_ue.c index 9dae833b0..a652d132a 100644 --- a/srslte/examples/pdsch_ue.c +++ b/srslte/examples/pdsch_ue.c @@ -39,8 +39,7 @@ #include "srslte/srslte.h" -// From srsLTE 1.2, AGC is disabled by default -//#define ENABLE_AGC_DEFAULT +#define ENABLE_AGC_DEFAULT #ifndef DISABLE_RF #include "srslte/rf/rf.h" @@ -130,7 +129,11 @@ void usage(prog_args_t *args, char *prog) { printf("Usage: %s [agpPoOcildDnruv] -f rx_frequency (in Hz) | -i input_file\n", prog); #ifndef DISABLE_RF printf("\t-a RF args [Default %s]\n", args->rf_args); +#ifdef ENABLE_AGC_DEFAULT printf("\t-g RF fix RX gain [Default AGC]\n"); +#else + printf("\t-g Set RX gain [Default %.1f dB]\n", args->rf_gain); +#endif #else printf("\t RF is disabled.\n"); #endif