Commit graph

27 commits

Author SHA1 Message Date
michael-west
1488781b09 utils: Improve cal TX threads
Increase thread priority on TX thread and remove memory copy to reduce
underruns.

Signed-off-by: michael-west <michael.west@ettus.com>
2021-04-29 15:12:05 -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
Ciro Nishiguchi
1c79742231 utils: remove thread priority elevation
Remove UHD call to elevate thread priority to realtime from utils, and
add warning in documentation of set_thread_priority function. Setting
all threads to the same realtime priority can cause the threads to not
share access to the network interface fairly, which adversely affects
operation of the worker threads in UHD.
2019-11-26 11:49:34 -08:00
Brent Stapleton
967be2a4e8 uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
    xargs clang-format -i -style=file
```

Formatting style was designated by the .clang-format file.
2019-01-16 11:40:23 -08:00
Brent Stapleton
601e0ed87b examples: utils: skip formatting program options
Turning off clang formatting around the program option declarations.
clang-format makes them looks bad an unreadable because it thinks the
options are function calls or something.
2019-01-16 11:40:23 -08:00
Martin Braun
09ac6991c3 utils: Factor wait_for_lo_lock() out of cal utils 2018-08-29 15:50:30 -07:00
Martin Braun
0303f1ed55 lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
2018-04-30 17:10:26 -07:00
Nicolas Cuervo
a8c74853f9 cal_utils: logic to handle eventual U's during calibration
For every frequency point, the cal utils will detect underruns and retry
a calibration measurement up to 10 times before failing.
2018-04-18 15:05:22 -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
c33928d2bb utils: add set_thread_name API call, move thread_priority to thread 2017-06-29 13:43:05 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Martin Braun
9e73914791 utils: Minor doc fix (amplitudes are not in counts) 2016-10-13 17:39:03 -07:00
michael-west
734180c44b UHD: Fixes for dboard calibration utilities. 2015-01-16 08:46:21 +01:00
Ben Hilburn
fbde92c7b6 Merge branch 'origin/uhd/cal_msg' into maint 2014-04-11 12:45:47 -07:00
Martin Braun
7cb3c980f9 uhd: Fixed bug in cal tools that would always use A-side settings, also some refactoring 2014-04-10 21:38:14 +02:00
Martin Braun
9ea8bedb6b uhd: Cal tools had ambiguous help message, referring to XCVR boards. 2014-03-28 14:25:09 +01:00
Martin Braun
59bfb27a13 utils: added subdev selection to cal tools 2014-03-10 11:46:02 +01:00
Nicholas Corgan
1bf3103216 Merge branch 'maint' 2012-11-19 12:23:44 -08:00
Nicholas Corgan
3d01dec1ab utils: cal apps immediately fail if dboard has no serial instead of after test runs 2012-11-16 15:53:28 -08:00
Moritz Fischer
171e46cebe examples & utils: return EXIT_FAILURE and EXIT_SUCCESS respectively
instead of 0 and 1.
2012-10-26 14:00:29 -07:00
Josh Blum
06d0032772 uhd: tweaks to calibration utilities 2011-11-23 17:47:44 -08:00
Josh Blum
95568c8b30 e100: added self-cal support with minor speedups 2011-11-16 06:39:31 +00:00
Josh Blum
075e6a9788 uhd: more common code in cal utils 2011-11-15 17:16:31 -08:00
Josh Blum
18abd4dbbf uhd: support for applying cal corrections B100 2011-11-15 16:22:18 -08:00
Josh Blum
f68a9271f4 uhd: added calibration usage app notes and renamed apps again 2011-11-15 15:27:20 -08:00
Renamed from host/utils/usrp_cal_tx_dc_offset.cpp (Browse further)