mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpilib] Prefix all NI DS specific controller classes (#8596)
Easier then the last one that put everything in a sub namespace. By prefixing the name less things break, and intellisense will be less confusing to new users during the transition.
This commit is contained in:
@@ -40,16 +40,3 @@ void {{ ConsoleName }}ControllerSim::Set{{ capitalize_first(button.name) }}Butto
|
||||
SetRawButton({{ ConsoleName }}Controller::Button::k{{ capitalize_first(button.name) }}, value);
|
||||
}
|
||||
{% endfor -%}
|
||||
{% if ConsoleName == "Xbox" %}
|
||||
void {{ ConsoleName }}ControllerSim::SetLeftBumper(bool value) {
|
||||
SetRawButton({{ ConsoleName }}Controller::Button::kLeftBumper, value);
|
||||
}
|
||||
|
||||
void {{ ConsoleName }}ControllerSim::SetRightBumper(bool value) {
|
||||
SetRawButton({{ ConsoleName }}Controller::Button::kRightBumper, value);
|
||||
}
|
||||
{% elif ConsoleName == "PS4" or ConsoleName == "PS5" %}
|
||||
void {{ ConsoleName }}ControllerSim::SetTouchpad(bool value) {
|
||||
SetRawButton({{ ConsoleName }}Controller::Button::kTouchpad, value);
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
@@ -58,40 +58,6 @@ class {{ ConsoleName }}ControllerSim : public GenericHIDSim {
|
||||
*/
|
||||
void Set{{ capitalize_first(button.name) }}Button(bool value);
|
||||
{% endfor -%}
|
||||
{% if ConsoleName == "Xbox" %}
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
{% elif ConsoleName == "PS4" or ConsoleName == "PS5" %}
|
||||
/**
|
||||
* 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);
|
||||
{% endif %}
|
||||
};
|
||||
|
||||
} // namespace sim
|
||||
|
||||
Reference in New Issue
Block a user