aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-01-17 10:00:47 -0800
committerMartin Braun <martin.braun@ettus.com>2017-01-17 10:00:47 -0800
commit52ca2e0b8045c254c2be1911e77e8bd3d94ceeab (patch)
treec7e1a93eeadd65bb13db1aa68974da495114f046 /host/lib/usrp/common
parent46febf986ae5e89ebb0c350fd9aa42aaa6383997 (diff)
parent95ff7e859d57829e428d41d7746e28c228b983ba (diff)
downloaduhd-52ca2e0b8045c254c2be1911e77e8bd3d94ceeab.tar.gz
uhd-52ca2e0b8045c254c2be1911e77e8bd3d94ceeab.tar.bz2
uhd-52ca2e0b8045c254c2be1911e77e8bd3d94ceeab.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/common')
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp4
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.h18
2 files changed, 17 insertions, 5 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
index 45ebf78bf..e2ed2c77d 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
@@ -491,8 +491,8 @@ double ad9361_device_t::_calibrate_secondary_tx_filter(double req_rfbw)
} else if ((bbbw_mhz * 2) > 24) {
reg0d0 = 0x57;
} else {
- throw uhd::runtime_error("[ad9361_device_t] Cal2ndTxFil: INVALID_CODE_PATH bad bbbw_mhz");
reg0d0 = 0x00;
+ throw uhd::runtime_error("[ad9361_device_t] Cal2ndTxFil: INVALID_CODE_PATH bad bbbw_mhz");
}
/* Translate resistor values to register settings. */
@@ -996,8 +996,8 @@ void ad9361_device_t::_program_gain_table() {
gain_table = gain_table_4000mhz_to_6000mhz;
new_gain_table = 3;
} else {
- throw uhd::runtime_error("[ad9361_device_t] Wrong _rx_freq value");
new_gain_table = 1;
+ throw uhd::runtime_error("[ad9361_device_t] Wrong _rx_freq value");
}
/* Only re-program the gain table if there has been a band change. */
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.h b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
index ae065d78e..f3d24d6b9 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
@@ -40,7 +40,15 @@ public:
enum chain_t { CHAIN_1, CHAIN_2, CHAIN_BOTH };
ad9361_device_t(ad9361_params::sptr client, ad9361_io::sptr io_iface) :
- _client_params(client), _io_iface(io_iface) {
+ _client_params(client), _io_iface(io_iface),
+ _bbpll_freq(0.0), _adcclock_freq(0.0), _req_clock_rate(0.0),
+ _req_coreclk(0.0), _rx_bbf_tunediv(0), _curr_gain_table(0),
+ _rx1_gain(0.0), _rx2_gain(0.0), _tx1_gain(0.0), _tx2_gain(0.0),
+ _tfir_factor(0), _rfir_factor(0),
+ _rx1_agc_mode(GAIN_MODE_MANUAL), _rx2_agc_mode(GAIN_MODE_MANUAL),
+ _rx1_agc_enable(false), _rx2_agc_enable(false),
+ _use_dc_offset_tracking(false), _use_iq_balance_tracking(false)
+ {
/*
* This Boost.Assign to_container() workaround is necessary because STL containers
@@ -213,7 +221,11 @@ private: //Methods
void _set_filter_lp_tia_sec(direction_t direction, filter_info_base::sptr filter);
private: //Members
- typedef struct {
+ struct chip_regs_t
+ {
+ chip_regs_t():
+ vcodivs(0), inputsel(0), rxfilt(0), txfilt(0),
+ bbpll(0), bbftune_config(0), bbftune_mode(0) {}
uint8_t vcodivs;
uint8_t inputsel;
uint8_t rxfilt;
@@ -221,7 +233,7 @@ private: //Members
uint8_t bbpll;
uint8_t bbftune_config;
uint8_t bbftune_mode;
- } chip_regs_t;
+ };
struct filter_query_helper
{