Remove deprecated code (#8656)

This commit is contained in:
Gold856
2026-03-15 00:28:31 -04:00
committed by GitHub
parent f1adce4cf7
commit d1fba06851
52 changed files with 10 additions and 1135 deletions

View File

@@ -53,45 +53,7 @@ bool {{ ConsoleName }}Controller::Get{{ capitalize_first(button.name) }}ButtonRe
BooleanEvent {{ ConsoleName }}Controller::{{ capitalize_first(button.name) }}(EventLoop* loop) const {
return BooleanEvent(loop, [this]() { return this->Get{{ capitalize_first(button.name) }}Button(); });
}
{% endfor -%}
{% if ConsoleName == "Xbox" or ConsoleName == "Stadia"%}
bool {{ ConsoleName }}Controller::GetLeftBumper() const {
return GetRawButton(Button::kLeftBumper);
}
bool {{ ConsoleName }}Controller::GetRightBumper() const {
return GetRawButton(Button::kRightBumper);
}
bool {{ ConsoleName }}Controller::GetLeftBumperPressed() {
return GetRawButtonPressed(Button::kLeftBumper);
}
bool {{ ConsoleName }}Controller::GetRightBumperPressed() {
return GetRawButtonPressed(Button::kRightBumper);
}
bool {{ ConsoleName }}Controller::GetLeftBumperReleased() {
return GetRawButtonReleased(Button::kLeftBumper);
}
bool {{ ConsoleName }}Controller::GetRightBumperReleased() {
return GetRawButtonReleased(Button::kRightBumper);
}
{%- elif ConsoleName == "PS4" or ConsoleName == "PS5" %}
bool {{ ConsoleName }}Controller::GetTouchpad() const {
return GetRawButton(Button::kTouchpad);
}
bool {{ ConsoleName }}Controller::GetTouchpadPressed() {
return GetRawButtonPressed(Button::kTouchpad);
}
bool {{ ConsoleName }}Controller::GetTouchpadReleased() {
return GetRawButtonReleased(Button::kTouchpad);
}
{%- endif %}
{% endfor %}
void {{ ConsoleName }}Controller::InitSendable(wpi::util::SendableBuilder& builder) {
builder.SetSmartDashboardType("HID");
builder.PublishConstString("ControllerType", "{{ ConsoleName }}");

View File

@@ -116,106 +116,7 @@ class {{ ConsoleName }}Controller : public GenericHID,
* digital signal attached to the given loop.
*/
BooleanEvent {{ capitalize_first(button.name) }}(EventLoop* loop) const;
{% 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 GetLeftBumperButton instead. This function is deprecated
* for removal to make function names consistent to allow the HID classes to
* be automatically generated.
*/
[[deprecated("Use GetLeftBumperButton instead")]]
bool GetLeftBumper() const;
/**
* Read the value of the right bumper (RB) button on the controller.
*
* @return the state of the button
* @deprecated Use GetRightBumperButton instead. This function is deprecated
* for removal to make function names consistent to allow the HID classes to
* be automatically generated.
*/
[[deprecated("Use GetRightBumperButton instead")]]
bool GetRightBumper() const;
/**
* Whether the left bumper (LB) was pressed since the last check.
*
* @return Whether the button was pressed since the last check
* @deprecated Use GetLeftBumperButtonPressed instead. This function is
* deprecated for removal to make function names consistent to allow the HID
* classes to be automatically generated.
*/
[[deprecated("Use GetLeftBumperButtonPressed instead")]]
bool GetLeftBumperPressed();
/**
* Whether the right bumper (RB) was pressed since the last check.
*
* @return Whether the button was pressed since the last check
* @deprecated Use GetRightBumperButtonPressed instead. This function is
* deprecated for removal to make function names consistent to allow the HID
* classes to be automatically generated.
*/
[[deprecated("Use GetRightBumperButtonPressed instead")]]
bool GetRightBumperPressed();
/**
* Whether the left bumper (LB) was released since the last check.
*
* @return Whether the button was released since the last check.
* @deprecated Use GetLeftBumperButtonReleased instead. This function is
* deprecated for removal to make function names consistent to allow the HID
* classes to be automatically generated.
*/
[[deprecated("Use GetLeftBumperButtonReleased instead")]]
bool GetLeftBumperReleased();
/**
* Whether the right bumper (RB) was released since the last check.
*
* @return Whether the button was released since the last check.
* @deprecated Use GetRightBumperButtonReleased instead. This function is
* deprecated for removal to make function names consistent to allow the HID
* classes to be automatically generated.
*/
[[deprecated("Use GetRightBumperButtonReleased instead")]]
bool GetRightBumperReleased();
{% elif ConsoleName == "PS4" or ConsoleName == "PS5" %}
/**
* Read the value of the touchpad button on the controller.
*
* @return The state of the button.
* @deprecated Use GetTouchpadButton instead. This function is deprecated for
* removal to make function names consistent to allow the HID classes to be
* automatically generated.
*/
[[deprecated("Use GetTouchpadButton instead")]]
bool GetTouchpad() const;
/**
* Whether the touchpad was pressed since the last check.
*
* @return Whether the touchpad was pressed since the last check.
* @deprecated Use GetTouchpadButtonPressed instead. This function is
* deprecated for removal to make function names consistent to allow the HID
* classes to be automatically generated.
*/
[[deprecated("Use GetTouchpadButtonPressed instead")]]
bool GetTouchpadPressed();
/**
* Whether the touchpad was released since the last check.
*
* @return Whether the touchpad was released since the last check.
* @deprecated Use GetLeftBumperButton instead. This function is deprecated
* for removal to make function names consistent to allow the HID classes to
* be automatically generated.
*/
[[deprecated("Use GetTouchpadButtonReleased instead")]]
bool GetTouchpadReleased();
{% endif %}
{% endfor %}
/** Represents a digital button on an {{ ConsoleName }}Controller. */
struct Button {
{%- for button in buttons %}