aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/gain_group.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-07-28 15:40:43 -0700
committerNick Foster <nick@nerdnetworks.org>2010-07-28 15:40:43 -0700
commit8784cf70df692066f224ddf58d624b148ea98301 (patch)
treedf0ea9bc2594316da79997933e0dd117a52d8311 /host/lib/gain_group.cpp
parente5722d61aa2b523991f5388d9bda0f56f43f79bd (diff)
downloaduhd-8784cf70df692066f224ddf58d624b148ea98301.tar.gz
uhd-8784cf70df692066f224ddf58d624b148ea98301.tar.bz2
uhd-8784cf70df692066f224ddf58d624b148ea98301.zip
ADC gain control works.
Separated digital gain and fine gain correction into separate buckets. Changed the rounding policy of gain_group to floor() rather than round().
Diffstat (limited to 'host/lib/gain_group.cpp')
-rw-r--r--host/lib/gain_group.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/host/lib/gain_group.cpp b/host/lib/gain_group.cpp
index 5a14fa96f..d5d7730fd 100644
--- a/host/lib/gain_group.cpp
+++ b/host/lib/gain_group.cpp
@@ -21,7 +21,6 @@
#include <uhd/utils/assert.hpp>
#include <boost/foreach.hpp>
#include <boost/bind.hpp>
-#include <boost/math/special_functions/round.hpp>
#include <algorithm>
#include <vector>
#include <iostream>
@@ -109,7 +108,7 @@ public:
//fill in the largest step sizes first that are less than the remainder
BOOST_FOREACH(size_t i, indexes_step_size_dec){
const gain_range_t range = all_fcns.at(i).get_range();
- float additional_gain = range.step*rint(
+ float additional_gain = range.step*int(
std::clip(gain_bucket.at(i) + gain_left_to_distribute, range.min, range.max
)/range.step) - gain_bucket.at(i);
gain_bucket.at(i) += additional_gain;