SRSUE: fix srsue_rf_test

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 35f4e5d69a
commit f935916e7c

@ -126,7 +126,16 @@ public:
{ {
radios.at(radio_idx)->set_rx_srate(srate); radios.at(radio_idx)->set_rx_srate(srate);
} }
srslte_rf_info_t* get_info(const uint32_t& radio_idx) override { return radios.at(radio_idx)->get_info(); } srslte_rf_info_t* get_info(const uint32_t& radio_idx) override
{
srslte_rf_info_t* ret = nullptr;
if (radio_idx < radios.size()) {
ret = radios.at(radio_idx)->get_info();
}
return ret;
}
protected: protected:
rf_args_t args = {}; rf_args_t args = {};

@ -718,11 +718,15 @@ void sync::set_agc_enable(bool enable)
if (enable) { if (enable) {
if (running && radio_h) { if (running && radio_h) {
srslte_rf_info_t* rf_info = radio_h->get_info(0); srslte_rf_info_t* rf_info = radio_h->get_info(0);
srslte_ue_sync_start_agc( if (rf_info) {
&ue_sync, callback_set_rx_gain, rf_info->min_rx_gain, rf_info->max_rx_gain, radio_h->get_rx_gain(0)); srslte_ue_sync_start_agc(
search_p.set_agc_enable(true); &ue_sync, callback_set_rx_gain, rf_info->min_rx_gain, rf_info->max_rx_gain, radio_h->get_rx_gain(0));
search_p.set_agc_enable(true);
} else {
ERROR("Error: Radio does not provide RF information\n");
}
} else { } else {
ERROR("Error setting AGC: PHY not initiatec\n"); ERROR("Error setting AGC: PHY not initiated\n");
} }
} else { } else {
ERROR("Error stopping AGC: not implemented\n"); ERROR("Error stopping AGC: not implemented\n");

Loading…
Cancel
Save