mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[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:
@@ -873,22 +873,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,10 +181,10 @@ double CommandGamepad::GetRightY() const {
|
||||
return m_gamepad->GetRightY();
|
||||
}
|
||||
|
||||
double CommandGamepad::GetLeftTriggerAxis() const {
|
||||
return m_gamepad->GetLeftTriggerAxis();
|
||||
double CommandGamepad::GetLeftTrigger() const {
|
||||
return m_gamepad->GetLeftTrigger();
|
||||
}
|
||||
|
||||
double CommandGamepad::GetRightTriggerAxis() const {
|
||||
return m_gamepad->GetRightTriggerAxis();
|
||||
double CommandGamepad::GetRightTrigger() const {
|
||||
return m_gamepad->GetRightTrigger();
|
||||
}
|
||||
|
||||
@@ -494,20 +494,20 @@ class CommandGamepad {
|
||||
double GetRightY() const;
|
||||
|
||||
/**
|
||||
* Get the left trigger axis value of the controller. Note that this axis is
|
||||
* 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.
|
||||
*/
|
||||
double GetLeftTriggerAxis() const;
|
||||
double GetLeftTrigger() const;
|
||||
|
||||
/**
|
||||
* Get the right trigger axis value of the controller. Note that this axis is
|
||||
* 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.
|
||||
*/
|
||||
double GetRightTriggerAxis() const;
|
||||
double GetRightTrigger() const;
|
||||
|
||||
private:
|
||||
CommandGenericHID* m_hid;
|
||||
|
||||
Reference in New Issue
Block a user