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:
@@ -236,47 +236,47 @@ public class CommandGamepad extends CommandGenericHID {
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user