PJ Reiniger
dd5612fbee
[json] Add forward definition header ( #5676 )
2023-09-22 13:01:27 -07:00
Tyler Veness
1b6ec5a95d
[wpiutil] Upgrade to LLVM 17.0.1 ( #5482 )
2023-09-21 19:54:33 -07:00
Peter Johnson
7be290147c
[wpiutil] Refactor SpanMatcher and TestPrinters from ntcore ( #5658 )
2023-09-18 00:11:36 -07:00
Peter Johnson
3b51ecc35b
[wpiutil] SpanExtras: Add take_back and take_front ( #5651 )
...
Also allow sized spans as input (return is always dynamic size).
2023-09-17 20:00:31 -07:00
Tyler Veness
17f1062885
Replace std::snprintf() with wpi::format_to_n_c_str() ( #5645 )
...
fmtlib uses consteval format string processing, which makes it more
efficient than std::snprintf().
snprintf()s in libuv, mpack, processstarter, and wpigui were left alone.
processstarter uses stdlib only, and wpigui only depends on imgui.
fmt::format_to_n() is analogous to std::format_to_n()
(https://en.cppreference.com/w/cpp/utility/format/format_to_n )
wpi::format_to_n_c_str() is a wrapper which adds the trailing NUL.
2023-09-17 20:00:16 -07:00
Tyler Veness
494cfd78c1
[wpiutil] Fix deprecation warning in LLVM for C++23 ( #5642 )
2023-09-15 19:57:14 -07:00
Peter Johnson
a6157f184d
[wpiutil] timestamp: Add ShutdownNowRio ( #5610 )
2023-09-07 09:59:39 -07:00
Tyler Veness
d7264ff597
Replace wpi::errs() usage with fmtlib ( #5560 )
...
This will make migration to C++23's std::print() easier later.
Fixes #5556 .
2023-08-29 08:56:07 -07:00
Tyler Veness
ab3bf39e0e
[wpiutil] Upgrade to fmt 10.1.1 ( #5585 )
...
This fixes a partial template specialization error internal to fmt that
was encountered in #5560 .
2023-08-28 21:16:53 -07:00
Tyler Veness
165ebe4c79
Upgrade to fmt 10.1.0 ( #5326 )
2023-08-28 15:15:14 -07:00
Tyler Veness
8e2a7fd306
Include thirdparty libraries with angle brackets ( #5578 )
2023-08-28 15:13:34 -07:00
Tyler Veness
969979d6c7
[wpiutil] Update to foonathan memory 0.7-3 ( #5573 )
2023-08-28 15:03:36 -07:00
Tyler Veness
cf86af7166
[wpiutil] Update to mpack 1.1.1 ( #5574 )
2023-08-28 15:02:36 -07:00
Joseph Eng
2e4ad35e36
[wpiutil] jni_util: Add JSpan and CriticalJSpan ( #5554 )
...
These replace JArrayRef et al and support statically sized arrays similar to std::span.
2023-08-24 00:02:56 -07:00
Tyler Veness
96f7fa662e
Upgrade Maven dependencies ( #5553 )
...
The following source code changes were required:
* Whitespace changes from spotless
* PMD warning suppressions for utility class tests
* PMD warning rename from "BeanMembersShouldSerialize" to
"NonSerializableClass"
* Declared more class members as final
2023-08-18 19:18:33 -07:00
Peter Johnson
c01814b80e
[wpiutil] Add C API for DataLog ( #5509 )
2023-08-06 20:18:50 -07:00
Thad House
3ad5d2e42d
[hal,wpiutil] Use HMB for FPGA Timestamps ( #5499 )
...
Current timestamp read code uses FPGA register reads. Through testing,
this read was slower then clock_gettime by about 4-5x. However, another
method of reading the FPGA time is available, using HMB. HMB
is memory mapped IO from RAM to the FPGA. So to code side,
reading the value is just a memory barrier and a memory read.
There is some latency on the write side, so a very small artifical delay
(5us) is added to avoid register reads such as interrupts being ahead
of current timestamps, which could cause issues.
Below is read times for 1000 calls to clock_gettime, register reads and
hmb reads.
```
Clock: Rise 1.72939400 s Fall 1.72990700 s Delta 0.00051300 s
FPGA : Rise 1.72999000 s Fall 1.73429300 s Delta 0.00430300 s
HMB : Rise 1.73466800 s Fall 1.73481900 s Delta 0.00015100 s
```
Also add full HMB struct to HAL for future usage.
2023-08-03 23:46:55 -07:00
Ryan Blue
90e37a129f
[wpiutil,wpimath] Add generic InterpolatingTreeMap ( #5372 )
2023-08-03 21:46:17 -07:00
Peter Johnson
a95994fff6
[wpiutil] timestamp: Call FPGA functions directly ( #5235 )
...
This works around an exit race with wpi::Now() on Rio; it was overridden
to call HAL_GetFPGATime(), which calls chipobject, but on exit, because
there was not a library dependency, the chipobject could be destroyed
prior to wpiutil/wpinet being shut down.
2023-07-24 23:03:28 -07:00
Thad House
b8cdf97621
[build] Prepare for Windows arm64 builds ( #5390 )
...
Builds aren't actually enabled yet due to a bug in Gradle.
2023-07-24 22:46:25 -07:00
Peter Johnson
44acca7c00
[wpiutil] Add ClassPreloader ( #5365 )
...
This provides an easy-to-use way to preload classes by name at startup to
avoid later delays due to lazy classloading.
2023-07-23 11:18:38 -07:00
Peter Johnson
3a6e40a44b
[wpiutil] Enhance DataLog Java raw value support
...
Add support for start, length, and ByteBuffers
2023-07-22 17:17:52 -07:00
Peter Johnson
8dae5af271
[wpiutil] Add compile-time string utilities (ct_string) ( #5462 )
2023-07-22 17:16:37 -07:00
Tyler Veness
828bc5276f
[wpiutil] Upgrade to LLVM 16.0.6 ( #5435 )
...
Fixes #5332 .
2023-07-12 22:50:13 -07:00
Thad House
e5452e3f69
[wpiutil] Add WPICleaner and an example how to use it ( #4850 )
2023-07-10 09:59:36 -07:00
autoantwort
a6463ed761
[wpiutil] Fix unused variable warning in release build ( #5430 )
2023-07-10 09:48:51 -07:00
Ryan Blue
663bf25aaf
[docs] Generate docs for symbols in __cplusplus ( #5412 )
2023-06-22 20:58:38 -07:00
Ryan Blue
1fca519fb4
[wpiutil] Remove remnants of ghc fs and tcb_span libraries ( #5411 )
2023-06-22 19:42:44 -07:00
Tyler Veness
5d3a133f9f
Remove spaces in NOLINT comments ( #5407 )
...
clang-tidy ignores the category filter if there's a space. wpiformat now
ignores categories it doesn't understand, so we can remove the spaces.
2023-06-20 20:29:23 -07:00
Tyler Veness
eb3810c765
[wpiutil] Fix clang-tidy warnings ( #5406 )
2023-06-20 10:55:05 -07:00
Ryan Blue
d466933963
[wpiutil] Group doxygen into MPack module ( #5380 )
2023-06-08 20:00:16 -07:00
Tyler Veness
652d1c44e3
[wpiutil] Upgrade to macOS 12 to remove concept shims ( #5379 )
...
The macOS deployment target has been upgraded from 10.15 to 11. Also, a
deprecation warning for sprintf() in libuv was suppressed.
2023-06-08 19:59:54 -07:00
Ryan Blue
7ab5800487
[wpiutil] Fix docs typo in SmallVector ( #5381 )
2023-06-08 19:58:21 -07:00
Tyler Veness
91cbcea841
Replace SFINAE with concepts ( #5361 )
...
Concepts are cleaner to use and result in much better error messages for incorrect template use.
2023-06-07 09:50:09 -07:00
Tyler Veness
5fac18ff4a
Update formatting to clang-format 16 ( #5370 )
2023-05-31 22:10:53 -07:00
Gold856
01490fc77b
[wpiutil] DataLog: Add documentation for append methods (NFC) ( #5348 )
2023-05-18 21:56:21 -07:00
Tyler Veness
fd294bdd71
[build] Fix compilation with GCC 13 ( #5322 )
2023-05-16 13:31:58 -07:00
Thad House
c82fcb1975
[wpiutil] Add reflection based cleanup helper ( #4919 )
...
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com >
2023-05-12 21:35:39 -07:00
Tyler Veness
15ba95df7e
[wpiutil] Use std::filesystem ( #4941 )
2023-05-12 21:34:09 -07:00
sciencewhiz
4af84a1c12
Fix Typos (NFC) ( #5137 )
2023-02-26 15:06:37 -08:00
Peter Johnson
d56314f866
[wpiutil] Disable mock time on the Rio ( #5092 )
2023-02-12 22:38:34 -08:00
Peter Johnson
49bb1358d8
[wpiutil] MemoryBuffer: Fix GetMemoryBufferForStream ( #5017 )
...
This would previously just write past the end of the buffer, smashing
the stack. It's only called in the case when a non-file or block device
is used as the file.
2023-01-28 22:38:34 -08:00
Peter Johnson
9c4c07c0f9
[wpiutil] Remove NDEBUG check for debug-level logging ( #5018 )
...
This adds minimal overhead but is useful when debugging release
binaries.
2023-01-28 14:13:58 -08:00
Tyler Veness
cf4235ea36
[wpiutil] Guard MSVC pragma in SymbolExports.h ( #4911 )
...
MinGW gives an unknown pragma warning on Windows.
2023-01-07 16:41:40 -08:00
Dustin Spicuzza
42fc4cb6bc
[wpiutil] SafeThread: Provide start/stop hooks ( #4880 )
...
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com >
2022-12-31 15:40:45 -08:00
Sriman Achanta
26bdbf3d41
Java optimization and formatting fixes ( #4857 )
2022-12-26 11:37:53 -08:00
Sriman Achanta
92149efa11
Spelling and grammar cleanups ( #4849 )
2022-12-26 11:32:13 -08:00
Ryan Blue
6948cea67a
[wpiutil] Fix MemoryBuffer initialization ( #4797 )
...
Dereferencing an end iterator is undefined behavior and causes a failed assertion when running in Windows debug.
2022-12-11 07:39:04 -08:00
Ryan Blue
a31459bce6
[wpiutil] Fix UnescapeCString overflow when inputSize < 2 ( #4796 )
...
Add tests for empty, small, and string without escapes.
2022-12-11 07:36:38 -08:00
Peter Johnson
b390cad095
[wpilibj] Consistently use ErrorMessages.requireNonNullParam ( #4776 )
...
Also remove wpilibj version of ErrorMessages and consistently use static import.
2022-12-07 21:46:26 -08:00