Commit Graph

6946 Commits

Author SHA1 Message Date
Ryan Blue
b38e06c7cb [upstream_utils] Upgrade apriltag to latest master (take 2) (#7018) 2024-09-04 09:12:51 -05:00
Ryan Blue
86f1bfd710 [wpilibc] Make SPI methods non-virtual (#7019) 2024-09-04 09:12:06 -05:00
Thad House
0b0c7c88ee [build] cmake: Add 4324 to ignored MSVC warnings (#7028)
4324 is issued at /W4 if alignas forces padding. Makes it impossible to use SmallVector from something compiled in /W4. Add it to the warning exclusion list.
2024-09-03 14:31:38 -05:00
Jade
495c371ce7 [glass] NetworkTables provider: Add immediate flag to listener (#7013) 2024-08-31 09:44:52 -07:00
Ryan Blue
9d6bee1d1e [build] cmake: Add meta target for examples and example tests (#7015)
Also prefix example test targets with Example_ to make running tests easier
2024-08-29 14:03:41 -07:00
Ryan Blue
5f7b2aefb1 [ci] Check and free disk space on macos (#7014) 2024-08-29 06:30:17 -07:00
Ryan Blue
dc18f71004 [wpilibc] Refactor AnalogTrigger to use shared_ptr (#7010) 2024-08-28 21:34:28 -07:00
Ryan Blue
c9ad26b723 [hal] Remove incorrect parameter directions on a few functions (NFC) (#7011) 2024-08-28 06:30:39 -07:00
Ryan Blue
9f3da8de1b [hal] Correct warning suppression and note in SimDataValue.h (#7009) 2024-08-27 17:07:46 -07:00
Ryan Blue
9aef00340a [build] cmake: Put protobuf symbol export files in per-config directories (#6997) 2024-08-27 17:06:16 -07:00
Gold856
9c35aa6bbf [build] Remove redundant _M_ prefix from artifact file name (#6983) 2024-08-27 17:05:29 -07:00
David Vo
0352a60f38 Override getMessage in Exceptions instead of toString (#7002)
Fixes https://errorprone.info/bugpattern/OverrideThrowableToString
2024-08-26 17:32:32 -07:00
Gold856
1daff9193c [wpilibc] Add missing deprecated HID sim methods (#7005) 2024-08-26 17:32:09 -07:00
David Vo
dbeab8bdd7 Read text input streams as UTF-8 in Java (#6999)
Fixes https://errorprone.info/bugpattern/DefaultCharset for InputStreamReader instances.
2024-08-24 09:05:00 -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
370e63ede6 [upstream_utils] Use os path separator when matching path (#6993) 2024-08-24 06:52:52 -07:00
Tyler Veness
96bd1e489f [wpilibj] Suppress JDK 21 this-escape warning (#6996) 2024-08-24 06:52:04 -07:00
Ryan Blue
ed86f0b6fe [build] Set CMAKE_BUILD_TYPE correctly (#6998)
It has to be set before project otherwise cmake defines it for you.
2024-08-24 06:51:22 -07:00
Ryan Blue
9eb8400f6c [upstream_utils] Revert “Upgrade apriltag to latest master (#6995)" (#7000)
This reverts commit ba200df8be.
2024-08-24 06:50:32 -07:00
David Vo
88fc46da22 Call reachabilityFence inside finally blocks (#7001) 2024-08-24 06:49:46 -07:00
David Vo
36ff22a439 [cscore, wpilibj] Use pattern matching in equals overrides (#7003)
Fixes https://errorprone.info/bugpattern/EqualsGetClass
2024-08-24 06:48:20 -07:00
Jonah
173ffca14a [wpilib] Add persistent alerts API (#6735) 2024-08-23 07:05:53 -07:00
Ryan Blue
ba200df8be [upstream_utils] Upgrade apriltag to latest master (#6995) 2024-08-23 07:04:29 -07:00
Ryan Blue
cf691f744f [glass] Use type string constant in NTStringChooser (#6992) 2024-08-22 23:36:07 -07:00
sciencewhiz
7a2604b299 [wpiutil] Update WPILib Logo (#6987) 2024-08-22 08:51:06 -07:00
Thad House
b76ccc3ab5 [build] cmake: Include our own copy of protobuf_generate to use with plugin (#6989)
The hacks we needed to do to get the existing commands required cmake 3.28. We didn't want that, so just make a local slimmed down copy of the function just for our use. Even better, its much simpler in what it does, no weird hacks.
2024-08-22 08:50:29 -07:00
Ryan Blue
88ea473c94 [wpilibc] AddressableLED: add move constructor/assignment operator (#6985) 2024-08-22 08:48:19 -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
147e03ddd8 [build] CMake: Add CMakePresets.json for some common WPILib build settings (#6974) 2024-08-21 07:56:28 -07:00
Jade
a9ce3290b5 Fix Doxygen warnings for C++ code (#6608) 2024-08-21 07:55:03 -07:00
Thad House
a9ac5b8e24 Don't read protobuf static data across shared library lines directly (#6979)
Reading exported data from shared objects on windows is broken. It requires __declspec(dllimport). However, this is problematic, as we use the same static libraries both from a shared and static context. So we can't just blindly apply dllimport.

The linker should have caught this, as data members are exported in a different way. However, due to a bug in native-utils, data member symbols were exposed directly. However, interacting with those data member was completely broken.

The only way we can really solve this is to just not use static data members. We're pretty good about this in WPILib itself. However, protobuf is absolutely terrible at this. There are a ton of inline functions that access global data. For the protobuf library itself, we can solve this easily enough.

However, for the generated protobuf code, this is much more problematic. The member needed to bypass the global data is private. This means using just the stock protobuf code, this problem is not solvable. But, protobuf generated code has insertion points. Those insertion points let us add our own code into the generated code via a protoc plugin. And it just so happens that an insertion point exists to add extra public methodsto the generated protobuf header. There is also an insertion point to let us add to the cpp file.

The methods we need are the getters, for unpacking protobufs. For any protobuf that has a message as a member, we generate a new wpi_x() getter (the existing one is just x(), where x is the field name). We then implement this in the cpp file. A trick we can use is in the cpp file, we can safely call the x() function, as the cpp file is in the same library as the global. Thus we can call that inline method, and not actually need to directly access any internal private state of the protobuf object.

TL;DR, all protobuf classes that have messages as fields now have a wpi_x() accessor that must be used instead of x() if you want the code to work on windows. After wpilibsuite/native-utils#212, the bad code will fail to link, rather then just fail at runtime.
2024-08-21 07:53:20 -07:00
Jade
eef516fcc9 [wpimath] Fix pose estimator ResetRotation() in C++ (#6984) 2024-08-21 07:51:21 -07:00
sciencewhiz
f0c3610465 Fix various typos (#6980)
Found with misspell
2024-08-19 16:26:36 -07:00
sciencewhiz
8e52da330e [dlt] Update DataLogTool doc link (#6981) 2024-08-19 09:24:00 -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
Jade
a325898311 [build] CMake: set CMAKE_EXPORT_COMPILE_COMMANDS to ON (#6973) 2024-08-17 20:58:14 -07:00
Gold856
b12b83aa89 Fix typos with cspell (#6972) 2024-08-17 07:44:34 -07:00
Gold856
780b1e0391 [build] CMake: disable Java components by default (#6975) 2024-08-16 06:46:14 -07:00
Gold856
dc25c13051 [build] CMake: remove redundant logic (#6971) 2024-08-15 21:36:45 -07:00
Gold856
0c58426f4c [sim] Add SendableChooserSim (#6763)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
2024-08-15 15:00:10 -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
Tyler Veness
4d7c9edab3 [ci] Upgrade to wpiformat 2024.40 (#6969) 2024-08-15 09:09:13 -07:00
sciencewhiz
063409518e [docs] Delete param doc for func that lacks param (NFC) (#6964) 2024-08-15 07:46:01 -07:00
Jade
14af894711 [gitignore] Add testing files from ctest (#6966) 2024-08-15 07:45:39 -07:00
Tyler Veness
050eafd802 [upstream_utils] Shorten file copy command (#6965)
The new upstream_utils command-line API has been nice, but the
copy-upstream-to-thirdparty command has been annoying to type. Since it
already has documentation, we can shorten it to make it easier to
remember and type.
2024-08-15 07:44:50 -07:00
Tyler Veness
44311671f8 [upstream_utils] Use git to get repo root (#6967) 2024-08-15 07:44:22 -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
Gold856
112f536716 [epilogue] Remove dependency on Google AutoService (#6955)
This makes potential future compilation with CMake easier and reduces the amount of external code we depend on.
2024-08-14 10:44:50 -07:00
Tyler Veness
8e0d9ac805 Clean up unit UDL usage (#6961) 2024-08-14 10:44:00 -07:00
Jade
70fa41c69e [epilogue] Allow configuring logging period and logging period offset (#6893) 2024-08-14 09:26:48 -07:00