mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -192,8 +192,8 @@ public class Notifier implements AutoCloseable {
|
||||
* <p>The user-provided callback should be written so that it completes before the next time it's
|
||||
* scheduled to run.
|
||||
*
|
||||
* @param period Period in seconds after which to to call the callback starting one period after
|
||||
* the call to this method.
|
||||
* @param period Period in seconds after which to call the callback starting one period after the
|
||||
* call to this method.
|
||||
*/
|
||||
public void startPeriodic(double period) {
|
||||
m_processLock.lock();
|
||||
|
||||
@@ -96,6 +96,15 @@ public final class Preferences {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the network table used for preferences entries.
|
||||
*
|
||||
* @return the network table used for preferences entries
|
||||
*/
|
||||
public static NetworkTable getNetworkTable() {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the preferences keys.
|
||||
*
|
||||
|
||||
@@ -260,8 +260,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
|
||||
// Square the inputs (while preserving the sign) to increase fine control
|
||||
// while permitting full power.
|
||||
if (squareInputs) {
|
||||
xSpeed = Math.copySign(xSpeed * xSpeed, xSpeed);
|
||||
zRotation = Math.copySign(zRotation * zRotation, zRotation);
|
||||
xSpeed = MathUtil.copySignPow(xSpeed, 2);
|
||||
zRotation = MathUtil.copySignPow(zRotation, 2);
|
||||
}
|
||||
|
||||
double leftSpeed = xSpeed - zRotation;
|
||||
@@ -335,8 +335,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
|
||||
// Square the inputs (while preserving the sign) to increase fine control
|
||||
// while permitting full power.
|
||||
if (squareInputs) {
|
||||
leftSpeed = Math.copySign(leftSpeed * leftSpeed, leftSpeed);
|
||||
rightSpeed = Math.copySign(rightSpeed * rightSpeed, rightSpeed);
|
||||
leftSpeed = MathUtil.copySignPow(leftSpeed, 2);
|
||||
rightSpeed = MathUtil.copySignPow(rightSpeed, 2);
|
||||
}
|
||||
|
||||
return new WheelSpeeds(leftSpeed, rightSpeed);
|
||||
|
||||
Reference in New Issue
Block a user