Thad House
d8e0b6c977
[wpilibj] Fix java async interrupts ( #3559 )
2021-09-11 09:21:02 -07:00
sciencewhiz
5a4f75c9f8
[wpilib] Replace Speed controller comments with motor controller (NFC) ( #3551 )
...
Makes comments consistent with #3302
2021-09-08 22:09:08 -07:00
sciencewhiz
697e2dd330
[wpilib] Fix errant jaguar reference in comments (NFC) ( #3550 )
2021-09-08 14:18:37 -07:00
Tyler Veness
aa3848b2c8
[wpimath] Move RobotDriveBase::ApplyDeadband() to MathUtil ( #3529 )
...
It's a useful function outside of the drive classes.
For backwards compatibility, deprecate (rather than remove) RobotDriveBase.applyDeadband()
2021-08-28 20:52:05 -07:00
Tyler Veness
e5fe3a8e16
[build] Treat javadoc warnings as errors in CI and fix warnings ( #3530 )
2021-08-28 20:48:47 -07:00
PJ Reiniger
2edd510ab7
[sim] Add sim wrappers for sensors that use SimDevice ( #3517 )
2021-08-20 23:19:59 -07:00
Thad House
10cc8b89c4
[hal] [wpilib] Add initial support for the REV PDH ( #3503 )
2021-08-14 11:44:56 -07:00
Tyler Veness
5d9ae3cdb4
[hal] Set HAL Notifier thread as RT by default ( #3482 )
...
This PR gives the Notifier HAL thread RT priority 40 in RobotBase after
HAL initialization and before the user code is run. This drastically
improves scheduling jitter for TimedRobot's AddPeriodic() functions (in
3512's experience).
It's too risky to set user code as RT because badly behaved code
will lock up the Rio (potentially requiring safe mode to recover).
This needs the user program to be setuid admin to succeed.
2021-08-14 11:42:35 -07:00
Starlight220
031962608b
[wpilib] Add PS4Controller, remove Hand from GenericHID/XboxController ( #3345 )
...
- GenericHID is now concrete, and has only getRawAxis/Button(int) functionality
- getXxx() has been moved into Joystick as that's the only place where it makes sense
- Hand (and therefore getXxx(Hand)) has been removed, replaced by specific getLeft/RightXxx() methods in XboxController and the new PS4Controller class
- C++ ::Button:: and ::Axis:: enums have been converted to identically-namespaced static constexpr ints
2021-08-14 10:00:46 -07:00
Tyler Veness
25f6f478a5
[wpilib] Rename DriverStation::IsOperatorControl() to IsTeleop() ( #3505 )
2021-08-11 23:04:43 -07:00
PJ Reiniger
e80f09f849
[wpilibj] Add unit tests ( #3501 )
2021-08-11 23:04:14 -07:00
Tyler Veness
c159f91f06
[wpilib] Only read DS control word once in IterativeRobotBase ( #3504 )
2021-08-11 18:05:07 -07:00
Tyler Veness
5ac60f0a20
[wpilib] Remove IterativeRobotBase mode init prints ( #3500 )
...
They don't provide much utility for the end user. A print at the call to
HAL_ObserveUserProgramStarting() was added in their place so it's still
clear when constructors have finished running.
2021-08-05 23:54:50 -07:00
Tyler Veness
fb2ee8ec34
[wpilib] Add TimedRobot functions for running code on mode exit ( #3499 )
...
Currently, we have functions like TeleopInit() for running code on mode
entry, but no such functions for running code on mode exit, and it's
cumbersome to add those in user code without making a custom robot
class. This PR adds exit functions to TimedRobot.
Some example use cases include DisabledExit() for operations when the
robot enables (whether that be into teleop, autonomous, or test) and
AutonomousExit() for disabling feedback controllers.
2021-08-05 19:08:29 -07:00
sciencewhiz
b253246959
[wpilibj] Add units to parameter names (NFC) ( #3497 )
2021-08-05 18:04:20 -07:00
Thad House
1ac73a247e
[hal] Rename PowerDistributionPanel to PowerDistribution ( #3466 )
...
Makes HAL more generic for the PDP, to enable the Rev PDH in the future.
2021-08-04 20:31:17 -07:00
Tyler Veness
3838cc4ec4
Use unicode characters in docs equations ( #3487 )
...
javac and javadoc needed the encoding set to UTF-8.
2021-07-29 22:42:43 -07:00
Tyler Veness
d7b8aa56dc
[wpilibj] Rename DriverStation In[Mode] functions to follow style guide ( #3488 )
2021-07-26 07:29:54 -07:00
Tyler Veness
1daadb812f
[wpimath] Implement Dormand-Prince integration method ( #3476 )
...
Also refactored RKF45 implementation to match the new style, which is
easier to read.
The tests were switched from RKF45 to RKDP since it's more accurate.
2021-07-11 09:42:33 -05:00
Tyler Veness
c002e6f926
Run wpiformat ( #3473 )
...
A recent PR had an earlier version of wpiformat ran on it with more
lenient rules.
2021-07-09 20:49:13 -05:00
Thad House
c154e5262e
[wpilib] Make solenoids exclusive use, PCM act like old sendable compressor ( #3464 )
2021-07-09 15:11:12 -07:00
Thad House
6ddef1cca6
[hal] JNI setDIO: use a boolean and not a short ( #3469 )
2021-07-08 23:42:31 -05:00
Tyler Veness
9d68d95825
Remove extra newlines after open curly braces (NFC) ( #3471 )
2021-07-08 23:41:30 -05:00
Tyler Veness
efa28125c6
[wpilibc] Add message to RobotBase on how to read stacktrace ( #3444 )
...
Also make stacktrace info an error instead of a warning in both C++ and Java.
2021-06-17 23:52:48 -07:00
Ryan Hirasaki
49c71f9f2d
[wpilibj] Clarify robot quit message ( #3364 )
...
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com >
2021-06-16 13:24:06 -07:00
Noam Zaks
791770cf6e
[wpimath] Move controller from wpilibj to wpimath ( #3439 )
2021-06-16 07:45:51 -07:00
Peter Johnson
362066a9b7
[wpilib] Deprecate getInstance() in favor of static functions ( #3440 )
...
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com >
2021-06-15 23:06:03 -07:00
Thad House
4a36f86c81
[hal] Add support for DMA to Java ( #3158 )
2021-06-14 19:56:42 -07:00
Peter Johnson
b417d961ec
Split Sendable into NT and non-NT portions ( #3432 )
...
The non-NT portion has been moved to wpiutil.
The NT portion has been moved to ntcore (as NTSendable).
SendableBuilder similarly split and moved.
SendableRegistry moved to wpiutil.
In C++, SendableHelper also moved to wpiutil.
This enables use of Sendable from wpimath and also enables
moving several classes from wpilib to wpimath.
2021-06-13 16:38:05 -07:00
Peter Johnson
f60994ad24
[wpiutil] Rename Java package to edu.wpi.first.util ( #3431 )
...
This is more consistent with wpimath being edu.wpi.first.math.
2021-06-12 01:17:09 -07:00
Tyler Veness
4d9ff76433
Fix documentation warnings generated by JavaDoc (NFC) ( #3428 )
...
Some C++ Doxygen comments were updated to reflect any wording changes.
See `rg "(@return|@param \w+) TODO" | less` for list of incomplete docs.
2021-06-10 20:46:47 -07:00
Tyler Veness
099fde97d5
[wpilib] Improve PDP comments (NFC) ( #3427 )
...
Also remove HAL doxygen comments from sources;
these functions already had more descriptive comments in their
corresponding headers.
2021-06-10 00:02:51 -07:00
Tyler Veness
c1e128bd5a
Disable frivolous PMD warnings and enable PMD in ntcore ( #3419 )
...
Some valid warnings like throwing NullPointerException or using a for
loop instead of System.arraycopy() were fixed.
Abstract classes marked with PMD.AbstractClassWithoutAbstractMethod were
made concrete because they already had protected constructors.
Fixes #1697 .
2021-06-09 07:01:00 -07:00
Thad House
0e702eb799
[hal] Add a unified PCM object ( #3331 )
2021-06-05 22:36:39 -07:00
Tyler Veness
8aecda03ed
[wpilib] Fix a documentation typo ( #3408 )
...
"indicated" was misspelled.
2021-06-05 13:35:03 -07:00
Thad House
5c817082a0
[wpilib] Remove InterruptableSensorBase and replace with interrupt classes ( #2410 )
2021-06-05 11:25:21 -07:00
Tyler Veness
01dc0249de
[wpimath] Move SlewRateLimiter from wpilib to wpimath ( #3399 )
...
Timer was replaced with wpi::Now() to avoid a dependency on other wpilib
classes.
2021-05-31 10:35:54 -07:00
Tyler Veness
87384ea684
[wpilib] Fix PIDController continuous range error calculations ( #3170 )
...
The inputs should all be errors, so the range should be symmetric.
Fixes #3168 .
Fixes #3304 .
2021-05-21 23:52:30 -07:00
Tyler Veness
0768c39036
[wpilib] DifferentialDrive: Remove right side inversion ( #3340 )
...
Also refactor drive inverse kinematics into separate functions.
This allows composing them with operations separate from the drive
class.
2021-05-21 22:34:16 -07:00
Tyler Veness
8dd8d4d2d4
[wpimath] Fix redundant nested math package introduced by #3316 ( #3368 )
2021-05-21 22:29:52 -07:00
Peter Johnson
ff56d6861d
[wpilibj] Fix SpeedController deprecated warnings ( #3360 )
...
set() and other functions also need to be repeated on the MotorController
interface to avoid deprecation warnings from vscode.
2021-05-16 19:13:54 -07:00
Peter Johnson
da590120c4
[wpilibj] Add MotorController.setVoltage default ( #3347 )
...
This avoids a vscode deprecation warning.
2021-05-11 19:53:55 -07:00
Peter Johnson
44ad67ca8c
[wpilibj] Preferences: Add missing Deprecated annotation ( #3343 )
2021-05-09 18:20:42 -07:00
Peter Johnson
3cc2da3328
Merge branch '2022'
2021-05-09 14:15:40 -07:00
Noam Zaks
d6cfdd3bae
[wpilib] Preferences: Deprecate Put* in favor of Set* ( #3337 )
...
This naming is more consistent with other APIs.
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2021-05-06 08:25:37 -07:00
Tyler Veness
497b712f67
[wpilib] Make IterativeRobotBase::m_period private with getter
2021-05-04 13:41:36 -07:00
Tyler Veness
f00dfed7ac
[wpilib] Remove IterativeRobot base class
...
TimedRobot supersedes it (see commit 81498e6 for reasoning).
2021-05-04 13:41:36 -07:00
Tyler Veness
5ef2b4fdc0
[wpilibj] Fix @deprecated warning for SerialPort constructor ( #3329 )
...
The javadoc @deprecated tag didn't have corresponding @Deprecated
attribute.
2021-05-01 13:20:53 -07:00
Noam Zaks
c8ff626fe2
[wpimath] Move Java classes to edu.wpi.first.math ( #3316 )
2021-05-01 08:53:30 -07:00
Noam Zaks
4e424d51f4
[wpilibj] DifferentialDrivetrainSim: Rename constants to match the style guide ( #3312 )
2021-05-01 07:09:23 -07:00