Commit Graph

120 Commits

Author SHA1 Message Date
sciencewhiz
32fcf5bc27 [build] Add datalog project to docs build (#8511) 2025-12-31 09:11:56 -08:00
sciencewhiz
f668e10197 [docs] Update Doxygen Awesome to 2.4.1 (#8494)
Supports Doxygen 1.14, and should be better with Doxygen 1.15 that we
use, compared to the current version.
Improves, but does not fix #8486. The sidebar now covers the search
results, rather then both bleeding through

<img width="1206" height="1969" alt="image"
src="https://github.com/user-attachments/assets/e8c0cefd-a72a-4c41-a5bf-c191752250f4"
/>
2025-12-16 22:19:47 -08:00
Peter Johnson
dacded37e5 [hal, wpilib] Add OpMode support (#7744)
User code:
- OpModeRobot used as the robot base class
- LinearOpMode and PeriodicOpMode are provided opmode base classes
- In Java, annotations can be used to automatically register opmode classes

Additional user code functionality:
- OpMode (string) is available in addition to the overall
auto/teleop/test robot mode
- OpMode does not indicate enable (enable/disable is still separate)
- The HAL API uses integer UIDs; these are exposed at the user API level
as well for faster checks
- User code creates opmodes on startup (these have name, category,
description, etc).

DS:
- DS will present opmode selection lists for auto and teleop for
match/practice. During a match, the DS will automatically activate the
selected opmode in the corresponding match period.
- For testing, an overall mode is selected (e.g. teleop/auto/test) and a
single opmode is selected

Future work:
- Command framework support/integration
- Python annotation support
- Unit tests (needs race-free DS sim updates)
- Porting of examples

Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
2025-12-12 20:25:57 -08:00
Tyler Veness
08784dc2d1 [upstream_utils] Upgrade to Sleipnir 0.3.2 (#8323)
Also includes a C++ benchmark, which has a Java counterpart in #8236.
2025-12-01 13:51:28 -07:00
Tyler Veness
7a04d6a6a2 Merge wpiformat configs (#8365)
After replacing the remaining include guards with `#pragma once`, I was
able to merge all the wpiformat configs into one file in the repo root.
This should make the config easier to reason about and maintain in the
future.
2025-11-11 22:00:42 -08:00
Tyler Veness
37d81d490b [build] Sort Doxygen suppressions (#8353) 2025-11-10 10:11:17 -07:00
Peter Johnson
161f8d107b Merge branch 'main' into 2027 2025-11-08 00:03:50 -08:00
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
PJ Reiniger
6b69aab44e HAND FIX - Fixup bazel files 2025-11-07 23:09:21 -08:00
PJ Reiniger
10b4a0c971 SCRIPT fixup project rename 2025-11-07 23:09:21 -08:00
Tyler Veness
3bdaeac3e1 [build] Upgrade to Doxygen 1.15.0 (#8328) 2025-11-02 05:18:58 -08:00
Tyler Veness
f4db88da9a [build] Document how to mirror new Doxygen versions (#8327) 2025-11-01 14:45:53 -07:00
Peter Johnson
cc043df07f Merge branch 'main' into 2027 2025-11-01 09:39:08 -07:00
Tyler Veness
b7fe5ef833 [build] Fix up grammar in docs/build.gradle (#8317) 2025-11-01 09:18:50 -07:00
Peter Johnson
7a2a982e66 Merge branch 'main' into 2027 2025-10-11 23:54:41 -07:00
Sam Carlberg
b37e2d9343 [commands] Add Commands v3 framework (#6518)
The framework fundamentally relies on the continuation API added in Java 21 (which is currently internal to the JDK). Continuations allow for call stacks to be saved to the heap and resumed later.

The async framework allows command bodies to be written in an imperative style. However, an async command will need to be actively cooperative and periodically call coroutine.yield() in loops to yield control back to the command scheduler to let it process other commands.

There are also some other additions like priority levels (as opposed to a blanket yes/no for ignoring incoming commands), factories requiring names be provided for commands, and the scheduler tracking all running commands and not just the highest-level groups. However, those changes aren't unique to an async framework, and could just as easily be used in a traditional command framework.
2025-10-10 13:47:22 -07:00
Sam Carlberg
cfbd7a5af2 [build] Fix doxygen builds on apple CPUs (#8282)
Caused by the doxygen gradle plugin attempting to download 1.10.0 (presumably its default version) from artifactory because the 1.12.0 config is only applied on x86_64 platforms. Just fixing that isn't enough, however; on mac, the plugin would fail to extract the dmg. We need to fall back to a global installation on the PATH for the plugin to find, preferentially using that instead of a failed attempt to download and extract the dmg.
2025-10-10 12:42:02 -07:00
Peter Johnson
7ff312bb69 Merge branch 'main' into 2027 2025-10-06 19:43:02 -07:00
Sam Carlberg
3972b01c51 Add javac plugin for detecting common error cases at compile time (#8196)
Adds a `@NoDiscard` annotation that can be placed on methods to guarantee their return values are used and on types to guarantee that any method returning that type uses the return value.

Methods that call `@NoDiscard`-annotated functions can add a `@SuppressWarnings("NoDiscard")` or `@SuppressWarnings("all")` annotation (or annotation on the class declaring that method) to silence the compiler error warnings.
2025-10-03 17:42:47 -07:00
Gold856
6447011bc3 [ci] Consolidate docs jobs (#7910)
We build docs in three different places, which is annoying to deal with, and it means we build docs two more times than necessary. Now, docs are built just once in the main Gradle workflow, with warnings promoted to errors, eliminating the need for the separate job in lint-format.yml. The uploaded docs artifact is then unpacked and commited to the GitHub Pages repo like normal.
2025-09-29 18:02:42 -07:00
Peter Johnson
1ce2854a1e Merge branch 'main' into 2027 2025-09-20 11:19:40 -07:00
sciencewhiz
4e6b9706ff [build] Explicitly set Documentation archiveVersion (#8192)
In the recent gradle or gradle dependencies update, the documentation
zips were being published as documentation-version-unspecified, where
the unspecified was coming from archiveVersion. It looks like we use a
different method of setting the version, so make sure that
archiveVersion is empty
2025-08-26 08:09:18 -06: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
Daniel Chen
f209ecb0cb [wpimath] Add structs for TrapezoidProfile.State and ExponentialProfile.State (#8163) 2025-08-10 11:45:36 -07:00
Peter Johnson
3e4e9c9b01 Merge branch 'main' into 2027 2025-08-09 00:55:26 -07:00
Tyler Veness
9ac7e286f5 [build] Upgrade Gradle plugins (#8166)
I upgraded all plugins I could see except org.ysb33r.doxygen. 2.0 made
breaking changes, and I couldn't figure out how to migrate.

Most of the changes are for suppressing new linter purification rites.
2025-08-08 23:04:02 -07:00
Tyler Veness
0a0adebd89 [build] Upgrade to Gradle 8.14.3 (#8164)
This fixes local builds with JDK 24.

I fixed deprecation warnings from `./gradlew wrapper --warning-mode all`
as well.
2025-08-08 09:08:34 -06:00
Austin Schuh
d203541b7b [bazel] Build wpilibj docs too (#8159)
We've got javadocs for each module, but wpilib has 1 for everything.
Build that too using rules_jvm_external.

Signed-off-by: Austin Schuh <austin.linux@gmail.com>
2025-08-05 20:54:59 -06:00
Austin Schuh
13852760f6 [bazel] Build wpilibc docs with doxygen (#8157)
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
2025-08-04 23:49:47 -06:00
Jade
e93c8cdb29 [build] Upgrade to Java 21 (#7547)
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
2025-07-25 15:45:40 -07:00
Peter Johnson
82ce317083 Merge branch 'main' into 2027 2025-06-30 20:21:11 -07:00
Gold856
22b58c1853 [upstream_utils] Upgrade to LLVM 20.1.7 (#8033)
Also removes xxhash, Hashing, and MapVector to reduce the size of the patches and to speed up compile times by a smidge.
2025-06-24 22:36:22 -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
Jade
85ffb7814b [build] Update Gradle to 8.10.2 (#7164) 2024-10-28 00:44:30 -07:00
Ryan Blue
161dfefb4d [docs] Add romi and xrp to docs build (#7045) 2024-09-07 22:21:16 -07:00
Ryan Blue
dc68576834 [docs] Exclude eigen/unsupported from docs build (#7046) 2024-09-07 20:42:41 -07:00
Sam Carlberg
a9b885070e [wpiunits] Java units API rewrite (#6958)
Java generics are too limited to do what we need. This refactors generic code previously in Unit and Measure into unit-specific classes that can have unit-safe math operations (notably, times and divide) that can return values in known units instead of a wildcarded Measure<?>.

Unit-specific measure implementations are automatically generated by ./wpiunits/generate_units.py, which generates generic interfaces and mutable and immutable implementations of those interfaces. These make up the bulk of the diff of this PR (approximately 9300 LOC).

This also adds units for angular and linear velocities, accelerations, and momenta; moment of inertia; and torque.
2024-09-07 10:59:29 -07:00
Ryan Blue
1fd1dc31b7 [upstream_utils] Clean up and enable foonathan memory docs (#6990)
Group memory doxygen into one module.

Remove concept alias and add doxygen definitions for foonathan memory.

\concept was added as a doxygen command in 1.9.2 and is meant to be applied to concepts. Inserting them into standard comment paragraphs causes doxygen to interpret the following text as a concept name and add it to the documentation, as well as remove the text from the paragraph.
In the upstream repo, this alias links to markdown documentation, so it's not usable for us anyways.

That, plus adding the doxygen definitions/aliases from upstream cleans up most of the errors/weird output from doxygen for foonathan memory.
2024-08-24 06:54:32 -07:00
Ryan Blue
c640fdc9a4 [docs] Update doxygen and add back sidebar-only theme (#6986)
Update doxygen gradle plugin, use template Doxyfile.
2024-08-22 08:43:10 -07:00
Jade
a9ce3290b5 Fix Doxygen warnings for C++ code (#6608) 2024-08-21 07:55:03 -07:00
sciencewhiz
32c4e56897 [docs] Downgrade Doxygen to 1.10.0 and update theme (#6978)
Fixes mobile
Requires re-excluding memory for search
Set new doxygen options required by doxygen-awesome theme
2024-08-19 08:14:04 -07:00
sciencewhiz
477907e4cc [docs] Update to Doxygen 1.12.0 (#6970)
Fixes search when building with foonathan/memory
2024-08-15 14:58:53 -07:00
sciencewhiz
d3421a7c89 [build] Publish source and headers of all generated files (#6963)
Fixes #6962
Don't specially include ntcore generated files from build directory in doxygen, as they are now pregenerated in source
2024-08-14 14:26:38 -07:00
Ryan Blue
008ebbfb77 [docs] Exclude clang-format and clang-tidy from doxygen (#6932) 2024-08-10 23:32:39 -07:00
Joseph Eng
073192d513 [wpimath] Add remaining struct and protobuf implementations (#5953) 2024-07-29 07:55:44 -07:00
Ryan Blue
143876dfa3 [hal] Add missing HAL CAN javadocs (NFC) (#6882) 2024-07-28 14:27:55 -07:00
Jade
eda63dc162 [upstream_utils] Add AprilTag library (#6816)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2024-07-20 22:12:49 -07:00
Sam Carlberg
59256f0e00 [epilogue] Add an annotation-based logging framework for Java programs (#6584) 2024-07-16 17:25:43 -07:00
sciencewhiz
f77d01c085 [docs] Build javadocs with JDK 17 (#6588)
Remove JDK 11 javadocs workarounds.
Also update readme to say to install JDK 17.
2024-05-06 21:52:22 -07:00