diff options
Diffstat (limited to 'host/lib/usrp/dboard/magnesium')
10 files changed, 96 insertions, 80 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp index f71b1aa4e..adb93ced7 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp @@ -42,7 +42,7 @@ double magnesium_ad9371_iface::set_frequency( const double freq, const size_t chan, const direction_t dir) { // Note: This sets the frequency for both channels (1 and 2). - auto which = _get_which(dir, chan); + auto which = _get_which(dir, chan); auto actual_freq = request<double>(MAGNESIUM_TUNE_TIMEOUT, "set_freq", which, freq, false); UHD_LOG_TRACE(_log_prefix, _rpc_prefix << "set_freq returned " << actual_freq); diff --git a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp index 2374a4503..2cb691025 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.hpp @@ -55,10 +55,7 @@ private: { UHD_LOG_TRACE(_log_prefix, "[RPC] Calling " << func_name); return _rpcc->request_with_token<return_type>( - timeout_ms, - _rpc_prefix + func_name, - std::forward<Args>(args)... - ); + timeout_ms, _rpc_prefix + func_name, std::forward<Args>(args)...); }; //! Reference to the RPC client diff --git a/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp b/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp index 3d670e4a3..dedb9e924 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp @@ -110,6 +110,6 @@ static constexpr uint32_t RB_MISC_IO = PERIPH_BASE + 16 * PERIPH_REG_OFFSET; static constexpr uint32_t RB_SPI = PERIPH_BASE + 17 * PERIPH_REG_OFFSET; static constexpr uint32_t RB_DB_GPIO = PERIPH_BASE + 19 * PERIPH_REG_OFFSET; static constexpr uint32_t RB_FP_GPIO = PERIPH_BASE + 20 * PERIPH_REG_OFFSET; -} +} // namespace n310_regs #endif /* INCLUDED_LIBUHD_MAGNESIUM_CONSTANTS_HPP */ diff --git a/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp b/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp index 8f4ee0caa..27341673c 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp @@ -11,9 +11,9 @@ #include "adf4351_regs.hpp" #include "magnesium_cpld_regs.hpp" #include <uhd/types/serial.hpp> +#include <functional> #include <memory> #include <mutex> -#include <functional> //! Controls the CPLD on a Magnesium daughterboard // diff --git a/host/lib/usrp/dboard/magnesium/magnesium_gain_table.hpp b/host/lib/usrp/dboard/magnesium/magnesium_gain_table.hpp index 6ba91a248..feff1d6f9 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_gain_table.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_gain_table.hpp @@ -30,13 +30,13 @@ struct gain_tuple_t /*! Given a gain index, return a tuple of gain-related settings (Rx) */ -gain_tuple_t get_rx_gain_tuple( - const double gain_index, const uhd::rfnoc::magnesium_radio_control_impl::rx_band band_); +gain_tuple_t get_rx_gain_tuple(const double gain_index, + const uhd::rfnoc::magnesium_radio_control_impl::rx_band band_); /*! Given a gain index, return a tuple of gain-related settings (Tx) */ -gain_tuple_t get_tx_gain_tuple( - const double gain_index, const uhd::rfnoc::magnesium_radio_control_impl::tx_band band_); +gain_tuple_t get_tx_gain_tuple(const double gain_index, + const uhd::rfnoc::magnesium_radio_control_impl::tx_band band_); } /* namespace magnesium */ diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp index 28a7b0c41..e4d446f95 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp @@ -15,12 +15,11 @@ #include <uhd/utils/algorithm.hpp> #include <uhd/utils/log.hpp> #include <uhd/utils/math.hpp> -#include <uhd/rfnoc/registry.hpp> #include <boost/algorithm/string.hpp> #include <boost/format.hpp> -#include <memory> #include <cmath> #include <cstdlib> +#include <memory> #include <sstream> using namespace uhd; @@ -206,7 +205,8 @@ double magnesium_radio_control_impl::set_rate(double requested_rate) return _master_clock_rate; } -void magnesium_radio_control_impl::set_tx_antenna(const std::string& ant, const size_t chan) +void magnesium_radio_control_impl::set_tx_antenna( + const std::string& ant, const size_t chan) { if (ant != get_tx_antenna(chan)) { throw uhd::value_error( @@ -216,7 +216,8 @@ void magnesium_radio_control_impl::set_tx_antenna(const std::string& ant, const // We can't actually set the TX antenna, so let's stop here. } -void magnesium_radio_control_impl::set_rx_antenna(const std::string& ant, const size_t chan) +void magnesium_radio_control_impl::set_rx_antenna( + const std::string& ant, const size_t chan) { UHD_ASSERT_THROW(chan <= MAGNESIUM_NUM_CHANS); if (std::find(MAGNESIUM_RX_ANTENNAS.begin(), MAGNESIUM_RX_ANTENNAS.end(), ant) @@ -233,7 +234,8 @@ void magnesium_radio_control_impl::set_rx_antenna(const std::string& ant, const radio_control_impl::set_rx_antenna(ant, chan); } -double magnesium_radio_control_impl::set_tx_frequency(const double req_freq, const size_t chan) +double magnesium_radio_control_impl::set_tx_frequency( + const double req_freq, const size_t chan) { const double freq = MAGNESIUM_FREQ_RANGE.clip(req_freq); RFNOC_LOG_TRACE("set_tx_frequency(f=" << freq << ", chan=" << chan << ")"); @@ -269,7 +271,8 @@ double magnesium_radio_control_impl::set_tx_frequency(const double req_freq, con return radio_control_impl::get_tx_frequency(chan); } -void magnesium_radio_control_impl::_update_gain(const size_t chan, const uhd::direction_t dir) +void magnesium_radio_control_impl::_update_gain( + const size_t chan, const uhd::direction_t dir) { const std::string fe = (dir == TX_DIRECTION) ? "tx_frontends" : "rx_frontends"; const double freq = (dir == TX_DIRECTION) ? this->get_tx_frequency(chan) @@ -277,7 +280,8 @@ void magnesium_radio_control_impl::_update_gain(const size_t chan, const uhd::di this->_set_all_gain(this->_get_all_gain(chan, dir), freq, chan, dir); } -void magnesium_radio_control_impl::_update_freq(const size_t chan, const uhd::direction_t dir) +void magnesium_radio_control_impl::_update_freq( + const size_t chan, const uhd::direction_t dir) { const std::string ad9371_source = dir == TX_DIRECTION ? this->get_tx_lo_source(MAGNESIUM_LO1, chan) @@ -301,7 +305,8 @@ void magnesium_radio_control_impl::_update_freq(const size_t chan, const uhd::di } } -double magnesium_radio_control_impl::set_rx_frequency(const double req_freq, const size_t chan) +double magnesium_radio_control_impl::set_rx_frequency( + const double req_freq, const size_t chan) { const double freq = MAGNESIUM_FREQ_RANGE.clip(req_freq); RFNOC_LOG_TRACE("set_rx_frequency(f=" << freq << ", chan=" << chan << ")"); @@ -366,8 +371,7 @@ double magnesium_radio_control_impl::set_tx_bandwidth( void magnesium_radio_control_impl::set_tx_gain_profile( const std::string& profile, const size_t) { - if (std::find( - MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) + if (std::find(MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) == MAGNESIUM_GP_OPTIONS.end()) { RFNOC_LOG_ERROR("Invalid TX gain profile: " << profile); throw uhd::key_error("Invalid TX gain profile!"); @@ -378,8 +382,7 @@ void magnesium_radio_control_impl::set_tx_gain_profile( void magnesium_radio_control_impl::set_rx_gain_profile( const std::string& profile, const size_t) { - if (std::find( - MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) + if (std::find(MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) == MAGNESIUM_GP_OPTIONS.end()) { RFNOC_LOG_ERROR("Invalid RX gain profile: " << profile); throw uhd::key_error("Invalid RX gain profile!"); @@ -592,12 +595,14 @@ uhd::freq_range_t magnesium_radio_control_impl::get_rx_frequency_range(const siz return meta_range_t(MAGNESIUM_MIN_FREQ, MAGNESIUM_MAX_FREQ, 1.0); } -std::vector<std::string> magnesium_radio_control_impl::get_tx_gain_names(const size_t) const +std::vector<std::string> magnesium_radio_control_impl::get_tx_gain_names( + const size_t) const { return {MAGNESIUM_GAIN1, MAGNESIUM_GAIN2, MAGNESIUM_AMP}; } -std::vector<std::string> magnesium_radio_control_impl::get_rx_gain_names(const size_t) const +std::vector<std::string> magnesium_radio_control_impl::get_rx_gain_names( + const size_t) const { return {MAGNESIUM_GAIN1, MAGNESIUM_GAIN2, MAGNESIUM_AMP}; } @@ -710,7 +715,8 @@ std::vector<std::string> magnesium_radio_control_impl::get_tx_gain_profile_names return MAGNESIUM_GP_OPTIONS; } -std::vector<std::string> magnesium_radio_control_impl::get_rx_gain_profile_names(const size_t ) const +std::vector<std::string> magnesium_radio_control_impl::get_rx_gain_profile_names( + const size_t) const { return MAGNESIUM_GP_OPTIONS; } @@ -761,7 +767,7 @@ std::vector<std::string> magnesium_radio_control_impl::get_rx_lo_sources( freq_range_t magnesium_radio_control_impl::get_rx_lo_freq_range( const std::string& name, const size_t /*chan*/ -) const + ) const { if (name == MAGNESIUM_LO1) { return freq_range_t{ADF4351_MIN_FREQ, ADF4351_MAX_FREQ}; @@ -790,7 +796,7 @@ void magnesium_radio_control_impl::set_rx_lo_source( const std::string magnesium_radio_control_impl::get_rx_lo_source( const std::string& name, const size_t /*chan*/ -) const + ) const { if (name == MAGNESIUM_LO1) { // TODO: should we use this from cache? @@ -860,14 +866,14 @@ double magnesium_radio_control_impl::get_rx_lo_freq( // TX LO std::vector<std::string> magnesium_radio_control_impl::get_tx_lo_names( const size_t /*chan*/ -) const + ) const { return std::vector<std::string>{MAGNESIUM_LO1, MAGNESIUM_LO2}; } std::vector<std::string> magnesium_radio_control_impl::get_tx_lo_sources( const std::string& name, const size_t /*chan*/ -) const + ) const { if (name == MAGNESIUM_LO2) { return std::vector<std::string>{"internal"}; @@ -960,7 +966,8 @@ double magnesium_radio_control_impl::set_tx_lo_freq( return return_freq; } -double magnesium_radio_control_impl::get_tx_lo_freq(const std::string& name, const size_t chan) +double magnesium_radio_control_impl::get_tx_lo_freq( + const std::string& name, const size_t chan) { RFNOC_LOG_TRACE("get_tx_lo_freq(name=" << name << ")"); std::string source = this->get_tx_lo_source(name, chan); @@ -1106,7 +1113,8 @@ std::vector<std::string> magnesium_radio_control_impl::get_rx_sensor_names(size_ return sensor_names; } -sensor_value_t magnesium_radio_control_impl::get_rx_sensor(const std::string& name, size_t chan) +sensor_value_t magnesium_radio_control_impl::get_rx_sensor( + const std::string& name, size_t chan) { if (name == "lo_locked") { return sensor_value_t( @@ -1124,7 +1132,8 @@ std::vector<std::string> magnesium_radio_control_impl::get_tx_sensor_names(size_ return sensor_names; } -sensor_value_t magnesium_radio_control_impl::get_tx_sensor(const std::string& name, size_t chan) +sensor_value_t magnesium_radio_control_impl::get_tx_sensor( + const std::string& name, size_t chan) { if (name == "lo_locked") { return sensor_value_t( @@ -1137,7 +1146,8 @@ sensor_value_t magnesium_radio_control_impl::get_tx_sensor(const std::string& na /************************************************************************** * node_t API Calls *************************************************************************/ -void magnesium_radio_control_impl::set_command_time(uhd::time_spec_t time, const size_t chan) +void magnesium_radio_control_impl::set_command_time( + uhd::time_spec_t time, const size_t chan) { node_t::set_command_time(time, chan); _wb_ifaces.at(chan)->set_time(time); diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp index c6d8e0338..3c965866e 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp @@ -14,15 +14,15 @@ #include "magnesium_ad9371_iface.hpp" #include "magnesium_cpld_ctrl.hpp" #include "magnesium_cpld_regs.hpp" -#include <iostream> +#include <uhd/types/eeprom.hpp> #include <uhd/types/serial.hpp> #include <uhd/usrp/dboard_manager.hpp> #include <uhd/usrp/gpio_defs.hpp> -#include <uhd/types/eeprom.hpp> #include <uhdlib/rfnoc/radio_control_impl.hpp> #include <uhdlib/usrp/common/adf435x.hpp> #include <uhdlib/usrp/common/mpmd_mb_controller.hpp> #include <uhdlib/usrp/cores/gpio_atr_3000.hpp> +#include <iostream> #include <mutex> namespace uhd { namespace rfnoc { @@ -77,8 +77,8 @@ public: double set_rate(double rate); // Setters - void set_tx_antenna(const std::string &ant, const size_t chan); - void set_rx_antenna(const std::string &ant, const size_t chan); + void set_tx_antenna(const std::string& ant, const size_t chan); + void set_rx_antenna(const std::string& ant, const size_t chan); double set_tx_frequency(const double freq, const size_t chan); double set_rx_frequency(const double freq, const size_t chan); double set_tx_gain(const double gain, const size_t chan); @@ -157,13 +157,15 @@ public: /************************************************************************** * Radio Identification API Calls *************************************************************************/ - std::string get_slot_name() const { return _radio_slot; } + std::string get_slot_name() const + { + return _radio_slot; + } size_t get_chan_from_dboard_fe( const std::string& fe, const uhd::direction_t direction) const; std::string get_dboard_fe_from_chan( const size_t chan, const uhd::direction_t direction) const; - std::string get_fe_name( - const size_t chan, const uhd::direction_t direction) const; + std::string get_fe_name(const size_t chan, const uhd::direction_t direction) const; /************************************************************************** * node_t API Calls diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp index 41f99cd68..a4decdaaa 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_cpld.cpp @@ -120,12 +120,11 @@ void magnesium_radio_control_impl::_update_rx_freq_switches(const double freq, const bool bypass_lnas, const magnesium_cpld_ctrl::chan_sel_t chan_sel) { - RFNOC_LOG_TRACE( - "Update all RX freq related switches. f=" << freq - << " Hz, " - "bypass LNAS: " - << (bypass_lnas ? "Yes" : "No") - << ", chan=" << chan_sel); + RFNOC_LOG_TRACE("Update all RX freq related switches. f=" + << freq + << " Hz, " + "bypass LNAS: " + << (bypass_lnas ? "Yes" : "No") << ", chan=" << chan_sel); auto rx_sw2 = magnesium_cpld_ctrl::RX_SW2_BYPASSPATHTOSWITCH6; auto rx_sw3 = magnesium_cpld_ctrl::RX_SW3_SHUTDOWNSW3; auto rx_sw4 = magnesium_cpld_ctrl::RX_SW4_FILTER2100X2850MHZFROM; diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp index f515b2e33..b06222205 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp @@ -7,8 +7,8 @@ #include "magnesium_constants.hpp" #include "magnesium_gain_table.hpp" #include "magnesium_radio_control.hpp" -#include <uhd/utils/log.hpp> #include <uhd/exception.hpp> +#include <uhd/utils/log.hpp> using namespace uhd; using namespace uhd::usrp; @@ -61,14 +61,13 @@ double magnesium_radio_control_impl::_set_all_gain( const double ad9371_gain = ((dir == RX_DIRECTION) ? AD9371_MAX_RX_GAIN : AD9371_MAX_TX_GAIN) - gain_tuple.ad9371_att; - RFNOC_LOG_TRACE( - "AD9371 attenuation==" << gain_tuple.ad9371_att - << " dB, " - "AD9371 gain==" - << ad9371_gain - << " dB, " - "DSA attenuation == " - << gain_tuple.dsa_att << " dB."); + RFNOC_LOG_TRACE("AD9371 attenuation==" << gain_tuple.ad9371_att + << " dB, " + "AD9371 gain==" + << ad9371_gain + << " dB, " + "DSA attenuation == " + << gain_tuple.dsa_att << " dB."); _ad9371->set_gain(ad9371_gain, ad9371_chan, dir); _dsa_set_att(gain_tuple.dsa_att, chan, dir); if (dir == RX_DIRECTION or dir == DX_DIRECTION) { @@ -101,9 +100,8 @@ double magnesium_radio_control_impl::_get_all_gain( double magnesium_radio_control_impl::_dsa_set_att( const double att, const size_t chan, const direction_t dir) { - RFNOC_LOG_TRACE( - __func__ << "(att=" - << "att dB, chan=" << chan << ", dir=" << dir << ")") + RFNOC_LOG_TRACE(__func__ << "(att=" + << "att dB, chan=" << chan << ", dir=" << dir << ")") const uint32_t dsa_val = 2 * att; _set_dsa_val(chan, dir, dsa_val); diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp index 6595cb113..d9bf5c3d2 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp @@ -9,8 +9,8 @@ #include <uhd/types/eeprom.hpp> #include <uhd/types/sensors.hpp> #include <uhd/utils/log.hpp> -#include <uhdlib/usrp/cores/spi_core_3000.hpp> #include <uhdlib/rfnoc/reg_iface_adapter.hpp> +#include <uhdlib/usrp/cores/spi_core_3000.hpp> #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/case_conv.hpp> #include <boost/algorithm/string/split.hpp> @@ -25,8 +25,8 @@ namespace { enum slave_select_t { SEN_CPLD = 1, SEN_TX_LO = 2, SEN_RX_LO = 4, SEN_PHASE_DAC = 8 }; -constexpr double MAGNESIUM_DEFAULT_FREQ = 2.5e9; // Hz -constexpr double MAGNESIUM_DEFAULT_BANDWIDTH = 100e6; // Hz +constexpr double MAGNESIUM_DEFAULT_FREQ = 2.5e9; // Hz +constexpr double MAGNESIUM_DEFAULT_BANDWIDTH = 100e6; // Hz } // namespace @@ -148,10 +148,12 @@ void magnesium_radio_control_impl::_init_frontend_subtree( << chan_idx << " to prop tree path " << tx_fe_path << " and " << rx_fe_path); // TX Standard attributes - subtree->create<std::string>(tx_fe_path / "name").set(get_fe_name(chan_idx, TX_DIRECTION)); + subtree->create<std::string>(tx_fe_path / "name") + .set(get_fe_name(chan_idx, TX_DIRECTION)); subtree->create<std::string>(tx_fe_path / "connection").set("IQ"); // RX Standard attributes - subtree->create<std::string>(rx_fe_path / "name").set(get_fe_name(chan_idx, RX_DIRECTION)); + subtree->create<std::string>(rx_fe_path / "name") + .set(get_fe_name(chan_idx, RX_DIRECTION)); subtree->create<std::string>(rx_fe_path / "connection").set("IQ"); // TX Antenna subtree->create<std::string>(tx_fe_path / "antenna" / "value") @@ -160,7 +162,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_tx_antenna(chan_idx); }); subtree->create<std::vector<std::string>>(tx_fe_path / "antenna" / "options") - .set_publisher([this](){ return get_tx_antennas(0); }) + .set_publisher([this]() { return get_tx_antennas(0); }) .add_coerced_subscriber([](const std::vector<std::string>&) { throw uhd::runtime_error("Attempting to update antenna options!"); }); @@ -171,7 +173,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_rx_antenna(chan_idx); }); subtree->create<std::vector<std::string>>(rx_fe_path / "antenna" / "options") - .set_publisher([this](){ return get_rx_antennas(0); }) + .set_publisher([this]() { return get_rx_antennas(0); }) .add_coerced_subscriber([](const std::vector<std::string>&) { throw uhd::runtime_error("Attempting to update antenna options!"); }); @@ -182,7 +184,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_tx_frequency(chan_idx); }); subtree->create<meta_range_t>(tx_fe_path / "freq" / "range") - .set_publisher([this, chan_idx](){ return get_tx_frequency_range(chan_idx); }) + .set_publisher([this, chan_idx]() { return get_tx_frequency_range(chan_idx); }) .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update freq range!"); }); @@ -193,7 +195,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_rx_frequency(chan_idx); }); subtree->create<meta_range_t>(rx_fe_path / "freq" / "range") - .set_publisher([this, chan_idx](){ return get_rx_frequency_range(chan_idx); }) + .set_publisher([this, chan_idx]() { return get_rx_frequency_range(chan_idx); }) .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update freq range!"); }); @@ -205,7 +207,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_tx_bandwidth(chan_idx); }); subtree->create<meta_range_t>(tx_fe_path / "bandwidth" / "range") - .set_publisher([this, chan_idx](){ return get_tx_bandwidth_range(chan_idx); }) + .set_publisher([this, chan_idx]() { return get_tx_bandwidth_range(chan_idx); }) .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update bandwidth range!"); }); @@ -217,7 +219,7 @@ void magnesium_radio_control_impl::_init_frontend_subtree( }) .set_publisher([this, chan_idx]() { return this->get_rx_bandwidth(chan_idx); }); subtree->create<meta_range_t>(rx_fe_path / "bandwidth" / "range") - .set_publisher([this, chan_idx](){ return get_rx_bandwidth_range(chan_idx); }) + .set_publisher([this, chan_idx]() { return get_rx_bandwidth_range(chan_idx); }) .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update bandwidth range!"); }); @@ -230,13 +232,16 @@ void magnesium_radio_control_impl::_init_frontend_subtree( .set_coercer([this, chan_idx, gain_name](const double gain) { return this->set_tx_gain(gain, gain_name, chan_idx); }) - .set_publisher( - [this, chan_idx, gain_name]() { return get_tx_gain(gain_name, chan_idx); }); + .set_publisher([this, chan_idx, gain_name]() { + return get_tx_gain(gain_name, chan_idx); + }); subtree->create<meta_range_t>(tx_fe_path / "gains" / gain_name / "range") .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update gain range!"); }) - .set_publisher([this, gain_name, chan_idx]() { return get_tx_gain_range(gain_name, chan_idx); }); + .set_publisher([this, gain_name, chan_idx]() { + return get_tx_gain_range(gain_name, chan_idx); + }); } subtree->create<std::vector<std::string>>(tx_fe_path / "gains/all/profile/options") .set_publisher( @@ -256,13 +261,16 @@ void magnesium_radio_control_impl::_init_frontend_subtree( .set_coercer([this, chan_idx, gain_name](const double gain) { return this->set_rx_gain(gain, gain_name, chan_idx); }) - .set_publisher( - [this, chan_idx, gain_name]() { return get_rx_gain(gain_name, chan_idx); }); + .set_publisher([this, chan_idx, gain_name]() { + return get_rx_gain(gain_name, chan_idx); + }); subtree->create<meta_range_t>(rx_fe_path / "gains" / gain_name / "range") .add_coerced_subscriber([](const meta_range_t&) { throw uhd::runtime_error("Attempting to update gain range!"); }) - .set_publisher([this, gain_name, chan_idx]() { return get_rx_gain_range(gain_name, chan_idx); }); + .set_publisher([this, gain_name, chan_idx]() { + return get_rx_gain_range(gain_name, chan_idx); + }); } subtree->create<std::vector<std::string>>(rx_fe_path / "gains/all/profile/options") .set_publisher( @@ -375,7 +383,8 @@ void magnesium_radio_control_impl::_init_frontend_subtree( auto rx_sensor_names = get_rx_sensor_names(chan_idx); for (const auto& sensor_name : rx_sensor_names) { RFNOC_LOG_TRACE("Adding RX sensor " << sensor_name); - get_tree()->create<sensor_value_t>(rx_fe_path / "sensors" / sensor_name) + get_tree() + ->create<sensor_value_t>(rx_fe_path / "sensors" / sensor_name) .add_coerced_subscriber([](const sensor_value_t&) { throw uhd::runtime_error("Attempting to write to sensor!"); }) @@ -386,7 +395,8 @@ void magnesium_radio_control_impl::_init_frontend_subtree( auto tx_sensor_names = get_tx_sensor_names(chan_idx); for (const auto& sensor_name : tx_sensor_names) { RFNOC_LOG_TRACE("Adding TX sensor " << sensor_name); - get_tree()->create<sensor_value_t>(tx_fe_path / "sensors" / sensor_name) + get_tree() + ->create<sensor_value_t>(tx_fe_path / "sensors" / sensor_name) .add_coerced_subscriber([](const sensor_value_t&) { throw uhd::runtime_error("Attempting to write to sensor!"); }) @@ -403,7 +413,8 @@ void magnesium_radio_control_impl::_init_prop_tree() } // DB EEPROM - get_tree()->create<eeprom_map_t>("eeprom") + get_tree() + ->create<eeprom_map_t>("eeprom") .add_coerced_subscriber( [this](const eeprom_map_t& db_eeprom) { set_db_eeprom(db_eeprom); }) .set_publisher([this]() { return get_db_eeprom(); }); @@ -446,4 +457,3 @@ void magnesium_radio_control_impl::_init_mpm() _n3xx_timekeeper->update_tick_rate(_master_clock_rate); radio_control_impl::set_rate(_master_clock_rate); } - |