Commit Graph

5791 Commits

Author SHA1 Message Date
Starlight220
aa34aacf6e [wpilib] Shuffleboard: Keep duplicates on SelectTab() (#5198) v2023.4.3 2023-03-26 20:12:55 -07:00
Tyler Veness
63512bbbb8 [wpimath] Fix potential divide-by-zero in RKDP (#5242)
If f(x, u) has no dynamics, the truncation error can be zero.
2023-03-26 17:00:09 -07:00
Peter Johnson
9227b2166e [wpilibj] DriverStation: Fix joystick data logs (#5240)
Was logging relative to cached value rather than previously logged value.
Was also logging cached value instead of current loop value.
C++ implementation is correct.
2023-03-26 16:17:13 -07:00
Peter Johnson
fbf92e9190 [wpinet] ParallelTcpConnector: don't connect to duplicate addresses (#5169)
There can be duplicate addresses coming out of name resolution; if we
already started connecting to an address, don't start another connection
attempt.
2023-03-25 16:28:39 -07:00
Peter Johnson
2108a61362 [ntcore] NT4 client: close timed-out connections (#5175)
Pings are sent every 3 seconds.  If we don't see a response to the last
ping before it's time to send the next one, close the connection.
2023-03-25 16:27:40 -07:00
Peter Johnson
0a66479693 [ntcore] Optimize scan of outgoing messages (#5227)
The algorithm being used for scanning outgoing messages was O(n^2)
because it did a full linear search and then appended. This scan is
performed for each client. If there is a burst of outgoing changes, the
outgoing queue can get quite deep all at once and this scan can be very
slow. Replacing with a map fixes this.
2023-03-25 15:20:22 -07:00
Ryan Blue
b510c17ef6 [hal] Fix RobotController.getComments() mishandling quotes inside the comments string (#5197)
Previously, the comment would end at any quote, escaped or unescaped. This allows UnescapeCString to handle the unescaping of quotes and properly end the string.
2023-03-20 13:50:25 -07:00
Starlight220
e7a7eb2e93 [commands] WaitCommand: Remove subclass doc note (NFC) (#5200) 2023-03-20 13:46:26 -07:00
Starlight220
a465f2d8f0 [examples] Shuffleboard: Correct parameter order (#5204) 2023-03-20 13:45:34 -07:00
Mansour Quddus
a3364422fa LICENSE.md: Bump year to 2023 (#5195) 2023-03-18 07:12:08 -07:00
Tyler Veness
df3242a40a [wpimath] Fix NaN in C++ MakeCostMatrix() that takes an array (#5194)
Java's makeCostMatrix() and the C++ MakeCostMatrix() overload that takes
a parameter pack already do the right thing.
2023-03-17 07:05:28 -07:00
Peter Johnson
00abb8c1e0 [commands] RamseteCommand: default-initialize m_prevSpeeds (#5188) 2023-03-13 23:12:17 -07:00
Ryan Blue
c886273fd7 [wpilibj] DutyCycleEncoder.setDistancePerRotation(): fix simulation (#5147) 2023-03-13 21:28:55 -07:00
Peter Johnson
53b5fd2ace [ntcore] Use int64 for datalog type string (#5186)
There's a spec difference between NT4 and datalog for integers; NT4 uses
"int", datalog uses "int64". We were using "int" for datalog as well.

Also add backwards compatibility support to datalogtool for treating
"int" as "int64".
2023-03-13 21:28:07 -07:00
Peter Johnson
56b758320f [wpilib] DataLogManager: increase time for datetime to be valid (#5185)
There's no signal from NetComm as to when it is valid, and 1 second
seems to be marginal.  Increase to 6 seconds for just DS, 5 seconds for
FMS attached.
2023-03-13 21:27:52 -07:00
nt
08f298e4cd [wpimath] Fix Pose3d log returning Twist3d NaN for theta between 1E-8 and 1E-7 (#5168) 2023-03-13 21:27:32 -07:00
Jeffrey Morris
6d0c5b19db [commands] CommandScheduler.isComposed: Remove incorrect throws clause (NFC) (#5183) 2023-03-13 21:27:08 -07:00
Ryan Blue
0d22cf5ff7 [wpilib] Fix enableLiveWindowInTest crashing in disabled (#5173) 2023-03-10 19:24:40 -08:00
Ryan Blue
32ec5b3f75 [wpilib] Add isTestEnabled and minor docs cleanup (#5172) 2023-03-10 19:23:57 -08:00
Dustin Spicuzza
e5c4c6b1a7 [wpimath] Fix invalid iterator access in TimeInterpolatableBuffer (#5138) 2023-02-26 16:42:24 -08:00
nt
099d048d9e [wpimath] Fix Pose3d log returning Twist3d NaN for theta between 1E-9 and 1E-8 (#5143)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2023-02-26 16:41:36 -08:00
sciencewhiz
4af84a1c12 Fix Typos (NFC) (#5137) 2023-02-26 15:06:37 -08:00
Tyler Veness
ce3686b80d [wpimath] Check LTV controller max velocity precondition (#5142) 2023-02-26 15:05:41 -08:00
Colin Wong
4b0eecaee0 [commands] Subsystem: Add default command removal method (#5064) v2023.4.2 2023-02-24 19:58:53 -08:00
Noah Andrews
edf4ded412 [wpilib] PH: Revert to 5V rail being fixed 5V (#5122) 2023-02-24 19:55:50 -08:00
Gabor Szita
4c46b6aff9 [wpilibc] Fix DataLogManager crash on exit in sim (#5125) 2023-02-23 20:13:20 -08:00
David Vo
490ca4a68a [wpilibc] Fix XboxController::GetBackButton doc (NFC) (#5131) 2023-02-23 20:11:10 -08:00
superpenguin612
cbb5b0b802 [hal] Simulation: Fix REV PH solenoids 8+ (#5132) 2023-02-23 20:10:44 -08:00
Thad House
bb7053d9ee [hal] Fix HAL_GetRuntimeType being slow on the roboRIO (#5130)
HAL_GetRuntimeType used to be a free call before the roboRIO2 was added. However, nLoadOut::getTargetClass() is not a free call, and it may hit the IPC layer. Cache this value so it is not called every time.
2023-02-23 00:59:59 -08:00
sciencewhiz
9efed9a533 Update .clang-format to c++20 (#5121)
This does not result in any reformatting
2023-02-20 10:54:55 -08:00
sciencewhiz
dbbfe1aed2 [wpilib] Use PH voltage to calc Analog pressure switch threshold (#5115)
The calculated trigger voltages were calculated with a hard coded 5v.
This introduces error when the 5V provided to the Analog pressure
sensor is not exactly 5v, as the pressure is a ratio of the analog
voltage and provided voltage.

This should improve
https://www.chiefdelphi.com/t/rev-pressure-sensor-enablecompressoranalog-not-reaching-configured-pressure/426868
where the 5v voltage was 4.92 volts, which introduces ~8 PSI of error.
2023-02-19 23:13:22 -08:00
Ryan Blue
de65a135c3 [wpilib] DutyCycleEncoderSim: Add channel number constructor (#5118) 2023-02-19 23:12:48 -08:00
sciencewhiz
3e9788cdff [docs] Strip path from generated NT docs (#5119)
Fixes #5117
2023-02-19 23:12:05 -08:00
Peter Johnson
ecb072724d [ntcore] Client::Disconnect(): actually close connection (#5113) v2023.4.1 2023-02-17 23:56:49 -08:00
Peter Johnson
0d462a4561 [glass] NT view: Change string/string array to quoted (#5111) 2023-02-17 18:01:54 -08:00
Peter Johnson
ba37986561 [ntcore] NetworkClient::Disconnect: Add null check (#5112) 2023-02-17 16:48:34 -08:00
Peter Johnson
25ab9cda92 [glass,ov] Provide menu item to create topic from root (#5110) 2023-02-17 16:46:02 -08:00
Peter Johnson
2f6251d4a6 [glass] Set default value when publishing new topic (#5109) 2023-02-17 16:45:38 -08:00
Jonah
e9a7bed988 [wpimath] Add timestamp getter to MathShared (#5091)
This makes it possible to mock the timestamp for wpimath without affecting the rest of the library.

Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
2023-02-17 14:53:17 -08:00
Peter Johnson
9cc14bbb43 [ntcore] Add stress test to dev executable (#5107) 2023-02-16 22:49:36 -08:00
Peter Johnson
8068369542 [wpinet] uv: Stop creating handles when closing loop (#5102)
This prevents EventLoopRunner::Stop() from hanging in the case when
new handles are created after the async walk closes all the handles.
2023-02-16 22:49:14 -08:00
Peter Johnson
805c837a42 [ntcore] Fix use-after-free in server (#5101)
The client name deduplication didn't properly deduplicate.  Instead,
always append the client index to guarantee a unique name.
2023-02-16 22:45:50 -08:00
bovlb
fd18577ba0 [commands] Improve documentation of addRequirements (NFC) (#5103) 2023-02-16 22:08:46 -08:00
Tyler Veness
74dea9f05e [wpimath] Fix exception for empty pose buffer in pose estimators (#5106)
Fixes #5100.
2023-02-16 22:00:21 -08:00
sciencewhiz
9eef79d638 [wpilib] PneumaticHub: Document range of enableCompressorAnalog (NFC) (#5099) 2023-02-15 20:25:12 -08:00
Peter Johnson
843574a810 [ntcore] Use wpi::Now instead of loop time for transmit time
As the send function is called after local processing, there can be a
substantial delay between the loop time and the actual send.
2023-02-13 23:00:03 -08:00
Peter Johnson
226ef35212 [wpinet] WebSocket: Reduce server send frame overhead
Avoid allocating 4K buffer to send a 10-byte header per frame.
2023-02-13 23:00:03 -08:00
Peter Johnson
b30664d630 [ntcore] Reduce initial connection overhead
Mixing the announce and value messages causes significant downstream
inefficiency in both time and space.
2023-02-13 23:00:03 -08:00
sciencewhiz
804e5ce236 [examples] MecanumDrive: Fix axis comment in C++ example (NFC) (#5096) 2023-02-13 22:18:23 -08:00
Starlight220
49af88f2bb [examples] ArmSimulation: Fix flaky test (#5093) 2023-02-13 12:59:27 -08:00