aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_ubx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/db_ubx.cpp')
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 3dd0b1c84..b52234947 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -27,7 +27,7 @@
#include <uhd/usrp/dboard_manager.hpp>
#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/log.hpp>
-#include <uhd/utils/msg.hpp>
+
#include <uhd/utils/static.hpp>
#include <uhd/utils/safe_call.hpp>
#include <boost/assign/list_of.hpp>
@@ -300,7 +300,7 @@ public:
{
std::vector<double> rates = _iface->get_clock_rates(dboard_iface::UNIT_RX);
double highest_rate = 0.0;
- BOOST_FOREACH(double rate, rates)
+ for(double rate: rates)
{
if (rate <= pfd_freq_max and rate > highest_rate)
highest_rate = rate;
@@ -312,7 +312,7 @@ public:
{
std::vector<double> rates = _iface->get_clock_rates(dboard_iface::UNIT_TX);
double highest_rate = 0.0;
- BOOST_FOREACH(double rate, rates)
+ for(double rate: rates)
{
if (rate <= pfd_freq_max and rate > highest_rate)
highest_rate = rate;
@@ -370,7 +370,7 @@ public:
_rxlo1 = max287x_iface::make<max2870>(boost::bind(&ubx_xcvr::write_spi_regs, this, RXLO1, _1));
_rxlo2 = max287x_iface::make<max2870>(boost::bind(&ubx_xcvr::write_spi_regs, this, RXLO2, _1));
std::vector<max287x_iface::sptr> los = boost::assign::list_of(_txlo1)(_txlo2)(_rxlo1)(_rxlo2);
- BOOST_FOREACH(max287x_iface::sptr lo, los)
+ for(max287x_iface::sptr lo: los)
{
lo->set_auto_retune(false);
lo->set_muxout_mode(max287x_iface::MUXOUT_DLD);
@@ -384,7 +384,7 @@ public:
_rxlo1 = max287x_iface::make<max2871>(boost::bind(&ubx_xcvr::write_spi_regs, this, RXLO1, _1));
_rxlo2 = max287x_iface::make<max2871>(boost::bind(&ubx_xcvr::write_spi_regs, this, RXLO2, _1));
std::vector<max287x_iface::sptr> los = boost::assign::list_of(_txlo1)(_txlo2)(_rxlo1)(_rxlo2);
- BOOST_FOREACH(max287x_iface::sptr lo, los)
+ for(max287x_iface::sptr lo: los)
{
lo->set_auto_retune(false);
//lo->set_cycle_slip_mode(true); // tried it - caused longer lock times
@@ -547,7 +547,7 @@ private:
{
boost::mutex::scoped_lock lock(_spi_mutex);
ROUTE_SPI(_iface, dest);
- BOOST_FOREACH(uint32_t value, values)
+ for(uint32_t value: values)
WRITE_SPI(_iface, value);
}
@@ -749,7 +749,7 @@ private:
_ubx_tx_atten_val = ((attn_code & 0x3F) << 10);
set_gpio_field(TX_GAIN, attn_code);
write_gpio();
- UHD_LOGV(rarely) << boost::format("UBX TX Gain: %f dB, Code: %d, IO Bits 0x%04x") % gain % attn_code % _ubx_tx_atten_val << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX TX Gain: %f dB, Code: %d, IO Bits 0x%04x") % gain % attn_code % _ubx_tx_atten_val ;
_tx_gain = gain;
return gain;
}
@@ -762,7 +762,7 @@ private:
_ubx_rx_atten_val = ((attn_code & 0x3F) << 10);
set_gpio_field(RX_GAIN, attn_code);
write_gpio();
- UHD_LOGV(rarely) << boost::format("UBX RX Gain: %f dB, Code: %d, IO Bits 0x%04x") % gain % attn_code % _ubx_rx_atten_val << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX RX Gain: %f dB, Code: %d, IO Bits 0x%04x") % gain % attn_code % _ubx_rx_atten_val ;
_rx_gain = gain;
return gain;
}
@@ -786,18 +786,18 @@ private:
property_tree::sptr subtree = this->get_tx_subtree();
device_addr_t tune_args = subtree->access<device_addr_t>("tune_args").get();
is_int_n = boost::iequals(tune_args.get("mode_n",""), "integer");
- UHD_LOGV(rarely) << boost::format("UBX TX: the requested frequency is %f MHz") % (freq/1e6) << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX TX: the requested frequency is %f MHz") % (freq/1e6) ;
double target_pfd_freq = _tx_target_pfd_freq;
if (is_int_n and tune_args.has_key("int_n_step"))
{
target_pfd_freq = tune_args.cast<double>("int_n_step", _tx_target_pfd_freq);
if (target_pfd_freq > _tx_target_pfd_freq)
{
- UHD_MSG(warning)
+ UHD_LOGGER_WARNING("UBX")
<< boost::format("Requested int_n_step of %f MHz too large, clipping to %f MHz")
% (target_pfd_freq/1e6)
% (_tx_target_pfd_freq/1e6)
- << std::endl;
+ ;
target_pfd_freq = _tx_target_pfd_freq;
}
}
@@ -925,7 +925,7 @@ private:
_txlo1_freq = freq_lo1;
_txlo2_freq = freq_lo2;
- UHD_LOGV(rarely) << boost::format("UBX TX: the actual frequency is %f MHz") % (_tx_freq/1e6) << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX TX: the actual frequency is %f MHz") % (_tx_freq/1e6) ;
return _tx_freq;
}
@@ -938,7 +938,7 @@ private:
double ref_freq = _iface->get_clock_rate(dboard_iface::UNIT_RX);
bool is_int_n = false;
- UHD_LOGV(rarely) << boost::format("UBX RX: the requested frequency is %f MHz") % (freq/1e6) << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX RX: the requested frequency is %f MHz") % (freq/1e6) ;
property_tree::sptr subtree = this->get_rx_subtree();
device_addr_t tune_args = subtree->access<device_addr_t>("tune_args").get();
@@ -949,11 +949,11 @@ private:
target_pfd_freq = tune_args.cast<double>("int_n_step", _rx_target_pfd_freq);
if (target_pfd_freq > _rx_target_pfd_freq)
{
- UHD_MSG(warning)
+ UHD_LOGGER_WARNING("UBX")
<< boost::format("Requested int_n_step of %f Mhz too large, clipping to %f MHz")
% (target_pfd_freq/1e6)
% (_rx_target_pfd_freq/1e6)
- << std::endl;
+ ;
target_pfd_freq = _rx_target_pfd_freq;
}
}
@@ -1121,7 +1121,7 @@ private:
_rxlo1_freq = freq_lo1;
_rxlo2_freq = freq_lo2;
- UHD_LOGV(rarely) << boost::format("UBX RX: the actual frequency is %f MHz") % (_rx_freq/1e6) << std::endl;
+ UHD_LOGGER_DEBUG("UBX") << boost::format("UBX RX: the actual frequency is %f MHz") % (_rx_freq/1e6) ;
return _rx_freq;
}