aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_wbx_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/db_wbx_common.cpp')
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp
index 503e5aabf..97357bc90 100644
--- a/host/lib/usrp/dboard/db_wbx_common.cpp
+++ b/host/lib/usrp/dboard/db_wbx_common.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2011-2012 Ettus Research LLC
+// Copyright 2011-2014 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -63,8 +63,11 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
this->get_iface()->set_clock_enabled(dboard_iface::UNIT_RX, true);
////////////////////////////////////////////////////////////////////
- // Register RX properties
+ // Register RX and TX properties
////////////////////////////////////////////////////////////////////
+ boost::uint16_t rx_id = this->get_rx_id().to_uint16();
+
+ this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
.publish(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_RX));
BOOST_FOREACH(const std::string &name, wbx_rx_gain_ranges.keys()){
@@ -79,30 +82,34 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
.subscribe(boost::bind(&wbx_base::set_rx_enabled, this, _1))
.set(true); //start enabled
this->get_rx_subtree()->create<bool>("use_lo_offset").set(false);
- this->get_rx_subtree()->create<double>("bandwidth/value").set(2*20.0e6); //20MHz low-pass, we want complex double-sided
+
+ //Value of bw low-pass dependent on board, we want complex double-sided
+ double bw = (rx_id != 0x0081) ? 20.0e6 : 60.0e6;
+ this->get_rx_subtree()->create<double>("bandwidth/value").set(2*bw);
this->get_rx_subtree()->create<meta_range_t>("bandwidth/range")
- .set(freq_range_t(2*20.0e6, 2*20.0e6));
+ .set(freq_range_t(2*bw, 2*bw));
+ this->get_tx_subtree()->create<double>("bandwidth/value").set(2*bw);
+ this->get_tx_subtree()->create<meta_range_t>("bandwidth/range")
+ .set(freq_range_t(2*bw, 2*bw));
- ////////////////////////////////////////////////////////////////////
- // Register TX properties
- ////////////////////////////////////////////////////////////////////
+ this->get_tx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
.publish(boost::bind(&wbx_base::get_locked, this, dboard_iface::UNIT_TX));
this->get_tx_subtree()->create<std::string>("connection").set("IQ");
this->get_tx_subtree()->create<bool>("use_lo_offset").set(false);
- this->get_tx_subtree()->create<double>("bandwidth/value").set(2*20.0e6); //20MHz low-pass, we want complex double-sided
- this->get_tx_subtree()->create<meta_range_t>("bandwidth/range")
- .set(freq_range_t(2*20.0e6, 2*20.0e6));
// instantiate subclass foo
- switch(get_rx_id().to_uint16()) {
- case 0x053:
+ switch(rx_id) {
+ case 0x0053:
db_actual = wbx_versionx_sptr(new wbx_version2(this));
return;
- case 0x057:
+ case 0x0057:
db_actual = wbx_versionx_sptr(new wbx_version3(this));
return;
- case 0x063:
+ case 0x0063:
+ db_actual = wbx_versionx_sptr(new wbx_version4(this));
+ return;
+ case 0x0081:
db_actual = wbx_versionx_sptr(new wbx_version4(this));
return;
default: