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 boolean
getBumper()
Deprecated.Is the bumper pressed.abstract boolean
getBumper(GenericHID.Hand hand)
Deprecated.Is the bumper pressed.abstract 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.-
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:GenericHID
Get the value of the axis.- Overrides:
getRawAxis
in 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:GenericHID
Get 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:
getRawButton
in 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:GenericHID
Get 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:
getPOV
in 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:GenericHID
For the current HID, return the number of POVs.- Overrides:
getPOVCount
in classGenericHID
-
getType
public abstract GenericHID.HIDType getType()
Deprecated.Description copied from class:GenericHID
Get the type of the HID.- Overrides:
getType
in classGenericHID
- Returns:
- the type of the HID.
-
getName
public abstract String getName()
Deprecated.Description copied from class:GenericHID
Get the name of the HID.- Overrides:
getName
in classGenericHID
- Returns:
- the name of the HID.
-
setOutput
public abstract void setOutput(int outputNumber, boolean value)
Deprecated.Description copied from class:GenericHID
Set a single HID output value for the HID.- Overrides:
setOutput
in 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:GenericHID
Set all HID output values for the HID.- Overrides:
setOutputs
in 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:GenericHID
Set the rumble output for the HID. The DS currently supports 2 rumble values, left rumble and right rumble.- Overrides:
setRumble
in classGenericHID
- Parameters:
type
- Which rumble value to setvalue
- The normalized value (0 to 1) to set the rumble to
-
-