Skip to content

Commit

Permalink
[wpilib] Add explanation for HID GetBumper/Touchpad deprecations (#7304)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue authored Oct 29, 2024
1 parent 412c042 commit f03e0cd
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 35 deletions.
27 changes: 27 additions & 0 deletions wpilibc/src/generate/main/native/include/frc/hid.h.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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;
Expand All @@ -130,6 +133,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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;
Expand All @@ -138,6 +144,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand All @@ -146,6 +155,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand All @@ -154,6 +166,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand All @@ -162,6 +177,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand All @@ -170,13 +188,19 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand All @@ -185,6 +209,9 @@ class {{ ConsoleName }}Controller : public GenericHID,
* 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class {{ ConsoleName }}ControllerSim : public GenericHIDSim {
* Change the left bumper value of the joystick.
*
* @param value the new value
* @deprecated Use SetLeftBumperButton instead. This function is deprecated
* for removal to make function names consistent to allow the HID classes to
* be automatically generated.
*/
[[deprecated("Use SetLeftBumperButton instead")]]
void SetLeftBumper(bool value);
Expand All @@ -71,6 +74,9 @@ class {{ ConsoleName }}ControllerSim : public GenericHIDSim {
* Change the right bumper value of the joystick.
*
* @param value the new value
* @deprecated Use SetRightBumperButton instead. This function is deprecated
* for removal to make function names consistent to allow the HID classes to
* be automatically generated.
*/
[[deprecated("Use SetRightBumperButton instead")]]
void SetRightBumper(bool value);
Expand All @@ -79,6 +85,9 @@ class {{ ConsoleName }}ControllerSim : public GenericHIDSim {
* Change the value of the touchpad button on the controller.
*
* @param value the new value
* @deprecated Use SetTouchpadButton instead. This function is deprecated for
* removal to make function names consistent to allow the HID classes to be
* automatically generated.
*/
[[deprecated("Use SetTouchpadButton instead")]]
void SetTouchpad(bool value);
Expand Down
9 changes: 9 additions & 0 deletions wpilibc/src/generated/main/native/include/frc/PS4Controller.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions wpilibc/src/generated/main/native/include/frc/PS5Controller.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions wpilibc/src/generated/main/native/include/frc/StadiaController.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions wpilibc/src/generated/main/native/include/frc/XboxController.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f03e0cd

Please sign in to comment.