Package edu.wpi.first.wpilibj
Class GamepadBase
- java.lang.Object
-
- edu.wpi.first.wpilibj.GenericHID
-
- edu.wpi.first.wpilibj.GamepadBase
-
@Deprecated public abstract class GamepadBase extends GenericHID
Deprecated.Inherit directly from GenericHID instead.Gamepad Interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.GenericHID
GenericHID.Hand, GenericHID.HIDType, GenericHID.RumbleType
-
-
Constructor Summary
Constructors Constructor Description GamepadBase(int port)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleangetBumper()Deprecated.Is the bumper pressed.abstract booleangetBumper(GenericHID.Hand hand)Deprecated.Is the bumper pressed.abstract StringgetName()Deprecated.Get the name of the HID.abstract intgetPOV(int pov)Deprecated.Get the angle in degrees of a POV on the HID.abstract intgetPOVCount()Deprecated.For the current HID, return the number of POVs.abstract doublegetRawAxis(int axis)Deprecated.Get the value of the axis.abstract booleangetRawButton(int button)Deprecated.Get the button value (starting at button 1).booleangetStickButton()Deprecated.abstract booleangetStickButton(GenericHID.Hand hand)Deprecated.abstract GenericHID.HIDTypegetType()Deprecated.Get the type of the HID.abstract voidsetOutput(int outputNumber, boolean value)Deprecated.Set a single HID output value for the HID.abstract voidsetOutputs(int value)Deprecated.Set all HID output values for the HID.abstract voidsetRumble(GenericHID.RumbleType type, double value)Deprecated.Set the rumble output for the HID.-
Methods inherited from class edu.wpi.first.wpilibj.GenericHID
getAxisCount, getAxisType, getButtonCount, getPort, getPOV, getRawButtonPressed, getRawButtonReleased, getX, getX, getY, getY
-
-
-
-
Method Detail
-
getRawAxis
public abstract double getRawAxis(int axis)
Deprecated.Description copied from class:GenericHIDGet the value of the axis.- Overrides:
getRawAxisin classGenericHID- Parameters:
axis- The axis to read, starting at 0.- Returns:
- The value of the axis.
-
getBumper
public abstract boolean getBumper(GenericHID.Hand hand)
Deprecated.Is the bumper pressed.- Parameters:
hand- which hand- Returns:
- true if the bumper is pressed
-
getBumper
public boolean getBumper()
Deprecated.Is the bumper pressed.- Returns:
- true if the bumper is pressed
-
getStickButton
public abstract boolean getStickButton(GenericHID.Hand hand)
Deprecated.
-
getStickButton
public boolean getStickButton()
Deprecated.
-
getRawButton
public abstract boolean getRawButton(int button)
Deprecated.Description copied from class:GenericHIDGet the button value (starting at button 1).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.
- Overrides:
getRawButtonin classGenericHID- Parameters:
button- The button number to be read (starting at 1)- Returns:
- The state of the button.
-
getPOV
public abstract int getPOV(int pov)
Deprecated.Description copied from class:GenericHIDGet the angle in degrees of a POV on the HID.The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, upper-left is 315).
- Overrides:
getPOVin classGenericHID- Parameters:
pov- The index of the POV to read (starting at 0)- Returns:
- the angle of the POV in degrees, or -1 if the POV is not pressed.
-
getPOVCount
public abstract int getPOVCount()
Deprecated.Description copied from class:GenericHIDFor the current HID, return the number of POVs.- Overrides:
getPOVCountin classGenericHID
-
getType
public abstract GenericHID.HIDType getType()
Deprecated.Description copied from class:GenericHIDGet the type of the HID.- Overrides:
getTypein classGenericHID- Returns:
- the type of the HID.
-
getName
public abstract String getName()
Deprecated.Description copied from class:GenericHIDGet the name of the HID.- Overrides:
getNamein classGenericHID- Returns:
- the name of the HID.
-
setOutput
public abstract void setOutput(int outputNumber, boolean value)Deprecated.Description copied from class:GenericHIDSet a single HID output value for the HID.- Overrides:
setOutputin classGenericHID- Parameters:
outputNumber- The index of the output to set (1-32)value- The value to set the output to
-
setOutputs
public abstract void setOutputs(int value)
Deprecated.Description copied from class:GenericHIDSet all HID output values for the HID.- Overrides:
setOutputsin classGenericHID- Parameters:
value- The 32 bit output value (1 bit for each output)
-
setRumble
public abstract void setRumble(GenericHID.RumbleType type, double value)
Deprecated.Description copied from class:GenericHIDSet the rumble output for the HID. The DS currently supports 2 rumble values, left rumble and right rumble.- Overrides:
setRumblein classGenericHID- Parameters:
type- Which rumble value to setvalue- The normalized value (0 to 1) to set the rumble to
-
-