edu.wpi.first.wpilibj

## Class GamepadBase

- java.lang.Object
- - edu.wpi.first.wpilibj.GenericHID
  - - edu.wpi.first.wpilibj.GamepadBase

- Deprecated.
  Inherit directly from GenericHID instead.

      @Deprecated
      public abstract class GamepadBase
      extends GenericHID

  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 and Description
    `GamepadBase(int port)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    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.

    - ### Methods inherited from class edu.wpi.first.wpilibj.GenericHID

      `getAxisCount, getAxisType, getButtonCount, getPort, getPOV, getRawButtonPressed, getRawButtonReleased, getX, getX, getY, getY`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GamepadBase

          public GamepadBase(int port)

      Deprecated.

  - ### Method Detail

    - #### getRawAxis

          public abstract double getRawAxis(int axis)

      Deprecated.
      Description copied from class: `GenericHID`
      Get the value of the axis.
      Overrides:
        `getRawAxis` in class `GenericHID`
      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 class `GenericHID`
      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 class `GenericHID`
      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 class `GenericHID`

    - #### getType

          public abstract GenericHID.HIDType getType()

      Deprecated.
      Description copied from class: `GenericHID`
      Get the type of the HID.
      Overrides:
        `getType` in class `GenericHID`
      Returns:
        the type of the HID.

    - #### getName

          public abstract java.lang.String getName()

      Deprecated.
      Description copied from class: `GenericHID`
      Get the name of the HID.
      Overrides:
        `getName` in class `GenericHID`
      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 class `GenericHID`
      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 class `GenericHID`
      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 class `GenericHID`
      Parameters:
        `type` - Which rumble value to set
        `value` - The normalized value (0 to 1) to set the rumble to