Commit Graph

7047 Commits

Author SHA1 Message Date
Peter Johnson
4023cdc80a [ntcore] Fix EALREADY errors by tracking read state (#7202) v2025.1.1-beta-1 2024-10-13 00:14:16 -07:00
Gold856
12885015ed [cscore,hal] Remove VS 2019 16.4.0 workaround (#7201) 2024-10-11 22:18:12 -07:00
Gold856
f23bece791 [sysid] Remove unused dependency on libglassnt (#7200)
Also remove stale libuv references.
2024-10-11 22:05:32 -07:00
Gold856
7ebd45ef4d [sysid] Fix crash when all data is filtered out during analysis (#7199) 2024-10-11 21:51:56 -07:00
Peter Johnson
25c2e26ef8 [ntcore] Fix UID collisions between subscribers and multi-sub (#7198)
The changes in #7189 caused an ambiguity between multi-subscribers and
normal subscribers, because the handle type no longer is sent to the network.

Multi-subscribers now go to the network with negative UIDs, normal
subscribers are positive UIDs.  UID 0 is never used.
2024-10-11 21:39:55 -07:00
PJ Reiniger
f1e032f5e6 [examples] Fix cross project import (#7197) 2024-10-11 21:17:57 -07:00
Gold856
22a04bf470 [commands] Deprecate control commands and subsystems (#7143) 2024-10-11 19:48:47 -07:00
Peter Johnson
77ee9bdd30 [ntcore] Client: only connect to IPv4 addresses (#7195)
The server only binds to IPv6, so connection attempts to that are useless.
2024-10-11 17:05:09 -07:00
Peter Johnson
c6d801d2d6 [wpinet] ParallelTcpConnector: Add option to resolve only IPv4 addresses (#7194) 2024-10-11 16:42:59 -07:00
Peter Johnson
768fa5f973 [wpinet] libuv: Change GetAddrInfo hints parameter to optional (#7196)
This is clearer than passing a pointer.
2024-10-11 16:42:42 -07:00
Peter Johnson
a621cebbd6 [ntcore] Server round robin message processing (#7191)
Each client has an incoming queue of ClientMessage.

In the read callback:
- Parse and process only ping messages and a limited number of messages;
  anything else will get put into the queue and not processed
- If we queued some messages, we tell the network we stopped reading; this will
  result in back-pressure if we are reading too slowly.  We also start an idle
  handle to process the queued messages.

In the idle handle callback:
- For each client, process just a few pending messages.  This is performed in
  round-robin fashion across all clients with pending messages
- When a client's queue becomes empty, we re-enable the network read
- When all client queues are empty, we stop the idle handle (so we don't spin)

For local client processing, we use round-robin processing for most cases (including FlushLocal),
but still do batch processing of all local changes for explicit network Flush() calls.
2024-10-11 16:26:56 -07:00
Peter Johnson
8870d98f80 [upstream_utils] Revert upgrade to libuv 1.49.0
This reverts commit eab93f4fdc (#7129).

There's broken behavior in getaddrinfo.
2024-10-11 16:13:15 -07:00
Peter Johnson
2d6f02d15b [glass] Check for struct descriptor size 0 (#7192)
This avoids a potential divide by 0.
2024-10-11 16:09:32 -07:00
Peter Johnson
96f0b2482c [ntcore] Unify NetworkInterface and MessageHandler (#7190) 2024-10-11 14:38:02 -07:00
Peter Johnson
8ca99c7cb7 [ntcore] Change internal interfaces and messages to use UIDs (#7189)
Also make Handle functions constexpr.
2024-10-11 10:57:36 -07:00
Peter Johnson
59bc53b9b8 [ntcore] Add StopRead/StartRead to WireConnection (#7188) 2024-10-11 10:51:12 -07:00
Peter Johnson
94c62ed3ec [wpiutil] Add FastQueue (#7075)
This is a heavily modified version of https://github.com/cameron314/readerwriterqueue that removes
all atomics and barriers.
2024-10-11 10:49:29 -07:00
Gold856
28cb7cf757 [examples] Add ProfiledPID command to RapidReactCommandBot (#7030) 2024-10-11 08:43:24 -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
Peter Johnson
f65f9ed693 [wpiutil] Add rotated_span (#7111) 2024-10-10 23:36:26 -07:00
Jade
8f57e4c566 [documentation] Remove more outdated commands examples (#7054)
There are still some examples we'd like to remove here (eg Hatchbot
traditional) but this is a good start with not too many changes required
in frc-docs.
2024-10-10 23:09:11 -07:00
Gold856
37e7bfe4f9 [build] Add docs for generated files (#6878) 2024-10-10 22:20:45 -07:00
Jade
679892e8e1 [commands, documentation] Remove controller replaceme commands (#7053) 2024-10-10 22:12:02 -07:00
Nicholas Armstrong
4adfa8bf64 [wpimath] Fully discretized ElevatorFF and ArmFF (#7024)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2024-10-10 22:10:45 -07:00
Nicholas Armstrong
5d9a553104 [wpilib] DCMotorSim cleanup/enhancement (#7021)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2024-10-10 22:09:22 -07:00
Nicholas Armstrong
5acb4109ff [examples] Fix flaky ArmSimulationTest (#7170)
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
2024-10-10 22:07:52 -07:00
Ryan Blue
fc83d4868c [hal] Fix CAN ID validation and reporting for CTRE and REV devices (#7178)
REV: 1-63, 63 devices
CTRE: 0-62, 63 devices
2024-10-10 22:06:53 -07:00
Ryan Blue
a65f6b94ee [hal] Radio LED: Properly close files and improve error messages (#7181) 2024-10-10 22:06:19 -07:00
Bryce Roethel
d97a749d84 [wpimath] SwerveDrivePoseEstimator: Fix stationary module emitting error when calculating angle in ToSwerveModuleStates (#7175) 2024-10-10 22:05:49 -07:00
Sam Carlberg
2085ab3d47 [wpilib] Allow LED pattern gradients to be discontinuous (#7174) 2024-10-10 22:05:33 -07:00
Peter Johnson
0cfff31439 [ntcore] Fix use-after-free on connection termination (#7177)
The stream can close (e.g. due to an error) while in the middle of writing. The close callback would immediately destroy the connection object, resulting in the writing code having a use-after-free. Fix this by deferring the deletion to the loop main using a single-shot timer.
2024-10-10 22:03:55 -07:00
Thad House
a71cee1112 [build] Update to 2025 beta NI Libraries (#7182) 2024-10-10 22:03:29 -07:00
Nicholas Armstrong
968bdf0d06 [commands] Add deadband trigger methods to CommandGenericHID (#7085)
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
2024-10-10 22:03:01 -07:00
Gold856
f150b36108 [wpiutil] Fix FileLogger behavior and performance (#7150)
Co-authored-by: Ryan Blue <ryanzblue@gmail.com>
2024-10-08 12:55:16 -06:00
Ryan Blue
f856c05a08 [ci] Add no-cache build workflow to detect potential false-positive cache hits (#7027)
Duplicate of gradle.yml without docs, caching, and release configurations.
It's set up to run off-peak weekly.
2024-10-04 18:24:23 -07:00
Ryan Blue
09a93b86dc [wpilibc] Add RadioLEDState docs to C++ (NFC) (#7158)
Add RadioLEDState docs for consistency with Java.
2024-10-04 18:22:31 -07:00
Tyler Veness
8102516300 [ci] Upgrade to wpiformat 2024.42 (#7165) 2024-10-04 13:55:10 -06:00
Ryan Blue
b541174255 [wpilib] Alert: fix incorrect set docs (NFC) (#7163)
Console printing was removed when Alerts were added to wpilib.
2024-10-03 23:20:53 -06:00
Sam Carlberg
9a7710ebd3 [wpiunits] Make Velocity.mult(Time) return Measure<D> (#7162)
Update code generator to allow arbitrary implementations of multiplication methods.
2024-10-03 23:19:36 -06:00
Ryan Blue
bc6553cd2b [ci] Fix cmake CI (#7159) 2024-10-03 18:22:39 -06:00
Jade
dced751a72 [ci] Merge Windows into CMake matrix (#7153) 2024-10-03 14:26:49 -06:00
Ryan Blue
83615c6024 [wpiutil] DataLogBackgroundWriter: Normalize empty path name (#7151)
An empty path isn't valid on it's own, so fs::space always returns an error. This results in UINT_MAX bytes being used instead of the actual free space, which means a default constructed DataLogBackgroundWriter won't stop for low space.

Using "." instead makes the directory path the current working directory, which is the desired behavior
2024-10-03 13:32:09 -06:00
Jade
a8a5d1609b [build] Name CMake presets more consistently (#7154) 2024-10-03 13:29:27 -06:00
Gold856
f82e1c9d48 [build] CMake: fix Windows build when WITH_PROTOBUF is false (#7147) 2024-10-02 10:20:43 -06:00
Jade
466a4a52fa [wpilibc] Fix missing symbols on Windows (#7140)
Windows doesn't support direct static variable access across library boundaries in a mixed static/shared environment, so change to accessor functions.
2024-10-01 08:46:06 -06:00
Nicholas Armstrong
fe80d72fba [wpimath] Add cosineScale method to SwerveModuleState and instance optimize (#7114) 2024-09-30 13:23:30 -06:00
Peter Johnson
fde264b041 [thirdparty] Add Roboto fonts (#7138) 2024-09-28 10:58:47 -07:00
Peter Johnson
95da92db04 [wpigui] Add "deep dark" style (#7133) 2024-09-28 10:58:29 -07:00
Peter Johnson
d389317c3a [thirdparty] Upgrade imgui fonts to latest versions (#7137) 2024-09-28 10:35:16 -07:00
Peter Johnson
50db16c0c0 [wpigui] Add font selector (#7134) 2024-09-28 10:34:59 -07:00