Commit Graph

68 Commits

Author SHA1 Message Date
PJ Reiniger
013a238994 HAND FIXES: Update maven info 2025-11-07 23:09:21 -08:00
PJ Reiniger
c89910b7c6 HAND FIXES: Fixup gradle / cmake / styleguide 2025-11-07 23:09:21 -08:00
Peter Johnson
1ce2854a1e Merge branch 'main' into 2027 2025-09-20 11:19:40 -07:00
Gold856
5cd97c6353 [upstream_utils] Add Catch2 (#8203) 2025-09-08 15:14:23 -06:00
Tyler Veness
632749e6f3 [build] Upgrade Maven dependencies (#8173) 2025-09-01 08:13:46 -07:00
Gold856
d4311d5a29 [wpiutil,glass,dlt] Replace libprotobuf with upb for dynamic decode (#7988)
libprotobuf is a very annoying dependency to deal with, and with the switch to nanopb for generated C++ code, libprotobuf is only used for dynamic decode in the GUI apps. libprotobuf has been swapped out with upb, a much smaller C-based library that supports reflection and can therefore do dynamic decode. This means we can remove the libprotobuf dependency and stop dealing with build issues because of it.
2025-08-16 22:56:32 -07:00
PJ Reiniger
b85a0d5cf3 [build] Add missing sources to published zip files (#8055)
Gradle publishing does not capture all of the source files that are used during a build. This should get most of them, and get it equivalent to what bazel pushes out.
2025-07-15 21:20:28 -07:00
Peter Johnson
82ce317083 Merge branch 'main' into 2027 2025-06-30 20:21:11 -07:00
Tyler Veness
ddc5220ed4 [upstream_utils] Remove memory library (#8035)
We added this in 2022. If we haven't used it by now, we probably never
will and it's just wasting space.
2025-06-24 22:35:30 -07:00
Peter Johnson
0a38400734 [datalog] Finish up a few missed moves from wpiutil split (#7956) 2025-05-04 11:21:29 -07:00
Thad House
09a6bc9a25 [build] Remove RoboRIO specializations from build system (#7670) 2025-01-13 12:23:54 -07:00
Thad House
9a1b4245fa [build] Restore Windows constexpr mutex define on wpiutil (#7515) 2024-12-07 18:55:06 -08:00
Tyler Veness
b7eb9fb8f9 [upstream_utils] Add std::is_debugger_present() shim (#7423) 2024-11-22 09:17:23 -08:00
Thad House
3cc541f261 Remove generated google protobuf support (#7371)
It's not used anymore, and cleans up the build.
2024-11-08 18:29:30 -08:00
Thad House
8b8b634f65 [wpiutil] Change C++ protobuf to nanopb (#7309)
The Google C++ protobuf implementation has issues with dynamic linkage across DLL boundaries because it uses global variables.  It also has a compile-time dependency because the protoc version must exactly match the libprotobuf version.  Using nanopb with a customized generator fixes both of these issues.

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
2024-11-07 22:42:50 -08:00
Thad House
f2d2500d1d [wpiutil] Check MSVC Runtime (#7301) 2024-11-05 09:51:48 -07:00
Ryan Blue
46b5631ba7 [docs] Fix wpiutil thirdparty include roots in docs (#7288) 2024-10-25 06:52:14 -07:00
Gold856
0424e5ba36 [build] Remove unnecessary symbol exclusions (#7221)
The symbol exporter in native-utils was updated and stopped exporting the excluded symbols.
2024-10-17 16:19:19 -07:00
Peter Johnson
dcf5f55a30 [upstream_utils] Remove ConcurrentQueue (#7183)
It appears to be broken under stress testing (dropped/duplicate values).

This reverts commit 97c6c86f3b (#7066).
2024-10-10 23:41:41 -07:00
Joseph Eng
1f3ef019ce [wpiutil] Return wpi::expected from MemoryBuffer::GetFile (#7069) 2024-09-12 23:45:35 -07:00
Ryan Blue
32252f7d6a [upstream_utils] Import argparse to wpiutil (#7071) 2024-09-12 20:10:43 -07:00
Ryan Blue
97c6c86f3b [upstream_utils] Import ConcurrentQueue to wpiutil (#7066) 2024-09-10 23:12:22 -07: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
Isaac Turner
35a1c52788 [build] Upgrade quickbuf to 1.3.3 (#6072) 2023-12-20 22:30:45 -06: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
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
638f04f626 [wpiutil] Add protobuf to thirdparty sources (#5746) 2023-10-14 21:54:17 -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
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
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
Ryan Blue
1fca519fb4 [wpiutil] Remove remnants of ghc fs and tcb_span libraries (#5411) 2023-06-22 19:42:44 -07:00
Thad House
85f1bb8f2b [wpiutil] Reenable jni check task (#4606)
New option was added to JNI plugin to allow skipping specific symbols. This let us generally reenable the check task in wpiutil.
2022-11-10 09:33:26 -08:00
Peter Johnson
c7b7624c1c [wpiutil] Add MessagePack utility functions (#4448)
Also add mpack to srcDirs.
2022-10-02 08:11:42 -05:00
Peter Johnson
f18dd1905d [build] Include all thirdparty sources in distribution (#4397)
Was missing several.
2022-09-03 09:23:51 -07:00
Peter Johnson
aa9d7f1cdc [wpiutil] Import foonathan memory (#4306) 2022-09-02 20:32:21 -07:00
PJ Reiniger
787fe6e7a5 [wpiutil] Separate third party libraries (#4190) 2022-06-18 08:08:31 -07:00
Peter Johnson
7ad2be172e [build] Update native-utils to 2023.0.1 (#4272)
Also remove x86 build bits.
2022-05-28 11:12:59 -07:00
Peter Johnson
d673ead481 [wpinet] Move network portions of wpiutil into new wpinet library (#4077) 2022-05-07 10:54:14 -07:00
Peter Johnson
9b500df0d9 [wpiutil] Add high speed data logging 2022-02-26 09:49:34 -08:00
Tyler Veness
7269a170fb Upgrade maven deps to latest versions and fix new linter errors (#3772)
This also makes the Gradle build work with JDK 17.

The extra JVM args in gradle.properties works around a bug with spotless
and JDK 17: https://github.com/diffplug/spotless/issues/834

PMD.CloseResource was ignored because it's almost always a false
positive, and there are many of them.
2021-12-09 12:20:08 -08:00
Thad House
82066946e5 [wpiutil] Add mDNS resolver and announcer (#3733) 2021-11-25 22:08:26 -08:00
Peter Johnson
87603e400d [wpiutil] Import fmtlib (#3375)
HEAD as of 5/23/2021 (dd8f38fcbbb6eedecd4d451b03ca7d817e8ae67d).
2021-05-24 23:59:35 -07:00
Austin Shalit
65b2359b27 [build] Add spotless for other files (#3007)
Adds spotless formatting for Gradle, xml, md, and gitignore files.

yml linting is not performed as it requires a dependency on npm.
2020-12-30 16:17:20 -08:00
Peter Johnson
42993b15c6 [wpimath] Move math functionality into new wpimath library (#2629)
The wpimath library is a new library designed to separate the reusable math functionality
from the common utility library (wpiutil) and the hardware-dependent library (wpilibc/j).

Package names / include file names were NOT changed to minimize breakage.  In a future year
it would be good to revamp these for a more uniform user experience and to reduce the risk
of accidental naming conflicts.

While theoretically all of this functionality could be placed into wpiutil, several pieces
of this library (e.g. DARE) are very time-consuming to compile, so it's nice to avoid this
expense for users who only want cscore or ntcore.  It also allows for easy future separation
of build tasks vs number of workers on memory-constrained machines.

This moves the following functionality from wpiutil into wpimath:
- Eigen
- ejml
- Drake
- DARE
- wpiutil.math package (Matrix etc)
- units

And the following functionality from wpilibc/j into wpimath:
- Geometry
- Kinematics
- Spline
- Trajectory
- LinearFilter
- MedianFilter
- Feed-forward controllers
2020-08-06 23:57:39 -07:00
Thad House
9796987d59 [wpiutil] Add new combined native class loader (#2554)
* Add new combined native class loader

Allows us to extract a list of binaries that depend on each other, and load them successfully

It is correct that there is no implementation in wpiutil for the new native method. That is a requirement, because its needed to load the libraries, and we cant load the wpiutiljni native library since it depends on wpiutil. Instead we have a separate library built with the tools plugin that handles everything
2020-06-27 18:05:14 -07:00
Thad House
708009cd20 Update to gradle 6.0 (#2074) 2019-11-12 17:14:04 -08:00
carbotaniuman
ed30d5d40e Add JSON support for Trajectories (#2025) 2019-11-02 11:35:03 -07:00
Peter Johnson
971303da8c Add PortForwarder class (#1890)
This class provides an easy way to forward local ports to another host/port.
This is primarily useful to provide a way to access Ethernet-connected devices
from a computer tethered to the RoboRIO USB port.

The most natural spot to put the shared implementation of this class was into
wpiutil, so a wpiutilJNI library has been added.
2019-09-26 22:53:21 -07:00
Thad House
8993ce5bf1 Move Eigen headers out of main include folder (#1854)
This allows using Eigen as a separate cmake package, e.g. for vcpkg.
2019-08-26 21:22:41 -07:00
Thad House
e716c36b89 Fix Nat.java generation to be incremental (#1831)
Also generate the imports.
2019-08-20 21:03:44 -07:00