UE AGC Fix. Tries to set the Rx gain even if it reaches the limit.

master
Xavier Arteaga 6 years ago
parent 7d95766c7b
commit 54d11f9e88

@ -142,11 +142,12 @@ void srslte_agc_process(srslte_agc_t *q, cf_t *signal, uint32_t len) {
} else if (isinf(gain_db) || isnan(gain_db)) { } else if (isinf(gain_db) || isnan(gain_db)) {
gain_db = (q->min_gain + q->max_gain) / 2.0; gain_db = (q->min_gain + q->max_gain) / 2.0;
INFO("Warning: AGC went to an unknown state. Setting Rx gain to %.2fdB\n", gain_db); INFO("Warning: AGC went to an unknown state. Setting Rx gain to %.2fdB\n", gain_db);
} else { }
// Set gain
gain_uhd_db = q->set_gain_callback(q->uhd_handler, gain_db); gain_uhd_db = q->set_gain_callback(q->uhd_handler, gain_db);
q->gain = pow(10, gain_uhd_db / 10); q->gain = pow(10, gain_uhd_db / 10);
} }
}
float *t; float *t;
switch(q->mode) { switch(q->mode) {
case SRSLTE_AGC_MODE_ENERGY: case SRSLTE_AGC_MODE_ENERGY:

Loading…
Cancel
Save