From 37220c4c20b4935fbbe47f75a8357e01873bf4b8 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 10 Jun 2017 22:42:52 -0700 Subject: eiscat: Fixed selection of upper/lower beams --- .../lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp index eb693c394..8e93ac55b 100644 --- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp @@ -170,6 +170,9 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(eiscat_radio_ctrl) .add_coerced_subscriber([this](int reg_value){ this->configure_beams(uint32_t(reg_value)); }) // No update! This would override the previous settings. + .set_publisher([this](){ + return this->user_reg_read32(RB_CHOOSE_BEAMS); + }) ; /**** Configure the digital gain controls *******************************/ @@ -329,6 +332,9 @@ void eiscat_radio_ctrl_impl::set_rx_antenna( }(); if (ant_mode == "BF") { + int new_choose_beams = + get_arg("choose_beams") | EISCAT_SKIP_NEIGHBOURS; + set_arg("choose_beams", new_choose_beams); size_t beam_select_offset = (get_arg("choose_beams") & EISCAT_CONTRIB_UPPER) ? EISCAT_NUM_PORTS : 0; @@ -465,6 +471,9 @@ double eiscat_radio_ctrl_impl::get_output_samp_rate(size_t /* port */) bool eiscat_radio_ctrl_impl::check_radio_config() { UHD_RFNOC_BLOCK_TRACE() << "x300_radio_ctrl_impl::check_radio_config() " ; + const uint32_t config_beams = get_arg("configure_beams"); + bool skipping_neighbours = config_beams & EISCAT_SKIP_NEIGHBOURS; + bool upper_contrib = config_beams & EISCAT_CONTRIB_UPPER; const fs_path rx_fe_path = fs_path("dboards/A/rx_frontends"); uint32_t chan_enables = 0; for (const auto &enb: _rx_streamer_active) { @@ -472,9 +481,17 @@ bool eiscat_radio_ctrl_impl::check_radio_config() chan_enables |= (1<