|
| | Gamepad (int id) |
| | Construct a new Valor Gamepad object.
|
| |
| void | setDeadbandX (double deadband) |
| | Set the X deadband value.
|
| |
| void | setDeadbandY (double deadband) |
| | Set the Y deadband value.
|
| |
| double | leftStickX (int polynomial=1) |
| | Obtain the X value from the gamepad's left thumb stick.
|
| |
| double | leftStickXFiltered (int polynomial=1) |
| | Obtain the X value from the gamepad's left thumb stick, with filtering applied.
|
| |
| bool | leftStickXActive (int polynomial=1) |
| | Is the gamepad's left X thumb stick active?
|
| |
| double | leftStickY (int polynomial=1) |
| | Obtain the Y value from the gamepad's left thumb stick.
|
| |
| double | leftStickYFiltered (int polynomial=1) |
| | Obtain the Y value from the gamepad's left thumb stick, with filtering applied.
|
| |
| bool | leftStickYActive (int polynomial=1) |
| | Is the gamepad's left Y thumb stick active?
|
| |
| double | rightStickX (int polynomial=1) |
| | Obtain the X value from the gamepad's right thumb stick.
|
| |
| double | rightStickXFiltered (int polynomial=1) |
| | Obtain the X value from the gamepad's right thumb stick, with filtering applied.
|
| |
| bool | rightStickXActive (int polynomial=1) |
| | Is the gamepad's right X thumb stick active?
|
| |
| double | rightStickY (int polynomial=1) |
| | Obtain the Y value from the gamepad's right thumb stick.
|
| |
| double | rightStickYFiltered (int polynomial=1) |
| | Obtain the Y value from the gamepad's right thumb stick, with filtering applied.
|
| |
| bool | rightStickYActive (int polynomial=1) |
| | Is the gamepad's right Y thumb stick active?
|
| |
| double | rightTrigger () |
| | Obtain the gamepad's right trigger value.
|
| |
| bool | rightTriggerActive () |
| | Is the gamepad's right trigger active?
|
| |
| double | leftTrigger () |
| | Obtain the gamepad's left trigger value.
|
| |
| bool | leftTriggerActive () |
| | Is the gamepad's left trigger active?
|
| |
| bool | DPadUp () |
| | Is the gamepad's D-pad up button pressed?
|
| |
| bool | DPadDown () |
| | Is the gamepad's D-pad down button pressed?
|
| |
| bool | DPadLeft () |
| | Is the gamepad's D-pad left button pressed?
|
| |
| bool | DPadRight () |
| | Is the gamepad's D-pad right button pressed?
|
| |
| bool | getLeftStickButton () |
| | Get the state of the left stick button.
|
| |
| bool | getRightStickButton () |
| | Get the state of the right stick button.
|
| |
| void | setRumble (bool turnOn, double intensity=.25) |
| | Sets the rumble for the gamepad.
|
| |
| void | setJoystickFilterCacheSize (int cacheSize) |
| | Sets the cache size for the joystick filters.
|
| |
| units::angle::radian_t | getLeftStickAngle () |
| | Gets the angle of the left joystick in a field-relative perspective.
|
| |
| units::angle::radian_t | getRightStickAngle () |
| | Gets the angle of the right joystick in a field-relative perspective.
|
| |
Wrapper class for XBox gamepads.
Used to enhance the default methods in the FRC XboxController class. Additional methods are needed to make gamepad utilization easier and cleaner in subsystem classes.
Focus on providing more resolution and functions for X/Y thumb-pads.
| double valor::Gamepad::leftStickX |
( |
int | polynomial = 1 | ) |
|
Obtain the X value from the gamepad's left thumb stick.
First, the gamepad's raw X value is compared against the set deadband. See the setDeadbandX function. If the input is inside the deadband, the output is set to 0. Otherwise, the gamepad's raw X value is raised to the power of the input polynomial. For example, if polynomial parameter is 2, then the input is squared (x^2).
- Parameters
-
| polynomial | What to raise the input to the power of |
- Returns
- double X value of the gamepad's left thumb stick. Between -1 and 1
| double valor::Gamepad::leftStickY |
( |
int | polynomial = 1 | ) |
|
Obtain the Y value from the gamepad's left thumb stick.
First, the gamepad's raw Y value is compared against the set deadband. See the setDeadbandY function. If the input is inside the deadband, the output is set to 0. Otherwise, the gamepad's raw Y value is raised to the power of the input polynomial. For example, if polynomial parameter is 2, then the input is squared (x^2).
- Parameters
-
| polynomial | The exponent to apply to the gamepad's stick value |
- Returns
- double Y value of the gamepad's left thumb stick. Between -1 and 1
| double valor::Gamepad::rightStickX |
( |
int | polynomial = 1 | ) |
|
Obtain the X value from the gamepad's right thumb stick.
First, the gamepad's raw X value is compared against the set deadband. See the setDeadbandX function. If the input is inside the deadband, the output is set to 0. Otherwise, the gamepad's raw X value is raised to the power of the input polynomial. For example, if polynomial parameter is 2, then the input is squared (x^2).
- Parameters
-
| polynomial | What to raise the input to the power of |
- Returns
- double X value of the gamepad's right thumb stick. Between -1 and 1
| double valor::Gamepad::rightStickY |
( |
int | polynomial = 1 | ) |
|
Obtain the Y value from the gamepad's right thumb stick.
First, the gamepad's raw Y value is compared against the set deadband. See the setDeadbandY function. If the input is inside the deadband, the output is set to 0. Otherwise, the gamepad's raw Y value is raised to the power of the input polynomial. For example, if polynomial parameter is 2, then the input is squared (x^2).
- Parameters
-
| polynomial | The exponent to apply to the gamepad's stick value |
- Returns
- double Y value of the gamepad's right thumb stick. Between -1 and 1
| void valor::Gamepad::setDeadbandX |
( |
double | deadband | ) |
|
Set the X deadband value.
Deadband is the range of values where where the values can be varied without changing the output response.
For example, if the deadband is 0.1, then any values between -0.1 and 0.1 will all yield an output response of 0.
- Parameters
-
| deadband | Deadband value for the X direction of the gamepad. Between 0 and 1 |
| void valor::Gamepad::setDeadbandY |
( |
double | deadband | ) |
|
Set the Y deadband value.
Deadband is the range of values where where the values can be varied without changing the output response.
For example, if the deadband is 0.1, then any values between -0.1 and 0.1 will all yield an output response of 0.
- Parameters
-
| deadband | Deadband value for the Y direction of the gamepad. Between 0 and 1 |