@Deprecated public abstract class GamepadBase extends GenericHID
GenericHID.Hand, GenericHID.HIDType, GenericHID.RumbleType
Constructor and Description |
---|
GamepadBase(int port)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBumper()
Deprecated.
Is the bumper pressed.
|
abstract boolean |
getBumper(GenericHID.Hand hand)
Deprecated.
Is the bumper pressed.
|
abstract java.lang.String |
getName()
Deprecated.
Get the name of the HID.
|
abstract int |
getPOV(int pov)
Deprecated.
Get the angle in degrees of a POV on the HID.
|
abstract int |
getPOVCount()
Deprecated.
For the current HID, return the number of POVs.
|
abstract double |
getRawAxis(int axis)
Deprecated.
Get the value of the axis.
|
abstract boolean |
getRawButton(int button)
Deprecated.
Get the button value (starting at button 1).
|
boolean |
getStickButton()
Deprecated.
|
abstract boolean |
getStickButton(GenericHID.Hand hand)
Deprecated.
|
abstract GenericHID.HIDType |
getType()
Deprecated.
Get the type of the HID.
|
abstract void |
setOutput(int outputNumber,
boolean value)
Deprecated.
Set a single HID output value for the HID.
|
abstract void |
setOutputs(int value)
Deprecated.
Set all HID output values for the HID.
|
abstract void |
setRumble(GenericHID.RumbleType type,
double value)
Deprecated.
Set the rumble output for the HID.
|
getAxisCount, getAxisType, getButtonCount, getPort, getPOV, getRawButtonPressed, getRawButtonReleased, getX, getX, getY, getY
public GamepadBase(int port)
public abstract double getRawAxis(int axis)
GenericHID
getRawAxis
in class GenericHID
axis
- The axis to read, starting at 0.public abstract boolean getBumper(GenericHID.Hand hand)
hand
- which handpublic boolean getBumper()
public abstract boolean getStickButton(GenericHID.Hand hand)
public boolean getStickButton()
public abstract boolean getRawButton(int button)
GenericHID
The buttons are returned in a single 16 bit value with one bit representing the state of each button. The appropriate button is returned as a boolean value.
getRawButton
in class GenericHID
button
- The button number to be read (starting at 1)public abstract int getPOV(int pov)
GenericHID
The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, upper-left is 315).
getPOV
in class GenericHID
pov
- The index of the POV to read (starting at 0)public abstract int getPOVCount()
GenericHID
getPOVCount
in class GenericHID
public abstract GenericHID.HIDType getType()
GenericHID
getType
in class GenericHID
public abstract java.lang.String getName()
GenericHID
getName
in class GenericHID
public abstract void setOutput(int outputNumber, boolean value)
GenericHID
setOutput
in class GenericHID
outputNumber
- The index of the output to set (1-32)value
- The value to set the output topublic abstract void setOutputs(int value)
GenericHID
setOutputs
in class GenericHID
value
- The 32 bit output value (1 bit for each output)public abstract void setRumble(GenericHID.RumbleType type, double value)
GenericHID
setRumble
in class GenericHID
type
- Which rumble value to setvalue
- The normalized value (0 to 1) to set the rumble to