diff --git a/commandsv2/src/main/java/org/wpilib/command2/button/CommandGamepad.java b/commandsv2/src/main/java/org/wpilib/command2/button/CommandGamepad.java index e3aa34ebabf..39cab6ef58f 100644 --- a/commandsv2/src/main/java/org/wpilib/command2/button/CommandGamepad.java +++ b/commandsv2/src/main/java/org/wpilib/command2/button/CommandGamepad.java @@ -236,47 +236,47 @@ public Trigger rightStick(EventLoop loop) { } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}. - * @see #leftShoulder(EventLoop) + * @see #leftBumper(EventLoop) */ - public Trigger leftShoulder() { - return leftShoulder(CommandScheduler.getInstance().getDefaultButtonLoop()); + public Trigger leftBumper() { + return leftBumper(CommandScheduler.getInstance().getDefaultButtonLoop()); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the given loop. */ - public Trigger leftShoulder(EventLoop loop) { - return button(Gamepad.Button.kLeftShoulder.value, loop); + public Trigger leftBumper(EventLoop loop) { + return button(Gamepad.Button.kLeftBumper.value, loop); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the {@link CommandScheduler#getDefaultButtonLoop() default scheduler button loop}. - * @see #rightShoulder(EventLoop) + * @see #rightBumper(EventLoop) */ - public Trigger rightShoulder() { - return rightShoulder(CommandScheduler.getInstance().getDefaultButtonLoop()); + public Trigger rightBumper() { + return rightBumper(CommandScheduler.getInstance().getDefaultButtonLoop()); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the given loop. */ - public Trigger rightShoulder(EventLoop loop) { - return button(Gamepad.Button.kRightShoulder.value, loop); + public Trigger rightBumper(EventLoop loop) { + return button(Gamepad.Button.kRightBumper.value, loop); } /** diff --git a/commandsv2/src/main/native/cpp/frc2/command/button/CommandGamepad.cpp b/commandsv2/src/main/native/cpp/frc2/command/button/CommandGamepad.cpp index c1de22fd999..d48deb41f25 100644 --- a/commandsv2/src/main/native/cpp/frc2/command/button/CommandGamepad.cpp +++ b/commandsv2/src/main/native/cpp/frc2/command/button/CommandGamepad.cpp @@ -49,12 +49,12 @@ Trigger CommandGamepad::RightStick(wpi::EventLoop* loop) const { return Button(wpi::Gamepad::Button::kRightStick, loop); } -Trigger CommandGamepad::LeftShoulder(wpi::EventLoop* loop) const { - return Button(wpi::Gamepad::Button::kLeftShoulder, loop); +Trigger CommandGamepad::LeftBumper(wpi::EventLoop* loop) const { + return Button(wpi::Gamepad::Button::kLeftBumper, loop); } -Trigger CommandGamepad::RightShoulder(wpi::EventLoop* loop) const { - return Button(wpi::Gamepad::Button::kRightShoulder, loop); +Trigger CommandGamepad::RightBumper(wpi::EventLoop* loop) const { + return Button(wpi::Gamepad::Button::kRightBumper, loop); } Trigger CommandGamepad::DpadUp(wpi::EventLoop* loop) const { diff --git a/commandsv2/src/main/native/include/wpi/commands2/button/CommandGamepad.hpp b/commandsv2/src/main/native/include/wpi/commands2/button/CommandGamepad.hpp index 8b2326e3fa9..30db1f4cb02 100644 --- a/commandsv2/src/main/native/include/wpi/commands2/button/CommandGamepad.hpp +++ b/commandsv2/src/main/native/include/wpi/commands2/button/CommandGamepad.hpp @@ -141,30 +141,28 @@ class CommandGamepad : public CommandGenericHID { .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance around the right shoulder button's + * Constructs a Trigger instance around the right bumper button's * digital signal. * * @param loop the event loop instance to attach the event to. Defaults to the * CommandScheduler's default loop. - * @return a Trigger instance representing the right shoulder button's + * @return a Trigger instance representing the right bumper button's * digital signal attached to the given loop. */ - Trigger LeftShoulder( - wpi::EventLoop* loop = - CommandScheduler::GetInstance().GetDefaultButtonLoop()) const; + Trigger LeftBumper(wpi::EventLoop* loop = CommandScheduler::GetInstance() + .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance around the right shoulder button's + * Constructs a Trigger instance around the right bumper button's * digital signal. * * @param loop the event loop instance to attach the event to. Defaults to the * CommandScheduler's default loop. - * @return a Trigger instance representing the right shoulder button's + * @return a Trigger instance representing the right bumper button's * digital signal attached to the given loop. */ - Trigger RightShoulder( - wpi::EventLoop* loop = - CommandScheduler::GetInstance().GetDefaultButtonLoop()) const; + Trigger RightBumper(wpi::EventLoop* loop = CommandScheduler::GetInstance() + .GetDefaultButtonLoop()) const; /** * Constructs a Trigger instance around the D-pad up button's diff --git a/commandsv3/src/main/java/org/wpilib/command3/button/CommandGamepad.java b/commandsv3/src/main/java/org/wpilib/command3/button/CommandGamepad.java index cbf1038805e..4e19867fb3f 100644 --- a/commandsv3/src/main/java/org/wpilib/command3/button/CommandGamepad.java +++ b/commandsv3/src/main/java/org/wpilib/command3/button/CommandGamepad.java @@ -266,51 +266,51 @@ public Trigger rightStick(EventLoop loop) { } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the {@link Scheduler#getDefaultEventLoop() default scheduler event loop} on the scheduler * passed to the controller's constructor, or the {@link Scheduler#getDefault default * scheduler} if a scheduler was not explicitly provided. - * @see #leftShoulder(EventLoop) + * @see #leftBumper(EventLoop) */ - public Trigger leftShoulder() { - return leftShoulder(getScheduler().getDefaultEventLoop()); + public Trigger leftBumper() { + return leftBumper(getScheduler().getDefaultEventLoop()); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the given loop. */ - public Trigger leftShoulder(EventLoop loop) { - return button(Gamepad.Button.kLeftShoulder.value, loop); + public Trigger leftBumper(EventLoop loop) { + return button(Gamepad.Button.kLeftBumper.value, loop); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the {@link Scheduler#getDefaultEventLoop() default scheduler event loop} on the scheduler * passed to the controller's constructor, or the {@link Scheduler#getDefault default * scheduler} if a scheduler was not explicitly provided. - * @see #rightShoulder(EventLoop) + * @see #rightBumper(EventLoop) */ - public Trigger rightShoulder() { - return rightShoulder(getScheduler().getDefaultEventLoop()); + public Trigger rightBumper() { + return rightBumper(getScheduler().getDefaultEventLoop()); } /** - * Constructs a Trigger instance around the right shoulder button's digital signal. + * Constructs a Trigger instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return a Trigger instance representing the right shoulder button's digital signal attached to + * @return a Trigger instance representing the right bumper button's digital signal attached to * the given loop. */ - public Trigger rightShoulder(EventLoop loop) { - return button(Gamepad.Button.kRightShoulder.value, loop); + public Trigger rightBumper(EventLoop loop) { + return button(Gamepad.Button.kRightBumper.value, loop); } /** diff --git a/wpilibc/src/main/native/cpp/driverstation/Gamepad.cpp b/wpilibc/src/main/native/cpp/driverstation/Gamepad.cpp index cc808f9694a..d4c2b6626b8 100644 --- a/wpilibc/src/main/native/cpp/driverstation/Gamepad.cpp +++ b/wpilibc/src/main/native/cpp/driverstation/Gamepad.cpp @@ -202,37 +202,36 @@ BooleanEvent Gamepad::RightStick(EventLoop* loop) const { return BooleanEvent(loop, [this]() { return this->GetRightStickButton(); }); } -bool Gamepad::GetLeftShoulderButton() const { - return GetRawButton(Button::kLeftShoulder); +bool Gamepad::GetLeftBumperButton() const { + return GetRawButton(Button::kLeftBumper); } -bool Gamepad::GetLeftShoulderButtonPressed() { - return GetRawButtonPressed(Button::kLeftShoulder); +bool Gamepad::GetLeftBumperButtonPressed() { + return GetRawButtonPressed(Button::kLeftBumper); } -bool Gamepad::GetLeftShoulderButtonReleased() { - return GetRawButtonReleased(Button::kLeftShoulder); +bool Gamepad::GetLeftBumperButtonReleased() { + return GetRawButtonReleased(Button::kLeftBumper); } -BooleanEvent Gamepad::LeftShoulder(EventLoop* loop) const { - return BooleanEvent(loop, [this]() { return this->GetLeftShoulderButton(); }); +BooleanEvent Gamepad::LeftBumper(EventLoop* loop) const { + return BooleanEvent(loop, [this]() { return this->GetLeftBumperButton(); }); } -bool Gamepad::GetRightShoulderButton() const { - return GetRawButton(Button::kRightShoulder); +bool Gamepad::GetRightBumperButton() const { + return GetRawButton(Button::kRightBumper); } -bool Gamepad::GetRightShoulderButtonPressed() { - return GetRawButtonPressed(Button::kRightShoulder); +bool Gamepad::GetRightBumperButtonPressed() { + return GetRawButtonPressed(Button::kRightBumper); } -bool Gamepad::GetRightShoulderButtonReleased() { - return GetRawButtonReleased(Button::kRightShoulder); +bool Gamepad::GetRightBumperButtonReleased() { + return GetRawButtonReleased(Button::kRightBumper); } -BooleanEvent Gamepad::RightShoulder(EventLoop* loop) const { - return BooleanEvent(loop, - [this]() { return this->GetRightShoulderButton(); }); +BooleanEvent Gamepad::RightBumper(EventLoop* loop) const { + return BooleanEvent(loop, [this]() { return this->GetRightBumperButton(); }); } bool Gamepad::GetDpadUpButton() const { @@ -528,11 +527,11 @@ void Gamepad::InitSendable(wpi::util::SendableBuilder& builder) { "RightStick", [this] { return GetButtonForSendable(Button::kRightStick); }, nullptr); builder.AddBooleanProperty( - "LeftShoulder", - [this] { return GetButtonForSendable(Button::kLeftShoulder); }, nullptr); + "LeftBumper", + [this] { return GetButtonForSendable(Button::kLeftBumper); }, nullptr); builder.AddBooleanProperty( - "RightShoulder", - [this] { return GetButtonForSendable(Button::kRightShoulder); }, nullptr); + "RightBumper", + [this] { return GetButtonForSendable(Button::kRightBumper); }, nullptr); builder.AddBooleanProperty( "DpadUp", [this] { return GetButtonForSendable(Button::kDpadUp); }, nullptr); diff --git a/wpilibc/src/main/native/cpp/simulation/GamepadSim.cpp b/wpilibc/src/main/native/cpp/simulation/GamepadSim.cpp index c643142449b..a9666eda78f 100644 --- a/wpilibc/src/main/native/cpp/simulation/GamepadSim.cpp +++ b/wpilibc/src/main/native/cpp/simulation/GamepadSim.cpp @@ -81,12 +81,12 @@ void GamepadSim::SetRightStickButton(bool value) { SetRawButton(Gamepad::Button::kRightStick, value); } -void GamepadSim::SetLeftShoulderButton(bool value) { - SetRawButton(Gamepad::Button::kLeftShoulder, value); +void GamepadSim::SetLeftBumperButton(bool value) { + SetRawButton(Gamepad::Button::kLeftBumper, value); } -void GamepadSim::SetRightShoulderButton(bool value) { - SetRawButton(Gamepad::Button::kRightShoulder, value); +void GamepadSim::SetRightBumperButton(bool value) { + SetRawButton(Gamepad::Button::kRightBumper, value); } void GamepadSim::SetDpadUpButton(bool value) { diff --git a/wpilibc/src/main/native/include/wpi/driverstation/Gamepad.hpp b/wpilibc/src/main/native/include/wpi/driverstation/Gamepad.hpp index 3ab751c2645..034d362df0f 100644 --- a/wpilibc/src/main/native/include/wpi/driverstation/Gamepad.hpp +++ b/wpilibc/src/main/native/include/wpi/driverstation/Gamepad.hpp @@ -409,66 +409,66 @@ class Gamepad : public GenericHID, BooleanEvent RightStick(EventLoop* loop) const; /** - * Read the value of the right shoulder button on the controller. + * Read the value of the right bumper button on the controller. * * @return The state of the button. */ - bool GetLeftShoulderButton() const; + bool GetLeftBumperButton() const; /** - * Whether the right shoulder button was pressed since the last check. + * Whether the right bumper button was pressed since the last check. * * @return Whether the button was pressed since the last check. */ - bool GetLeftShoulderButtonPressed(); + bool GetLeftBumperButtonPressed(); /** - * Whether the right shoulder button was released since the last check. + * Whether the right bumper button was released since the last check. * * @return Whether the button was released since the last check. */ - bool GetLeftShoulderButtonReleased(); + bool GetLeftBumperButtonReleased(); /** - * Constructs an event instance around the right shoulder button's + * Constructs an event instance around the right bumper button's * digital signal. * * @param loop the event loop instance to attach the event to. - * @return an event instance representing the right shoulder button's + * @return an event instance representing the right bumper button's * digital signal attached to the given loop. */ - BooleanEvent LeftShoulder(EventLoop* loop) const; + BooleanEvent LeftBumper(EventLoop* loop) const; /** - * Read the value of the right shoulder button on the controller. + * Read the value of the right bumper button on the controller. * * @return The state of the button. */ - bool GetRightShoulderButton() const; + bool GetRightBumperButton() const; /** - * Whether the right shoulder button was pressed since the last check. + * Whether the right bumper button was pressed since the last check. * * @return Whether the button was pressed since the last check. */ - bool GetRightShoulderButtonPressed(); + bool GetRightBumperButtonPressed(); /** - * Whether the right shoulder button was released since the last check. + * Whether the right bumper button was released since the last check. * * @return Whether the button was released since the last check. */ - bool GetRightShoulderButtonReleased(); + bool GetRightBumperButtonReleased(); /** - * Constructs an event instance around the right shoulder button's + * Constructs an event instance around the right bumper button's * digital signal. * * @param loop the event loop instance to attach the event to. - * @return an event instance representing the right shoulder button's + * @return an event instance representing the right bumper button's * digital signal attached to the given loop. */ - BooleanEvent RightShoulder(EventLoop* loop) const; + BooleanEvent RightBumper(EventLoop* loop) const; /** * Read the value of the D-pad up button on the controller. @@ -955,10 +955,10 @@ class Gamepad : public GenericHID, static constexpr int kLeftStick = 7; /// Right stick button. static constexpr int kRightStick = 8; - /// Right shoulder button. - static constexpr int kLeftShoulder = 9; - /// Right shoulder button. - static constexpr int kRightShoulder = 10; + /// right bumper button. + static constexpr int kLeftBumper = 9; + /// right bumper button. + static constexpr int kRightBumper = 10; /// D-pad up button. static constexpr int kDpadUp = 11; /// D-pad down button. diff --git a/wpilibc/src/main/native/include/wpi/simulation/GamepadSim.hpp b/wpilibc/src/main/native/include/wpi/simulation/GamepadSim.hpp index af9fd5f1148..bd98c0de6be 100644 --- a/wpilibc/src/main/native/include/wpi/simulation/GamepadSim.hpp +++ b/wpilibc/src/main/native/include/wpi/simulation/GamepadSim.hpp @@ -137,18 +137,18 @@ class GamepadSim : public GenericHIDSim { void SetRightStickButton(bool value); /** - * Change the value of the right shoulder button on the controller. + * Change the value of the right bumper button on the controller. * * @param value the new value */ - void SetLeftShoulderButton(bool value); + void SetLeftBumperButton(bool value); /** - * Change the value of the right shoulder button on the controller. + * Change the value of the right bumper button on the controller. * * @param value the new value */ - void SetRightShoulderButton(bool value); + void SetRightBumperButton(bool value); /** * Change the value of the D-pad up button on the controller. diff --git a/wpilibc/src/main/python/semiwrap/Gamepad.yml b/wpilibc/src/main/python/semiwrap/Gamepad.yml index a70d6464cf4..ba7d0b2c449 100644 --- a/wpilibc/src/main/python/semiwrap/Gamepad.yml +++ b/wpilibc/src/main/python/semiwrap/Gamepad.yml @@ -54,14 +54,14 @@ classes: GetRightStickButtonPressed: GetRightStickButtonReleased: RightStick: - GetLeftShoulderButton: - GetLeftShoulderButtonPressed: - GetLeftShoulderButtonReleased: - LeftShoulder: - GetRightShoulderButton: - GetRightShoulderButtonPressed: - GetRightShoulderButtonReleased: - RightShoulder: + GetLeftBumperButton: + GetLeftBumperButtonPressed: + GetLeftBumperButtonReleased: + LeftBumper: + GetRightBumperButton: + GetRightBumperButtonPressed: + GetRightBumperButtonReleased: + RightBumper: GetDpadUpButton: GetDpadUpButtonPressed: GetDpadUpButtonReleased: @@ -134,8 +134,8 @@ classes: kStart: kLeftStick: kRightStick: - kLeftShoulder: - kRightShoulder: + kLeftBumper: + kRightBumper: kDpadUp: kDpadDown: kDpadLeft: diff --git a/wpilibc/src/main/python/semiwrap/simulation/GamepadSim.yml b/wpilibc/src/main/python/semiwrap/simulation/GamepadSim.yml index a9572823aae..da3ab5e412d 100644 --- a/wpilibc/src/main/python/semiwrap/simulation/GamepadSim.yml +++ b/wpilibc/src/main/python/semiwrap/simulation/GamepadSim.yml @@ -24,8 +24,8 @@ classes: SetStartButton: SetLeftStickButton: SetRightStickButton: - SetLeftShoulderButton: - SetRightShoulderButton: + SetLeftBumperButton: + SetRightBumperButton: SetDpadUpButton: SetDpadDownButton: SetDpadLeftButton: diff --git a/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/RobotContainer.cpp index 295d5426e87..c85071a518c 100644 --- a/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/RobotContainer.cpp @@ -24,8 +24,8 @@ RobotContainer::RobotContainer() { void RobotContainer::ConfigureButtonBindings() { // Configure your button bindings here - // While holding the shoulder button, drive at half speed - m_driverController.RightShoulder() + // While holding the bumper button, drive at half speed + m_driverController.RightBumper() .OnTrue(m_driveHalfSpeed.get()) .OnFalse(m_driveFullSpeed.get()); diff --git a/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/RobotContainer.cpp index 55772788188..e439256e776 100644 --- a/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/RobotContainer.cpp @@ -40,7 +40,7 @@ void RobotContainer::ConfigureButtonBindings() { // Release the hatch when the 'West Face' button is pressed. m_driverController.WestFace().OnTrue(m_hatch.ReleaseHatchCommand()); // While holding Right Bumper, drive at half speed - m_driverController.RightShoulder() + m_driverController.RightBumper() .OnTrue(wpi::cmd::cmd::RunOnce([this] { m_drive.SetMaxOutput(0.5); }, {})) .OnFalse( wpi::cmd::cmd::RunOnce([this] { m_drive.SetMaxOutput(1.0); }, {})); diff --git a/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional/cpp/RobotContainer.cpp index 70a58688c8c..255c3093a84 100644 --- a/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional/cpp/RobotContainer.cpp @@ -46,9 +46,9 @@ void RobotContainer::ConfigureButtonBindings() { // Release the hatch when the 'East Face' button is pressed. wpi::cmd::JoystickButton(&m_driverController, wpi::Gamepad::Button::kEastFace) .OnTrue(ReleaseHatch(&m_hatch).ToPtr()); - // While holding the shoulder button, drive at half speed + // While holding the bumper button, drive at half speed wpi::cmd::JoystickButton(&m_driverController, - wpi::Gamepad::Button::kRightShoulder) + wpi::Gamepad::Button::kRightBumper) .WhileTrue(HalveDriveSpeed(&m_drive).ToPtr()); } diff --git a/wpilibcExamples/src/main/cpp/examples/StateSpaceArm/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/examples/StateSpaceArm/cpp/Robot.cpp index e0ece933813..0fd1d0d8058 100644 --- a/wpilibcExamples/src/main/cpp/examples/StateSpaceArm/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/examples/StateSpaceArm/cpp/Robot.cpp @@ -112,7 +112,7 @@ class Robot : public wpi::TimedRobot { // Sets the target position of our arm. This is similar to setting the // setpoint of a PID controller. wpi::math::TrapezoidProfile::State goal; - if (m_joystick.GetRightShoulderButton()) { + if (m_joystick.GetRightBumperButton()) { // We pressed the bumper, so let's set our next reference goal = {kRaisedPosition, 0_rad_per_s}; } else { diff --git a/wpilibcExamples/src/main/cpp/examples/StateSpaceElevator/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/examples/StateSpaceElevator/cpp/Robot.cpp index 591855c5869..080cb6cb5b7 100644 --- a/wpilibcExamples/src/main/cpp/examples/StateSpaceElevator/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/examples/StateSpaceElevator/cpp/Robot.cpp @@ -112,7 +112,7 @@ class Robot : public wpi::TimedRobot { // Sets the target height of our elevator. This is similar to setting the // setpoint of a PID controller. wpi::math::TrapezoidProfile::State goal; - if (m_joystick.GetRightShoulderButton()) { + if (m_joystick.GetRightBumperButton()) { // We pressed the bumper, so let's set our next reference goal = {kRaisedPosition, 0_fps}; } else { diff --git a/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheel/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheel/cpp/Robot.cpp index 7aafdf128d4..39345c260ee 100644 --- a/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheel/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheel/cpp/Robot.cpp @@ -91,7 +91,7 @@ class Robot : public wpi::TimedRobot { void TeleopPeriodic() override { // Sets the target speed of our flywheel. This is similar to setting the // setpoint of a PID controller. - if (m_joystick.GetRightShoulderButton()) { + if (m_joystick.GetRightBumperButton()) { // We pressed the bumper, so let's set our next reference m_loop.SetNextR(wpi::math::Vectord<1>{kSpinup.value()}); } else { diff --git a/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId/cpp/Robot.cpp index e77fe6124c8..6b546c207c1 100644 --- a/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId/cpp/Robot.cpp +++ b/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId/cpp/Robot.cpp @@ -88,7 +88,7 @@ class Robot : public wpi::TimedRobot { void TeleopPeriodic() override { // Sets the target speed of our flywheel. This is similar to setting the // setpoint of a PID controller. - if (m_joystick.GetRightShoulderButton()) { + if (m_joystick.GetRightBumperButton()) { // We pressed the bumper, so let's set our next reference m_loop.SetNextR(wpi::math::Vectord<1>{kSpinup.value()}); } else { diff --git a/wpilibcExamples/src/main/cpp/examples/SysIdRoutine/cpp/SysIdRoutineBot.cpp b/wpilibcExamples/src/main/cpp/examples/SysIdRoutine/cpp/SysIdRoutineBot.cpp index 4b0e3cbc8c6..c9f1e144943 100644 --- a/wpilibcExamples/src/main/cpp/examples/SysIdRoutine/cpp/SysIdRoutineBot.cpp +++ b/wpilibcExamples/src/main/cpp/examples/SysIdRoutine/cpp/SysIdRoutineBot.cpp @@ -17,29 +17,29 @@ void SysIdRoutineBot::ConfigureBindings() { // Using bumpers as a modifier and combining it with the buttons so that we // can have both sets of bindings at once - (m_driverController.SouthFace() && m_driverController.RightShoulder()) + (m_driverController.SouthFace() && m_driverController.RightBumper()) .WhileTrue( m_drive.SysIdQuasistatic(wpi::cmd::sysid::Direction::kForward)); - (m_driverController.EastFace() && m_driverController.RightShoulder()) + (m_driverController.EastFace() && m_driverController.RightBumper()) .WhileTrue( m_drive.SysIdQuasistatic(wpi::cmd::sysid::Direction::kReverse)); - (m_driverController.WestFace() && m_driverController.RightShoulder()) + (m_driverController.WestFace() && m_driverController.RightBumper()) .WhileTrue(m_drive.SysIdDynamic(wpi::cmd::sysid::Direction::kForward)); - (m_driverController.NorthFace() && m_driverController.RightShoulder()) + (m_driverController.NorthFace() && m_driverController.RightBumper()) .WhileTrue(m_drive.SysIdDynamic(wpi::cmd::sysid::Direction::kReverse)); m_shooter.SetDefaultCommand(m_shooter.RunShooterCommand( [this] { return m_driverController.GetLeftTriggerAxis(); })); - (m_driverController.SouthFace() && m_driverController.LeftShoulder()) + (m_driverController.SouthFace() && m_driverController.LeftBumper()) .WhileTrue( m_shooter.SysIdQuasistatic(wpi::cmd::sysid::Direction::kForward)); - (m_driverController.EastFace() && m_driverController.LeftShoulder()) + (m_driverController.EastFace() && m_driverController.LeftBumper()) .WhileTrue( m_shooter.SysIdQuasistatic(wpi::cmd::sysid::Direction::kReverse)); - (m_driverController.WestFace() && m_driverController.LeftShoulder()) + (m_driverController.WestFace() && m_driverController.LeftBumper()) .WhileTrue(m_shooter.SysIdDynamic(wpi::cmd::sysid::Direction::kForward)); - (m_driverController.NorthFace() && m_driverController.LeftShoulder()) + (m_driverController.NorthFace() && m_driverController.LeftBumper()) .WhileTrue(m_shooter.SysIdDynamic(wpi::cmd::sysid::Direction::kReverse)); } diff --git a/wpilibj/src/main/java/org/wpilib/driverstation/Gamepad.java b/wpilibj/src/main/java/org/wpilib/driverstation/Gamepad.java index c8d3f4b682e..0a3dac06240 100644 --- a/wpilibj/src/main/java/org/wpilib/driverstation/Gamepad.java +++ b/wpilibj/src/main/java/org/wpilib/driverstation/Gamepad.java @@ -42,10 +42,10 @@ public enum Button { kLeftStick(7), /** Right stick button. */ kRightStick(8), - /** Right shoulder button. */ - kLeftShoulder(9), - /** Right shoulder button. */ - kRightShoulder(10), + /** Left bumper button. */ + kLeftBumper(9), + /** Right bumper button. */ + kRightBumper(10), /** D-pad up button. */ kDpadUp(11), /** D-pad down button. */ @@ -600,79 +600,79 @@ public BooleanEvent rightStick(EventLoop loop) { } /** - * Read the value of the right shoulder button on the controller. + * Read the value of the right bumper button on the controller. * * @return The state of the button. */ - public boolean getLeftShoulderButton() { - return getRawButton(Button.kLeftShoulder.value); + public boolean getLeftBumperButton() { + return getRawButton(Button.kLeftBumper.value); } /** - * Whether the right shoulder button was pressed since the last check. + * Whether the right bumper button was pressed since the last check. * * @return Whether the button was pressed since the last check. */ - public boolean getLeftShoulderButtonPressed() { - return getRawButtonPressed(Button.kLeftShoulder.value); + public boolean getLeftBumperButtonPressed() { + return getRawButtonPressed(Button.kLeftBumper.value); } /** - * Whether the right shoulder button was released since the last check. + * Whether the right bumper button was released since the last check. * * @return Whether the button was released since the last check. */ - public boolean getLeftShoulderButtonReleased() { - return getRawButtonReleased(Button.kLeftShoulder.value); + public boolean getLeftBumperButtonReleased() { + return getRawButtonReleased(Button.kLeftBumper.value); } /** - * Constructs an event instance around the right shoulder button's digital signal. + * Constructs an event instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return an event instance representing the right shoulder button's digital signal attached to - * the given loop. + * @return an event instance representing the right bumper button's digital signal attached to the + * given loop. */ - public BooleanEvent leftShoulder(EventLoop loop) { - return button(Button.kLeftShoulder.value, loop); + public BooleanEvent leftBumper(EventLoop loop) { + return button(Button.kLeftBumper.value, loop); } /** - * Read the value of the right shoulder button on the controller. + * Read the value of the right bumper button on the controller. * * @return The state of the button. */ - public boolean getRightShoulderButton() { - return getRawButton(Button.kRightShoulder.value); + public boolean getRightBumperButton() { + return getRawButton(Button.kRightBumper.value); } /** - * Whether the right shoulder button was pressed since the last check. + * Whether the right bumper button was pressed since the last check. * * @return Whether the button was pressed since the last check. */ - public boolean getRightShoulderButtonPressed() { - return getRawButtonPressed(Button.kRightShoulder.value); + public boolean getRightBumperButtonPressed() { + return getRawButtonPressed(Button.kRightBumper.value); } /** - * Whether the right shoulder button was released since the last check. + * Whether the right bumper button was released since the last check. * * @return Whether the button was released since the last check. */ - public boolean getRightShoulderButtonReleased() { - return getRawButtonReleased(Button.kRightShoulder.value); + public boolean getRightBumperButtonReleased() { + return getRawButtonReleased(Button.kRightBumper.value); } /** - * Constructs an event instance around the right shoulder button's digital signal. + * Constructs an event instance around the right bumper button's digital signal. * * @param loop the event loop instance to attach the event to. - * @return an event instance representing the right shoulder button's digital signal attached to - * the given loop. + * @return an event instance representing the right bumper button's digital signal attached to the + * given loop. */ - public BooleanEvent rightShoulder(EventLoop loop) { - return button(Button.kRightShoulder.value, loop); + public BooleanEvent rightBumper(EventLoop loop) { + return button(Button.kRightBumper.value, loop); } /** @@ -1281,9 +1281,9 @@ public void initSendable(SendableBuilder builder) { builder.addBooleanProperty( "RightStick", () -> getButtonForSendable(Button.kRightStick.value), null); builder.addBooleanProperty( - "LeftShoulder", () -> getButtonForSendable(Button.kLeftShoulder.value), null); + "LeftBumper", () -> getButtonForSendable(Button.kLeftBumper.value), null); builder.addBooleanProperty( - "RightShoulder", () -> getButtonForSendable(Button.kRightShoulder.value), null); + "RightBumper", () -> getButtonForSendable(Button.kRightBumper.value), null); builder.addBooleanProperty("DpadUp", () -> getButtonForSendable(Button.kDpadUp.value), null); builder.addBooleanProperty( "DpadDown", () -> getButtonForSendable(Button.kDpadDown.value), null); diff --git a/wpilibj/src/main/java/org/wpilib/simulation/GamepadSim.java b/wpilibj/src/main/java/org/wpilib/simulation/GamepadSim.java index 896de2cf8e2..f6b7f773c5e 100644 --- a/wpilibj/src/main/java/org/wpilib/simulation/GamepadSim.java +++ b/wpilibj/src/main/java/org/wpilib/simulation/GamepadSim.java @@ -170,21 +170,21 @@ public void setRightStickButton(boolean value) { } /** - * Change the value of the right shoulder button on the controller. + * Change the value of the right bumper button on the controller. * * @param value the new value */ - public void setLeftShoulderButton(boolean value) { - setRawButton(Gamepad.Button.kLeftShoulder.value, value); + public void setLeftBumperButton(boolean value) { + setRawButton(Gamepad.Button.kLeftBumper.value, value); } /** - * Change the value of the right shoulder button on the controller. + * Change the value of the right bumper button on the controller. * * @param value the new value */ - public void setRightShoulderButton(boolean value) { - setRawButton(Gamepad.Button.kRightShoulder.value, value); + public void setRightBumperButton(boolean value) { + setRawButton(Gamepad.Button.kRightBumper.value, value); } /** diff --git a/wpilibjExamples/src/main/java/org/wpilib/examples/drivedistanceoffboard/RobotContainer.java b/wpilibjExamples/src/main/java/org/wpilib/examples/drivedistanceoffboard/RobotContainer.java index bdd665f6ee9..ec33f13f6ea 100644 --- a/wpilibjExamples/src/main/java/org/wpilib/examples/drivedistanceoffboard/RobotContainer.java +++ b/wpilibjExamples/src/main/java/org/wpilib/examples/drivedistanceoffboard/RobotContainer.java @@ -53,7 +53,7 @@ public 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 diff --git a/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbotinlined/RobotContainer.java b/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbotinlined/RobotContainer.java index 8d8e05d6c27..4cbc5c7cd8e 100644 --- a/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbotinlined/RobotContainer.java +++ b/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbotinlined/RobotContainer.java @@ -81,7 +81,7 @@ private void configureButtonBindings() { 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))); } diff --git a/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbottraditional/RobotContainer.java b/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbottraditional/RobotContainer.java index 6bacd95485b..8aac9cd196d 100644 --- a/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbottraditional/RobotContainer.java +++ b/wpilibjExamples/src/main/java/org/wpilib/examples/hatchbottraditional/RobotContainer.java @@ -88,8 +88,8 @@ private void configureButtonBindings() { // 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)); } diff --git a/wpilibjExamples/src/main/java/org/wpilib/examples/sysidroutine/SysIdRoutineBot.java b/wpilibjExamples/src/main/java/org/wpilib/examples/sysidroutine/SysIdRoutineBot.java index 072a427f567..04a623c6195 100644 --- a/wpilibjExamples/src/main/java/org/wpilib/examples/sysidroutine/SysIdRoutineBot.java +++ b/wpilibjExamples/src/main/java/org/wpilib/examples/sysidroutine/SysIdRoutineBot.java @@ -46,19 +46,19 @@ public void configureBindings() { // 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 void configureBindings() { 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)); }