[wpilib] Add explanation for HID GetBumper/Touchpad deprecations (#7304)

This commit is contained in:
Ryan Blue
2024-10-28 22:29:42 -04:00
committed by GitHub
parent 412c042c6c
commit f03e0cdf6a
18 changed files with 190 additions and 35 deletions

View File

@@ -526,6 +526,9 @@ class PS4Controller : 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;
@@ -533,6 +536,9 @@ class PS4Controller : public GenericHID,
* 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();
@@ -541,6 +547,9 @@ class PS4Controller : 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();

View File

@@ -526,6 +526,9 @@ class PS5Controller : 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;
@@ -533,6 +536,9 @@ class PS5Controller : public GenericHID,
* 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();
@@ -541,6 +547,9 @@ class PS5Controller : 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();

View File

@@ -541,6 +541,9 @@ class StadiaController : 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;
@@ -549,6 +552,9 @@ class StadiaController : 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;
@@ -557,6 +563,9 @@ class StadiaController : 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();
@@ -565,6 +574,9 @@ class StadiaController : 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();
@@ -573,6 +585,9 @@ class StadiaController : 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();
@@ -581,6 +596,9 @@ class StadiaController : 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();

View File

@@ -446,6 +446,9 @@ class XboxController : 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;
@@ -454,6 +457,9 @@ class XboxController : 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;
@@ -462,6 +468,9 @@ class XboxController : 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();
@@ -470,6 +479,9 @@ class XboxController : 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();
@@ -478,6 +490,9 @@ class XboxController : 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();
@@ -486,6 +501,9 @@ class XboxController : 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();

View File

@@ -177,6 +177,9 @@ class PS4ControllerSim : 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);

View File

@@ -177,6 +177,9 @@ class PS5ControllerSim : 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);

View File

@@ -149,6 +149,9 @@ class XboxControllerSim : 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);
@@ -157,6 +160,9 @@ class XboxControllerSim : 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);