mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -104,8 +104,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
|
||||
@SuppressWarnings({"removal", "this-escape"})
|
||||
public DifferentialDrive(MotorController leftMotor, MotorController rightMotor) {
|
||||
this(
|
||||
(double output) -> leftMotor.setDutyCycle(output),
|
||||
(double output) -> rightMotor.setDutyCycle(output));
|
||||
(double output) -> leftMotor.setThrottle(output),
|
||||
(double output) -> rightMotor.setThrottle(output));
|
||||
SendableRegistry.addChild(this, leftMotor);
|
||||
SendableRegistry.addChild(this, rightMotor);
|
||||
}
|
||||
|
||||
@@ -120,10 +120,10 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea
|
||||
MotorController frontRightMotor,
|
||||
MotorController rearRightMotor) {
|
||||
this(
|
||||
(double output) -> frontLeftMotor.setDutyCycle(output),
|
||||
(double output) -> rearLeftMotor.setDutyCycle(output),
|
||||
(double output) -> frontRightMotor.setDutyCycle(output),
|
||||
(double output) -> rearRightMotor.setDutyCycle(output));
|
||||
(double output) -> frontLeftMotor.setThrottle(output),
|
||||
(double output) -> rearLeftMotor.setThrottle(output),
|
||||
(double output) -> frontRightMotor.setThrottle(output),
|
||||
(double output) -> rearRightMotor.setThrottle(output));
|
||||
SendableRegistry.addChild(this, frontLeftMotor);
|
||||
SendableRegistry.addChild(this, rearLeftMotor);
|
||||
SendableRegistry.addChild(this, frontRightMotor);
|
||||
|
||||
Reference in New Issue
Block a user