mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Remove deprecated code (#8656)
This commit is contained in:
@@ -186,123 +186,7 @@ public class {{ ConsoleName }}Controller extends GenericHID implements Sendable
|
||||
public BooleanEvent {{ button.name }}(EventLoop loop) {
|
||||
return button(Button.k{{ capitalize_first(button.name) }}.value, loop);
|
||||
}
|
||||
{% endfor -%}
|
||||
{% if ConsoleName == "Xbox" or ConsoleName == "Stadia" %}
|
||||
/**
|
||||
* Read the value of the left bumper (LB) button on the controller.
|
||||
*
|
||||
* @return The state of the button.
|
||||
* @deprecated Use {@link getLeftBumperButton} instead. This function is deprecated for removal
|
||||
* to make function names consistent to allow the HID classes to be automatically generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getLeftBumper() {
|
||||
return getRawButton(Button.kLeftBumper.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the value of the right bumper (RB) button on the controller.
|
||||
*
|
||||
* @return The state of the button.
|
||||
* @deprecated Use {@link getRightBumperButton} instead. This function is deprecated for removal
|
||||
* to make function names consistent to allow the HID classes to be automatically generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getRightBumper() {
|
||||
return getRawButton(Button.kRightBumper.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the left bumper (LB) was pressed since the last check.
|
||||
*
|
||||
* @return Whether the button was pressed since the last check.
|
||||
* @deprecated Use {@link getLeftBumperButtonPressed} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getLeftBumperPressed() {
|
||||
return getRawButtonPressed(Button.kLeftBumper.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the right bumper (RB) was pressed since the last check.
|
||||
*
|
||||
* @return Whether the button was pressed since the last check.
|
||||
* @deprecated Use {@link getRightBumperButtonPressed} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getRightBumperPressed() {
|
||||
return getRawButtonPressed(Button.kRightBumper.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the left bumper (LB) was released since the last check.
|
||||
*
|
||||
* @return Whether the button was released since the last check.
|
||||
* @deprecated Use {@link getLeftBumperButtonReleased} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getLeftBumperReleased() {
|
||||
return getRawButtonReleased(Button.kLeftBumper.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the right bumper (RB) was released since the last check.
|
||||
*
|
||||
* @return Whether the button was released since the last check.
|
||||
* @deprecated Use {@link getRightBumperButtonReleased} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getRightBumperReleased() {
|
||||
return getRawButtonReleased(Button.kRightBumper.value);
|
||||
}
|
||||
{%- elif ConsoleName == "PS4" or ConsoleName == "PS5" %}
|
||||
/**
|
||||
* Read the value of the touchpad on the controller.
|
||||
*
|
||||
* @return The state of the touchpad.
|
||||
* @deprecated Use {@link getTouchpadButton} instead. This function is deprecated for removal to
|
||||
* make function names consistent to allow the HID classes to be automatically generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getTouchpad() {
|
||||
return getRawButton(Button.kTouchpad.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the touchpad was pressed since the last check.
|
||||
*
|
||||
* @return Whether the touchpad was pressed since the last check.
|
||||
* @deprecated Use {@link getTouchpadButtonPressed} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getTouchpadPressed() {
|
||||
return getRawButtonPressed(Button.kTouchpad.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the touchpad was released since the last check.
|
||||
*
|
||||
* @return Whether the touchpad was released since the last check.
|
||||
* @deprecated Use {@link getTouchpadButtonReleased} instead. This function is deprecated for
|
||||
* removal to make function names consistent to allow the HID classes to be automatically
|
||||
* generated.
|
||||
*/
|
||||
@Deprecated(since = "2025", forRemoval = true)
|
||||
public boolean getTouchpadReleased() {
|
||||
return getRawButtonReleased(Button.kTouchpad.value);
|
||||
}
|
||||
{%- endif %}
|
||||
|
||||
{% endfor %}
|
||||
@Override
|
||||
public void initSendable(SendableBuilder builder) {
|
||||
builder.setSmartDashboardType("HID");
|
||||
|
||||
Reference in New Issue
Block a user