Commit graph

26 commits

Author SHA1 Message Date
Martin Braun
38d52121f9 lib: gain_group: Remove spurious logs
Whenever gains where set through a gain_group, it would output spurious
log messages that must stem from someone's debug code, since the log
messages are not very useful by themselves.
2020-03-12 07:27:46 -05:00
Martin Braun
876d4150aa 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.
2020-03-03 08:51:32 -06:00
Martin Braun
d3a16b7022 uhd: Replace all occurrences of boost::bind with std::bind
Note: Replacing everything with a lambda would be even better, but that
can't be easily scripted so we'll do this as a first step to reduce the
Boost footprint.

This also removes occurences of #include <boost/bind.hpp>, and makes
sure all usages of std::bind have an #include <functional>. clang-format
wasn't always applied to minimize the changeset in this commit, however,
it was applied to the blocks of #includes.

Due to conflicts with other Boost libraries, the placeholders _1, _2,
etc. could not be directly used, but had to be explicitly called out
(as std::placeholders::_1, etc.). This makes the use of std::bind even
uglier, which serves as another reminder that using std::bind (and even
more so, boost::bind) should be avoided.

nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It
was not possible to remove it by simply doing a search and replace, so
it will be removed in a separate commit.
2019-11-26 12:21:32 -08:00
Brent Stapleton
a834e2b44a gain groups: Formatting
Applying formatting in anticipation of upcoming changes.
2019-11-26 11:49:11 -08:00
Brent Stapleton
d1a5b70a8f gain_groups: Add zero-value gain groups
Add convenience factory for making a gain group that has a single
zero-valued element. This factory requires a name, which should
probably be ALL_GAINS, or something similar (these constants are
device-specific).

Using this new make_zero factory in the X300 radio control when we
don't find any gain elements so that our gain groups aren't empty. This
simplifies our later setters/getters because we know that we'll always
have _something_ cached.
Note that we only register this zero value gain group for TX, as our
ADC is registered as a gain element, so our RX gain groups are never
empty.
2019-11-26 11:49:11 -08:00
Trung N Tran
eeba52edd7 lib: update get_range of gain_group
Need to skip zero gain step
2018-04-18 15:41:49 -07:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Andrej Rode
26cc20847c uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
2017-02-10 16:44:33 -08:00
Martin Braun
f86f209b33 utils: Fixed minor rounding issue in gain_group 2017-01-04 07:36:51 -08:00
Martin Braun
7c9cc6df10 lib: Removed superfluous variable in gain_group 2016-11-28 12:17:12 -08:00
Nicholas Corgan
654c5b06c0 Added missing pure virtual destructors to base classes 2014-09-01 17:58:24 +02:00
Michael West
c0fd48ac35 Added check and handling for gain names. 2014-01-30 15:20:49 -08:00
Josh Blum
c8dca30d72 uhd: replaced many conditional prints with UHD_LOG usage 2011-05-04 15:27:11 -07:00
Josh Blum
1526889803 uhd: switch algorithm namespace to uhd 2011-02-24 17:28:10 -08:00
Josh Blum
16f08844d7 uhd: renamed the assert header to assert has
only the assert has implementation is in this header

uhd assert throw moved to the exception header

updated code base includes to match
2011-02-24 14:54:24 -08:00
Josh Blum
395bbbbc11 uhd: replace all the instances of float not pertaining to io types with double, simplifies life 2011-01-11 19:46:45 -08:00
Josh Blum
a076dc12aa uhd: update copyright dates 2011-01-05 20:49:45 -08:00
Josh Blum
283067dea2 uhd: replaced templated ranges with one range thing using doubles only to avoid trouble with compiler portability 2011-01-05 12:17:06 -08:00
Josh Blum
08dfff3798 uhd: created a meta range that is a range of ranges for gains and freqs
created a templated range that that holds a start, stop, and step

created a meta-range template that is a vector of ranges
meta-range can calculate the overall start, stop, step
or be indexed to get at components

replaced instances of range.min, max, step with the functions
start() stop() and step()

the xcvr frequency range is now expressed in as two ranges
(have to fix its clip function though)
2010-11-10 19:29:06 -08:00
Josh Blum
26aef3bae9 uhd: added name parameter to gain group, get range, set/get value by name 2010-10-20 15:32:41 -07:00
Josh Blum
ef6953024f uhd: created floor_step to handle floating-point errors in gain group 2010-08-12 00:47:28 -07:00
Josh Blum
1c241c282e uhd: fix device recv docs on timeout, also fix typo 2010-08-08 11:03:38 -07:00
Josh Blum
d1711722dd uhd: use int to round down for gain group 2010-08-06 15:02:33 -07:00
Josh Blum
8e1d51d628 Merge branch 'master' into codec_gains
Conflicts:
	host/lib/CMakeLists.txt
	host/lib/utils/gain_handler.cpp
2010-08-04 16:33:49 -07:00