Thad House
ba15844c28
[hal,wpiutil] Error out of HAL_Initialize if SetupRioNow fails ( #6374 )
2024-02-15 22:57:06 -08:00
Tyler Veness
d895a0c09f
[wpiutil] Add std::expected shim ( #6310 )
...
Its tests use Catch2 instead of GoogleTest, so we can't import them.
2024-01-25 22:21:37 -08:00
Thad House
0e5eb3f35c
[wpiutil] Fix DynamicStruct string handling ( #6253 )
...
Dynamic structs had a few major issues.
In C++, if the string was the last definition in the schema, attempting to set a string would trigger an assertion. This has been fixed
Setting a string value could truncate the string actually stored in the struct, if the definition was shorter than the string to set.
There was no way to detect if this case occurred. The set string function now returns a bool if the string was fully written or not.
Reading a string that had a value shorter than the schema definition would result in embedded trailing nulls in the string. This would make comparing string equality basically impossible, as those embedded nulls count for the length of the string.
The above truncating didn't take into account UTF8 code points. This means a truncation could happen in the middle of a unicode character. Depending on the language this had different behavior, but unpaired code points are problematic to detect in any case. On the decoding side, detect if a split UTF8 code point has occurred by the writer, and if so just ignore it and treat it as not part of the string. Doing this on the receive side means a newer receive side is all that is needed to fix this, which is generally a better option then requiring all senders to update.
Actual DynamicStruct instances have 0 units tests for them. Added a bunch of unit tests around strings to ensure things work properly.
2024-01-19 22:24:54 -08:00
David Vo
a274e297cd
Fix trivial errorprone warnings (NFC) ( #6135 )
2024-01-19 20:46:38 -08:00
Thad House
7f9389f101
[wpiutil] DataLog: Remove extra entry parameter from C AddSchema functions ( #6246 )
2024-01-19 20:35:44 -08:00
Thad House
a2d45dbca4
[wpiutil] DataLog: Add AddSchema functions to C API ( #6232 )
2024-01-15 23:34:18 -08:00
Thad House
5bc942f532
[wpiutil] StructArrayLogEntry: Use the same lock everywhere ( #6231 )
2024-01-15 22:41:31 -08:00
Thad House
1981b8debd
Fix multiple Java warnings ( #6201 )
2024-01-12 08:46:21 -08:00
Peter Johnson
dd90965362
[wpiutil] Fix RawFrame.setInfo() NPE ( #6167 )
2024-01-06 12:50:11 -08:00
Peter Johnson
7c26bc70ab
[sysid] Load DataLog files directly for analysis ( #6103 )
...
Co-authored-by: Oblarg <emichaelbrnett@gmail.com >
2024-01-05 16:24:31 -08:00
Tyler Veness
f29a7d2e50
[docs] Add missing JavaDocs ( #6146 )
2024-01-04 08:38:06 -08:00
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
Isaac Turner
35a1c52788
[build] Upgrade quickbuf to 1.3.3 ( #6072 )
2023-12-20 22:30:45 -06: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
Gold856
f5fc101fda
[build] cmake: Export jars and clean up jar installs ( #6014 )
2023-12-06 18:28:38 -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
Gold856
4fcf0b25a1
[build] Apply a formatter for CMake files ( #5973 )
2023-11-30 16:52:21 -08:00
swirl
e00a0e84c1
[build] cmake: fix protobuf dependency finding for certain distributions ( #5981 )
2023-11-30 13:36:41 -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
Gold856
25b7dca46b
[build] Remove CMake flat install option ( #5944 )
2023-11-21 11:48:32 -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
swirl
70392cbbcb
[build] cmake: Add protobuf dependency to wpiutil-config ( #5886 )
...
Signed-off-by: swirl <swurl@swurl.xyz >
2023-11-06 12:47:35 -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