aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-05-08 13:51:11 -0700
committerBen Hilburn <ben.hilburn@ettus.com>2014-05-08 13:51:11 -0700
commit9ed3becc1b02628a24eb07e6d8cd70b42638c5f3 (patch)
treef72dba65430250db31e95fd6e5483ea03bbb0799 /host
parentfb90f34042b6ee5afb66955b6637d63ef384ddc9 (diff)
parent0e51394db05b3e66ed5f7335eff363d658b3f47c (diff)
downloaduhd-9ed3becc1b02628a24eb07e6d8cd70b42638c5f3.tar.gz
uhd-9ed3becc1b02628a24eb07e6d8cd70b42638c5f3.tar.bz2
uhd-9ed3becc1b02628a24eb07e6d8cd70b42638c5f3.zip
Merge branch 'maint'
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/utils/msg_task.hpp4
-rw-r--r--host/lib/usrp/multi_usrp.cpp30
2 files changed, 27 insertions, 7 deletions
diff --git a/host/include/uhd/utils/msg_task.hpp b/host/include/uhd/utils/msg_task.hpp
index 40ee65cb1..21c47a240 100644
--- a/host/include/uhd/utils/msg_task.hpp
+++ b/host/include/uhd/utils/msg_task.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2011-2013 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
@@ -48,7 +48,7 @@ namespace uhd{
memcpy(&v.front(), p, n);
return v;
}
- return std::vector<uint8_t>();
+ return std::vector<boost::uint8_t>();
}
/*!
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 166b0cb37..71b1f8995 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -747,7 +747,11 @@ public:
void set_rx_dc_offset(const bool enb, size_t chan){
if (chan != ALL_CHANS){
- _tree->access<bool>(rx_fe_root(chan) / "dc_offset" / "enable").set(enb);
+ if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "enable")) {
+ _tree->access<bool>(rx_fe_root(chan) / "dc_offset" / "enable").set(enb);
+ } else {
+ UHD_MSG(warning) << "Setting DC offset compensation is not possible on this device." << std::endl;
+ }
return;
}
for (size_t c = 0; c < get_rx_num_channels(); c++){
@@ -757,7 +761,11 @@ public:
void set_rx_dc_offset(const std::complex<double> &offset, size_t chan){
if (chan != ALL_CHANS){
- _tree->access<std::complex<double> >(rx_fe_root(chan) / "dc_offset" / "value").set(offset);
+ if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "value")) {
+ _tree->access<std::complex<double> >(rx_fe_root(chan) / "dc_offset" / "value").set(offset);
+ } else {
+ UHD_MSG(warning) << "Setting DC offset is not possible on this device." << std::endl;
+ }
return;
}
for (size_t c = 0; c < get_rx_num_channels(); c++){
@@ -767,7 +775,11 @@ public:
void set_rx_iq_balance(const std::complex<double> &offset, size_t chan){
if (chan != ALL_CHANS){
- _tree->access<std::complex<double> >(rx_fe_root(chan) / "iq_balance" / "value").set(offset);
+ if (_tree->exists(rx_fe_root(chan) / "iq_balance" / "value")) {
+ _tree->access<std::complex<double> >(rx_fe_root(chan) / "iq_balance" / "value").set(offset);
+ } else {
+ UHD_MSG(warning) << "Setting IQ balance is not possible on this device." << std::endl;
+ }
return;
}
for (size_t c = 0; c < get_rx_num_channels(); c++){
@@ -933,7 +945,11 @@ public:
void set_tx_dc_offset(const std::complex<double> &offset, size_t chan){
if (chan != ALL_CHANS){
- _tree->access<std::complex<double> >(tx_fe_root(chan) / "dc_offset" / "value").set(offset);
+ if (_tree->exists(tx_fe_root(chan) / "dc_offset" / "value")) {
+ _tree->access<std::complex<double> >(tx_fe_root(chan) / "dc_offset" / "value").set(offset);
+ } else {
+ UHD_MSG(warning) << "Setting DC offset is not possible on this device." << std::endl;
+ }
return;
}
for (size_t c = 0; c < get_tx_num_channels(); c++){
@@ -943,7 +959,11 @@ public:
void set_tx_iq_balance(const std::complex<double> &offset, size_t chan){
if (chan != ALL_CHANS){
- _tree->access<std::complex<double> >(tx_fe_root(chan) / "iq_balance" / "value").set(offset);
+ if (_tree->exists(tx_fe_root(chan) / "iq_balance" / "value")) {
+ _tree->access<std::complex<double> >(tx_fe_root(chan) / "iq_balance" / "value").set(offset);
+ } else {
+ UHD_MSG(warning) << "Setting IQ balance is not possible on this device." << std::endl;
+ }
return;
}
for (size_t c = 0; c < get_tx_num_channels(); c++){