aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-03-02 15:25:13 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-03-03 08:51:32 -0600
commit876d4150aa3da531ddd687b48afada6e43f79146 (patch)
treefd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp
parent1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff)
downloaduhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz
uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2
uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip
uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp
index f515b2e33..b06222205 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_gain.cpp
@@ -7,8 +7,8 @@
#include "magnesium_constants.hpp"
#include "magnesium_gain_table.hpp"
#include "magnesium_radio_control.hpp"
-#include <uhd/utils/log.hpp>
#include <uhd/exception.hpp>
+#include <uhd/utils/log.hpp>
using namespace uhd;
using namespace uhd::usrp;
@@ -61,14 +61,13 @@ double magnesium_radio_control_impl::_set_all_gain(
const double ad9371_gain =
((dir == RX_DIRECTION) ? AD9371_MAX_RX_GAIN : AD9371_MAX_TX_GAIN)
- gain_tuple.ad9371_att;
- RFNOC_LOG_TRACE(
- "AD9371 attenuation==" << gain_tuple.ad9371_att
- << " dB, "
- "AD9371 gain=="
- << ad9371_gain
- << " dB, "
- "DSA attenuation == "
- << gain_tuple.dsa_att << " dB.");
+ RFNOC_LOG_TRACE("AD9371 attenuation==" << gain_tuple.ad9371_att
+ << " dB, "
+ "AD9371 gain=="
+ << ad9371_gain
+ << " dB, "
+ "DSA attenuation == "
+ << gain_tuple.dsa_att << " dB.");
_ad9371->set_gain(ad9371_gain, ad9371_chan, dir);
_dsa_set_att(gain_tuple.dsa_att, chan, dir);
if (dir == RX_DIRECTION or dir == DX_DIRECTION) {
@@ -101,9 +100,8 @@ double magnesium_radio_control_impl::_get_all_gain(
double magnesium_radio_control_impl::_dsa_set_att(
const double att, const size_t chan, const direction_t dir)
{
- RFNOC_LOG_TRACE(
- __func__ << "(att="
- << "att dB, chan=" << chan << ", dir=" << dir << ")")
+ RFNOC_LOG_TRACE(__func__ << "(att="
+ << "att dB, chan=" << chan << ", dir=" << dir << ")")
const uint32_t dsa_val = 2 * att;
_set_dsa_val(chan, dir, dsa_val);