diff options
author | michael-west <michael.west@ettus.com> | 2014-03-06 16:35:36 -0800 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2014-03-06 16:35:36 -0800 |
commit | 50a5a21eb346b3e04364b90d0c89a5b58cdb4f10 (patch) | |
tree | 6bae5e7b36fb31e7d301f3fbefd3158d35a18c7b /host/lib | |
parent | 973b47c48339dbae2e125a8c8d84ef67fedc4bdf (diff) | |
download | uhd-50a5a21eb346b3e04364b90d0c89a5b58cdb4f10.tar.gz uhd-50a5a21eb346b3e04364b90d0c89a5b58cdb4f10.tar.bz2 uhd-50a5a21eb346b3e04364b90d0c89a5b58cdb4f10.zip |
- Fixed segmentation fault when using X3x0 with daughterboards in 4x4 configuration.
- Updated index of dboard_manager dictionary to include mboard.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index b20897fc6..39c4ce12c 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -975,14 +975,15 @@ void x300_impl::setup_radio(const size_t mb_i, const size_t i, const std::string //////////////////////////////////////////////////////////////////// // create RF frontend interfacing //////////////////////////////////////////////////////////////////// + const fs_path db_path = (mb_path / "dboards" / db_name); const size_t j = (db_name == "B")? 0x2 : 0x0; - _tree->create<dboard_eeprom_t>(mb_path / "dboards" / db_name / "rx_eeprom") + _tree->create<dboard_eeprom_t>(db_path / "rx_eeprom") .set(mb.db_eeproms[X300_DB0_RX_EEPROM | j]) .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_RX_EEPROM | j), _1)); - _tree->create<dboard_eeprom_t>(mb_path / "dboards" / db_name / "tx_eeprom") + _tree->create<dboard_eeprom_t>(db_path / "tx_eeprom") .set(mb.db_eeproms[X300_DB0_TX_EEPROM | j]) .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_TX_EEPROM | j), _1)); - _tree->create<dboard_eeprom_t>(mb_path / "dboards" / db_name / "gdb_eeprom") + _tree->create<dboard_eeprom_t>(db_path / "gdb_eeprom") .set(mb.db_eeproms[X300_DB0_GDB_EEPROM | j]) .subscribe(boost::bind(&x300_impl::set_db_eeprom, this, mb.zpu_i2c, (0x50 | X300_DB0_GDB_EEPROM | j), _1)); @@ -997,26 +998,26 @@ void x300_impl::setup_radio(const size_t mb_i, const size_t i, const std::string db_config.which_rx_clk = (db_name == "A")? X300_CLOCK_WHICH_DB0_RX : X300_CLOCK_WHICH_DB1_RX; db_config.which_tx_clk = (db_name == "A")? X300_CLOCK_WHICH_DB0_TX : X300_CLOCK_WHICH_DB1_TX; db_config.dboard_slot = (db_name == "A")? 0 : 1; - _dboard_ifaces[db_name] = x300_make_dboard_iface(db_config); + _dboard_ifaces[db_path] = x300_make_dboard_iface(db_config); //create a new dboard manager - _tree->create<dboard_iface::sptr>(mb_path / "dboards" / db_name / "iface").set(_dboard_ifaces[db_name]); - _dboard_managers[db_name] = dboard_manager::make( + _tree->create<dboard_iface::sptr>(db_path / "iface").set(_dboard_ifaces[db_path]); + _dboard_managers[db_path] = dboard_manager::make( mb.db_eeproms[X300_DB0_RX_EEPROM | j].id, mb.db_eeproms[X300_DB0_TX_EEPROM | j].id, mb.db_eeproms[X300_DB0_GDB_EEPROM | j].id, - _dboard_ifaces[db_name], - _tree->subtree(mb_path / "dboards" / db_name) + _dboard_ifaces[db_path], + _tree->subtree(db_path) ); //now that dboard is created -- register into rx antenna event - const std::string fe_name = _tree->list(mb_path / "dboards" / db_name / "rx_frontends").front(); - _tree->access<std::string>(mb_path / "dboards" / db_name / "rx_frontends" / fe_name / "antenna" / "value") + const std::string fe_name = _tree->list(db_path / "rx_frontends").front(); + _tree->access<std::string>(db_path / "rx_frontends" / fe_name / "antenna" / "value") .subscribe(boost::bind(&x300_impl::update_atr_leds, this, mb.radio_perifs[i].leds, _1)); this->update_atr_leds(mb.radio_perifs[i].leds, ""); //init anyway, even if never called //bind frontend corrections to the dboard freq props - const fs_path db_rx_fe_path = mb_path / "dboards" / db_name / "rx_frontends"; + const fs_path db_rx_fe_path = db_path / "rx_frontends"; BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)) { _tree->access<double>(db_rx_fe_path / name / "freq" / "value") |