aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_adc_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-03-09 10:38:42 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-17 15:44:05 -0500
commit668a04befdc4ec43b2a6e86992c672ef5f8408e0 (patch)
tree67734ba32968831a5b4ea8dd59b7b2ab52e68d01 /host/lib/usrp/x300/x300_adc_ctrl.cpp
parent19f3c1203a42d9da3d7cb16c881fe2bbdc5ec0ce (diff)
downloaduhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.tar.gz
uhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.tar.bz2
uhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json Note: This is the same procedure as 107a49c0, but applied to all the new code since then.
Diffstat (limited to 'host/lib/usrp/x300/x300_adc_ctrl.cpp')
-rw-r--r--host/lib/usrp/x300/x300_adc_ctrl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_adc_ctrl.cpp b/host/lib/usrp/x300/x300_adc_ctrl.cpp
index 26c1d85ff..afc581ce6 100644
--- a/host/lib/usrp/x300/x300_adc_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_adc_ctrl.cpp
@@ -70,12 +70,12 @@ public:
this->send_ads62p48_reg(0x76);
}
- void reset()
+ void reset() override
{
init();
}
- double set_gain(const double& gain)
+ double set_gain(const double& gain) override
{
const meta_range_t gain_range = meta_range_t(0, 6.0, 0.5);
const int gain_bits = int((gain_range.clip(gain) * 2.0) + 0.5);
@@ -86,8 +86,9 @@ public:
return gain_bits / 2;
}
- void set_test_word(
- const std::string& patterna, const std::string& patternb, const uint32_t num)
+ void set_test_word(const std::string& patterna,
+ const std::string& patternb,
+ const uint32_t num) override
{
_ads62p48_regs.custom_pattern_low = num & 0xff;
_ads62p48_regs.custom_pattern_high = num >> 8;
@@ -117,7 +118,7 @@ public:
this->send_ads62p48_reg(0x75);
}
- ~x300_adc_ctrl_impl(void)
+ ~x300_adc_ctrl_impl(void) override
{
_ads62p48_regs.power_down = ads62p48_regs_t::POWER_DOWN_GLOBAL;
UHD_SAFE_CALL(this->send_ads62p48_reg(0x40);)