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);
}
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:
rf_args_t args = {};

@ -718,11 +718,15 @@ void sync::set_agc_enable(bool enable)
if (enable) {
if (running && radio_h) {
srslte_rf_info_t* rf_info = radio_h->get_info(0);
if (rf_info) {
srslte_ue_sync_start_agc(
&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 setting AGC: PHY not initiatec\n");
ERROR("Error: Radio does not provide RF information\n");
}
} else {
ERROR("Error setting AGC: PHY not initiated\n");
}
} else {
ERROR("Error stopping AGC: not implemented\n");

Loading…
Cancel
Save