[wpilib,cmd] Remove Axis from Gamepad Triggers (#8956)

It's a bit confusing, especially since some controllers will have this be
a 0:1 button rather than axis.
This commit is contained in:
Thad House
2026-06-12 06:42:06 -07:00
committed by GitHub
parent d6fb871a26
commit 5a7d7d50ee
11 changed files with 47 additions and 49 deletions

View File

@@ -824,22 +824,22 @@ public class CommandGamepad {
}
/**
* Get the left trigger axis value of the controller. Note that this axis is bound to the range of
* [0, 1] as opposed to the usual [-1, 1].
* Get the left trigger value of the controller. Note that this axis is bound to the range of [0,
* 1] as opposed to the usual [-1, 1].
*
* @return The axis value.
*/
public double getLeftTriggerAxis() {
return m_gamepad.getLeftTriggerAxis();
public double getLeftTrigger() {
return m_gamepad.getLeftTrigger();
}
/**
* Get the right trigger axis value of the controller. Note that this axis is bound to the range
* of [0, 1] as opposed to the usual [-1, 1].
* Get the right trigger value of the controller. Note that this axis is bound to the range of [0,
* 1] as opposed to the usual [-1, 1].
*
* @return The axis value.
*/
public double getRightTriggerAxis() {
return m_gamepad.getRightTriggerAxis();
public double getRightTrigger() {
return m_gamepad.getRightTrigger();
}
}