Commit graph

31 commits

Author SHA1 Message Date
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
Martin Braun
428288bbea utils: query_gpsdo_sensors: Fix ref_lock wait loop
The old loop didn't have any output, and had an inaccurate timeout. We
now use a timer for a 30 second timeout, and print a . every time we
poll the sensor.
2019-11-21 15:02:32 -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
michael-west
46bd88639e utils: Improve query_gpsdo_sensors
- Sets time source before checking ref_locked
  (E310 uses time source for PLL)
- Checks for existence of "gpsdo" time and clock sources before setting
- Only attempts to set them if they exist
- Does not fall back on external sources
- Returns with error if neither can be set to "gpsdo"
2018-12-20 19:18:49 -08: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
Trung N Tran
fc67052345 utils: fix 30s timeout in query_gpsdo_sensors 2018-04-30 17:02:57 -07:00
Martin Braun
305d0e79e2 examples: Fix some minor compiler warnings
All warnings reported by MSVC. Mostly related to narrowing conversions.
2018-02-19 17:01:40 -08: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
michael-west
2cf067271a utils: Fix query_gpsdo_sensors so it works for TCXO on B200 2018-02-01 06:40:37 +01: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
michael-west
c613c7edb4 GPS: Improvements to query_gpsdo_sensor
- Reordered operations to make sure setting clock and time sources is first
- Reduced delay waiting for ref lock
- Added wait for GPSDO warm up
- Made warning messages in gps_ctrl function into log messages to prevent unnecessary output
2017-01-30 09:36:38 +01:00
Martin Braun
bab99a289f utils: Added missing newline to query_gpsdo_sensor output 2016-08-18 16:29:43 -07:00
Nicholas Corgan
f86c263682 query_gpsdo_sensors: added OctoClock-G support 2016-06-16 10:49:39 -07:00
Nicholas Corgan
ec75303792 Fixed minor warnings
* Mismatched printf format strings
* Number truncation
* Unreferenced variables
2016-06-16 08:02:11 -07:00
Nicholas Corgan
8bfc4f541c query_gpsdo_sensors: fixed sleep time 2016-03-25 10:39:38 -07:00
Marcus Müller
7b54874264 utils: Updated query_gpsdo_sensors
* Beautified the tool:
  * better help messages, argument description
  * removed device-specific warning about external clock source being  unavailable
  * if instant LO lock cannot be achieved, wait a few seconds
  * try/catches don't swallow unrelated errors
  * copyright year
* Since time is no longer auto-set on GPSDO, fix that
2016-03-24 15:52:26 -07:00
Moritz Fischer
96f044e273 uhd: utils: query_gpsdo: Explicitly set time_source to 'gpsdo'.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
2015-05-01 17:04:53 -07:00
Martin Braun
fae746179c uhd: Fixed multiple compiler warnings (unused variables, missing literal f) 2015-03-11 16:58:09 -07:00
Martin Braun
1b149f5613 Initial commit E300 support. 2014-10-07 12:09:33 +02:00
Nicholas Corgan
5fc3a5973f Updated documentation
* Updated UHD documentation-related URL's after manual overhaul
* Updated NI-USRP URL to link to NI-USRP 1.3
2014-07-31 10:49:34 -07:00
Josh Blum
31f0e964aa gps: flush uart buffer before waiting for time
This addresses a bug only on the master branch.
Also turn off the servo sensor, its too long a delay.
We will need to conditionally enable this in a later commit.
2013-04-09 20:34:23 -05:00
Josh Blum
417a70fee7 Merge branch 'maint' 2013-04-09 20:02:39 -05:00
Josh Blum
2b2b9464f6 gps: use to_ticks in query app to avoid rounding issues
The to_ticks(1.0) is a preferable way to get whole seconds
because it avoids possible rounding issues since just
getting full seconds does not account for the frac seconds.
2013-04-09 19:59:40 -05:00
Josh Blum
23609771a1 gps: added print for pc clock time to query_gpsdo 2013-04-09 10:38:53 -07:00
Nick Foster
85883530b1 Modify query_gpsdo_sensors to wait long enough to latch a PPS in before checking it. 2013-01-09 10:31:35 -08:00
Josh Blum
0255cd0fbb gpsdo: dont round, do get_full_secs 2012-10-18 12:09:45 -07:00
Moritz Fischer
a8438fa16a query_gpsdo_sensors: Cleaned up a bit and fixed bugs. 2012-10-18 11:57:27 -07:00
Nicholas Corgan
6a8259f297 utils: query_gpsdo_sensors bugfixes
* Fixed method of determining lock from sensor string output
* Fixed method of rounding for Windows compatibility
2012-10-16 13:06:14 -07:00
Nicholas Corgan
390752c6d9 utils: Query GPSDO Sensors
* Outputs readings of GPSDO sensors and compares UHD device time with GPS time
* Correction of URL for GPSDO installation information
2012-10-02 18:07:24 -07:00