aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-02-07 10:41:26 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-10 10:19:26 -0600
commit883e6583608ba1993404b86613b2e5ef234d3df7 (patch)
treedad97600a0d97eb2da9bf38f5ae328bf2609d5dc /host/lib
parent931f3045924e8b326e36e338b5faad2cb5539ab8 (diff)
downloaduhd-883e6583608ba1993404b86613b2e5ef234d3df7.tar.gz
uhd-883e6583608ba1993404b86613b2e5ef234d3df7.tar.bz2
uhd-883e6583608ba1993404b86613b2e5ef234d3df7.zip
ad9361: Fix formatting
- Apply clang-format - Remove unnecessary boost::format
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp12
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp23
2 files changed, 16 insertions, 19 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
index 955da7c62..f30694dbf 100644
--- a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
+++ b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
@@ -8,16 +8,16 @@
#ifndef INCLUDED_AD9361_CTRL_HPP
#define INCLUDED_AD9361_CTRL_HPP
-#include <uhd/transport/zero_copy.hpp>
+#include <uhd/exception.hpp>
+#include <uhd/types/filters.hpp>
#include <uhd/types/ranges.hpp>
-#include <uhd/types/serial.hpp>
#include <uhd/types/sensors.hpp>
-#include <uhd/exception.hpp>
-#include <memory>
+#include <uhd/types/serial.hpp>
+#include <uhd/utils/noncopyable.hpp>
#include <ad9361_device.h>
-#include <string>
#include <complex>
-#include <uhd/types/filters.hpp>
+#include <memory>
+#include <string>
#include <vector>
namespace uhd { namespace usrp {
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index 8e57c48c9..2c928efcc 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -1,6 +1,6 @@
//
// Copyright 2012-2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
+// Copyright 2018-2020 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
@@ -9,7 +9,6 @@
#include <uhd/types/serial.hpp>
#include <uhd/utils/log.hpp>
#include <uhdlib/usrp/common/ad9361_ctrl.hpp>
-#include <boost/format.hpp>
#include <memory>
#include <cstring>
#include <mutex>
@@ -135,15 +134,13 @@ public:
if (clipped_rate != rate) {
UHD_LOGGER_WARNING("AD936X")
- << boost::format("The requested master_clock_rate %f MHz exceeds bounds "
- "imposed by UHD.\n"
- "The master_clock_rate has been forced to %f MHz.\n")
- % (rate / 1e6) % (clipped_rate / 1e6);
+ << "The requested master_clock_rate " << (rate / 1e6)
+ << " MHz exceeds bounds imposed by UHD.\n"
+ "The master_clock_rate has been forced to "
+ << (clipped_rate / 1e6) << " MHz.\n";
}
- double return_rate = _device.set_clock_rate(clipped_rate);
-
- return return_rate;
+ return _device.set_clock_rate(clipped_rate);
}
//! set which RX and TX chains/antennas are active
@@ -243,10 +240,10 @@ public:
const double max_bw = ad9361_device_t::AD9361_MAX_BW;
if (bw < min_bw or bw > max_bw) {
UHD_LOGGER_WARNING("AD936X")
- << boost::format(
- "The requested bandwidth %f MHz is out of range (%f - %f MHz).\n"
- "The bandwidth has been forced to %f MHz.\n")
- % (bw / 1e6) % (min_bw / 1e6) % (max_bw / 1e6) % (actual_bw / 1e6);
+ << "The requested bandwidth " << (bw / 1e6) << " MHz is out of range ("
+ << (min_bw / 1e6) << " - " << (max_bw / 1e6)
+ << " MHz).\nThe bandwidth has been forced to " << (actual_bw / 1e6)
+ << " MHz.";
}
return actual_bw;
}