mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib,cmd] Rename gamepad shoulder to bumper (#8573)
Both programs used bumper, so we shouldn't rename it. There's no reason to change it, and we don't need to match SDL.
This commit is contained in:
@@ -53,7 +53,7 @@ public class RobotContainer {
|
||||
*/
|
||||
private void configureButtonBindings() {
|
||||
// Drive at half speed when the bumper is held
|
||||
m_driverController.rightShoulder().onTrue(m_driveHalfSpeed).onFalse(m_driveFullSpeed);
|
||||
m_driverController.rightBumper().onTrue(m_driveHalfSpeed).onFalse(m_driveFullSpeed);
|
||||
|
||||
// Drive forward by 3 meters when the 'South Face' button is pressed, with a timeout of 10
|
||||
// seconds
|
||||
|
||||
@@ -81,7 +81,7 @@ public class RobotContainer {
|
||||
m_driverController.westFace().onTrue(m_hatchSubsystem.releaseHatchCommand());
|
||||
// While holding right bumper, drive at half speed
|
||||
m_driverController
|
||||
.rightShoulder()
|
||||
.rightBumper()
|
||||
.onTrue(Commands.runOnce(() -> m_robotDrive.setMaxOutput(0.5)))
|
||||
.onFalse(Commands.runOnce(() -> m_robotDrive.setMaxOutput(1)));
|
||||
}
|
||||
|
||||
@@ -88,8 +88,8 @@ public class RobotContainer {
|
||||
// Release the hatch when the 'East Face' button is pressed.
|
||||
new JoystickButton(m_driverController, Button.kEastFace.value)
|
||||
.onTrue(new ReleaseHatch(m_hatchSubsystem));
|
||||
// While holding the shoulder button, drive at half speed
|
||||
new JoystickButton(m_driverController, Button.kRightShoulder.value)
|
||||
// While holding the bumper button, drive at half speed
|
||||
new JoystickButton(m_driverController, Button.kRightBumper.value)
|
||||
.whileTrue(new HalveDriveSpeed(m_robotDrive));
|
||||
}
|
||||
|
||||
|
||||
@@ -46,19 +46,19 @@ public class SysIdRoutineBot {
|
||||
// of bindings at once
|
||||
m_driverController
|
||||
.southFace()
|
||||
.and(m_driverController.rightShoulder())
|
||||
.and(m_driverController.rightBumper())
|
||||
.whileTrue(m_drive.sysIdQuasistatic(SysIdRoutine.Direction.kForward));
|
||||
m_driverController
|
||||
.eastFace()
|
||||
.and(m_driverController.rightShoulder())
|
||||
.and(m_driverController.rightBumper())
|
||||
.whileTrue(m_drive.sysIdQuasistatic(SysIdRoutine.Direction.kReverse));
|
||||
m_driverController
|
||||
.westFace()
|
||||
.and(m_driverController.rightShoulder())
|
||||
.and(m_driverController.rightBumper())
|
||||
.whileTrue(m_drive.sysIdDynamic(SysIdRoutine.Direction.kForward));
|
||||
m_driverController
|
||||
.northFace()
|
||||
.and(m_driverController.rightShoulder())
|
||||
.and(m_driverController.rightBumper())
|
||||
.whileTrue(m_drive.sysIdDynamic(SysIdRoutine.Direction.kReverse));
|
||||
|
||||
// Control the shooter wheel with the left trigger
|
||||
@@ -66,19 +66,19 @@ public class SysIdRoutineBot {
|
||||
|
||||
m_driverController
|
||||
.southFace()
|
||||
.and(m_driverController.leftShoulder())
|
||||
.and(m_driverController.leftBumper())
|
||||
.whileTrue(m_shooter.sysIdQuasistatic(SysIdRoutine.Direction.kForward));
|
||||
m_driverController
|
||||
.eastFace()
|
||||
.and(m_driverController.leftShoulder())
|
||||
.and(m_driverController.leftBumper())
|
||||
.whileTrue(m_shooter.sysIdQuasistatic(SysIdRoutine.Direction.kReverse));
|
||||
m_driverController
|
||||
.westFace()
|
||||
.and(m_driverController.leftShoulder())
|
||||
.and(m_driverController.leftBumper())
|
||||
.whileTrue(m_shooter.sysIdDynamic(SysIdRoutine.Direction.kForward));
|
||||
m_driverController
|
||||
.northFace()
|
||||
.and(m_driverController.leftShoulder())
|
||||
.and(m_driverController.leftBumper())
|
||||
.whileTrue(m_shooter.sysIdDynamic(SysIdRoutine.Direction.kReverse));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user