m10653
01fb98baaa
[docs] Add Missing JNI docs from C++ (NFC) ( #6139 )
2024-01-02 20:13:46 -08:00
m10653
99ab836894
[wpiutil] Add missing JavaDocs (NFC) ( #6132 )
2024-01-01 23:37:39 -08:00
Tyler Veness
ad0859a8c9
[docs] Add missing JavaDocs ( #6125 )
2024-01-01 22:56:23 -08:00
Joseph Eng
938bf45fd9
[wpiutil] Remove type param from ProtobufSerializable and StructSerializable ( #6122 )
2023-12-31 14:36:11 -08:00
Peter Johnson
6a2d3c30a6
[wpiutil] Struct: Add info template parameter pack ( #6086 )
...
This allows using Struct in a dynamically typed environment by passing
additional information to the Struct serialization functions.
2023-12-27 09:52:18 -06:00
Peter Johnson
5659038443
[wpiutil,cscore,apriltag] Fix RawFrame ( #6098 )
2023-12-26 22:05:02 -06:00
Peter Johnson
55508706ff
[wpiutil,cscore] Move VideoMode.PixelFormat to wpiutil ( #6097 )
...
This tracks the RawFrame move.
2023-12-26 16:47:17 -06:00
Peter Johnson
21d1972d7a
[wpiutil] DataLog: Ensure file is written on shutdown ( #6087 )
...
Previously the thread could end without the file being written.
2023-12-23 15:40:51 -06:00
Peter Johnson
c29e8c66cf
[wpiutil] DataLog: Fix UB in AppendImpl ( #6088 )
2023-12-23 15:39:39 -06:00
Peter Johnson
aeb1a4aa33
[wpiutil] Add serializable marker interfaces ( #6060 )
2023-12-23 08:20:26 -08:00
Thad House
7c8b7a97ad
[wpiutil] Zero out roborio system timestamp ( #6042 )
...
There was also an issue where the clock zero offset would be incorrect due to the system time updating. This solves that issue for the Rio.
2023-12-13 15:20:24 -08:00
Tyler Veness
192a28af47
Fix JDK 21 warnings ( #6028 )
2023-12-09 21:45:02 -08:00
Thad House
54a55b8b53
[wpiutil,hal] Update image; init Rio Now() HMB with a FPGA session ( #6016 )
2023-12-08 23:22:59 -08:00
Tyler Veness
a71adef316
[wpiutil] Clean up circular_buffer iterator syntax ( #6020 )
2023-12-08 13:38:56 -08:00
Joseph Eng
14c3ade155
[wpimath] Struct cleanup ( #6011 )
2023-12-04 22:40:18 -08:00
Tyler Veness
90757b9e90
[wpilib] Make Color::HexString() constexpr ( #5985 )
...
Related improvements to wpi::ct_string:
* Implicitly convert to std::string
* Add operator== for std::string, std::string_view, and const Char*
2023-12-04 21:20:49 -08:00
Tyler Veness
2bb1409b82
Clean up Java style ( #5990 )
...
Also make equivalent changes in C++ where applicable.
Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com >
2023-12-03 16:21:32 -08:00
Peter Johnson
a583ca01e1
[wpiutil] Change Struct to allow non-constexpr implementation ( #5992 )
...
This required changing the constant values (e.g. kSize) into functions
(e.g. GetSize()).
Fixed implementations of ForEachNested to be inline (as these are actually
templates).
Also added a ntcore Struct test.
2023-12-02 23:36:44 -08:00
Peter Johnson
76ae090570
[wpiutil] type_traits: Add is_constexpr() ( #5997 )
2023-12-02 20:54:22 -08:00
Ryan Blue
1144115da0
[commands] Add GetName to Subsystem, use in Scheduler tracer epochs ( #5836 )
2023-11-30 23:10:53 -08:00
Tyler Veness
0f9ebe92d9
[wpimath] Add generic circular buffer class to Java ( #5969 )
...
The original is now called DoubleCircularBuffer.
2023-11-30 21:12:23 -08:00
Peter Johnson
b0719942f0
[wpiutil] Timestamp: Report errors on Rio HMB init failure ( #5974 )
2023-11-29 10:10:07 -08:00
Thad House
9280054eab
Revert "[build] Export wpimath protobuf symbols ( #5952 )"
...
This reverts commit c80b2d2017 .
2023-11-23 22:40:47 -08:00
Peter Johnson
c80b2d2017
[build] Export wpimath protobuf symbols ( #5952 )
2023-11-23 11:27:54 -08:00
Drew Williams
ca81ced409
[wpiutil] Move RawFrame to wpiutil; add generation of RawFrame for AprilTags ( #5923 )
2023-11-23 10:55:10 -08:00
Peter Johnson
bdc8620d55
[upstream_utils] Fix fmt compilation errors on Windows ( #5948 )
...
Using `this->` in decltype doesn't work in the latest MSVC.
2023-11-21 08:16:30 -08:00
Peter Johnson
cfbff32185
[wpiutil] timestamp: Fix startup race on Rio ( #5930 )
...
Note this doesn't use a full mutex, so there is still a shutdown race.
2023-11-15 21:58:51 -08:00
Tyler Veness
7d90d0bcc3
[wpimath] Clean up StateSpaceUtil ( #5891 )
2023-11-15 21:13:12 -08:00
Peter Johnson
d105f9e3e9
[wpiutil] ProtobufBuffer: Fix buffer reallocation ( #5924 )
2023-11-13 15:49:41 -08:00
Tyler Veness
fa6b171e1c
[wpiutil] Suppress protobuf warning false positives on GCC 13 ( #5907 )
2023-11-10 15:12:18 -08:00
Tyler Veness
3a1194be40
Replace static_cast<void>() with [[maybe_unused]] attribute ( #5892 )
...
This clarifies intent. Not done for thirdparty libraries or
structured binding variables.
2023-11-08 12:47:23 -08:00
Peter Johnson
14dcd0d26f
Use char instead of uint8_t for json::parse ( #5877 )
...
The uint8_t usage causes warnings on newer clang versions.
Add GetCharBuffer() to MemoryBuffer classes to make this easy.
2023-11-04 22:18:42 -07:00
Peter Johnson
63dbf5c614
[wpiutil] MemoryBuffer: Fix normal read and file type check ( #5875 )
2023-11-04 18:41:39 -07:00
Peter Johnson
f1a82828fe
[wpiutil] Add DataLog and DataLogManager Stop() ( #5860 )
...
Restarting a stopped log results in creating a new log file with fresh copies of the same start records and schema data records.
Also check to see if the file has been deleted or if the log file exceeds 1.8 GB, and start a new one.
2023-11-03 20:34:43 -07:00
Peter Johnson
07e13d60a2
[ntcore] Fix write_impl ( #5847 )
...
The previous fix didn't handle all cases correctly. Instead, add a new
function to raw_ostream (SetNumBytesInBuffer) to allow always using the
full buffer size, and revamp write_impl to more cleanly handle all
cases.
2023-10-30 08:23:33 -07:00
Peter Johnson
1713386869
[wpiutil] ProtobufMessageDatabase: Fix out-of-order Add() rebuild ( #5845 )
2023-10-29 16:50:01 -07:00
Peter Johnson
b91317fd36
[wpiutil] DataLog.addSchema(): Don't add into a set view ( #5829 )
2023-10-26 19:17:47 -07:00
Peter Johnson
2ab4fcbc24
[wpiutil] ProtobufMessageDatabase: Clear messages first ( #5827 )
...
The message destructor appears to call something on the descriptor.
2023-10-26 19:17:29 -07:00
Peter Johnson
23ea188e60
[glass] Add protobuf decode error log message ( #5812 )
2023-10-23 23:36:23 -07:00
Benjamin Hall
63ef585d4b
[wpiutil] Fix compilation of MathExtras.h on Windows with /sdl ( #5809 )
...
Fix copied from the LLVM main branch.
2023-10-23 21:35:13 -07:00
Jonah
3d618bdbfd
[wpiutil] Fix Java struct array unpacking ( #5801 )
2023-10-21 20:13:50 -07:00
Peter Johnson
cf54d9ccb7
[wpiutil, ntcore] Add structured data support ( #5391 )
...
This adds support for two serialization formats for complex data types:
- Protobuf for complex objects with variable length internals that need forward and backward wire compatibility (lower speed, more flexible)
- Raw struct (ByteBuffer-style) for fixed-length objects (higher speed, less flexible)
Deserialization can be done either by creating a new object (for immutable objects) or overwriting the contents of an existing object (for mutable objects).
Implementing classes should provide inner classes that implement the Protobuf or Struct interface (in Java) or specialize the wpi::Protobuf or wpi::Struct struct (in C++). It is possible for classes to implement both. If the class itself does not implement serialization, it's possible for third parties/users to provide an implementation instead.
Uses the Google protobuf implementation for C++ and the QuickBuffers alternative protobuf implementation for Java.
2023-10-19 21:41:47 -07:00
Peter Johnson
b3eb64b0f7
[wpiutil] ct_string: Use inline namespace for literals ( #5767 )
...
This avoids a conflict with json.
2023-10-15 07:53:08 -07:00
Peter Johnson
638f04f626
[wpiutil] Add protobuf to thirdparty sources ( #5746 )
2023-10-14 21:54:17 -07:00
PJ Reiniger
210255bfff
[wpiutil] Update json to 3.11.2 ( #5680 )
2023-10-14 21:53:56 -07:00
Dustin Spicuzza
1d19e09ca9
[wpiutil] Set WPI_{UN}IGNORE_DEPRECATED to empty when all else fails ( #5728 )
2023-10-04 21:49:07 -07:00
Peter Johnson
cb1bd0a3be
[wpiutil] Get more precise system time on Windows ( #5722 )
...
Windows 8 added GetSystemTimePreciseAsFileTime().
2023-10-03 20:38:48 -07:00
Starlight220
3eb372c25a
[wpiutil] SendableBuilder: Add PublishConst methods ( #5158 )
2023-10-02 08:23:11 -07:00
Peter Johnson
8d2cbfce16
[wpiutil] DataLog: Stop logging if insufficient free space ( #5699 )
...
The threshold is set to 5 MB.
2023-10-01 14:01:49 -07:00
Peter Johnson
5e295dfbda
[wpiutil] DataLog: Limit total buffer allocation ( #5700 )
...
Pause logging if more than 1 MB of outgoing buffers are allocated.
Limit free buffer list to 256 KB.
2023-09-30 20:19:28 -07:00