All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class PS4 extends WPIGamepad
Implementation of the PS4 for the Gamepad Class
  • Constructor Details

    • PS4

      public PS4(int port)
    • PS4

      public PS4(edu.wpi.first.wpilibj.Joystick joystick)
  • Method Details

    • getGamepadName

      public String getGamepadName()
      Overrides:
      getGamepadName in class WPIGamepad
      Returns:
      The name of the gamepad being used
    • getLeftX

      public double getLeftX()
      Overrides:
      getLeftX in class Gamepad
      Returns:
      The X position of the left analog stick
    • getLeftY

      public double getLeftY()
      Overrides:
      getLeftY in class Gamepad
      Returns:
      The Y position of the left analog stick
    • getRightX

      public double getRightX()
      Overrides:
      getRightX in class Gamepad
      Returns:
      The X position of the right analog stick
    • getRightY

      public double getRightY()
      Overrides:
      getRightY in class Gamepad
      Returns:
      The Y position of the right analog stick
    • getRawDPadUp

      public boolean getRawDPadUp()
      Overrides:
      getRawDPadUp in class Gamepad
      Returns:
      If the up d-pad button is pressed
    • getRawDPadDown

      public boolean getRawDPadDown()
      Overrides:
      getRawDPadDown in class Gamepad
      Returns:
      If the down d-pad button is pressed
    • getRawDPadLeft

      public boolean getRawDPadLeft()
      Overrides:
      getRawDPadLeft in class Gamepad
      Returns:
      If the left d-pad button is pressed
    • getRawDPadRight

      public boolean getRawDPadRight()
      Overrides:
      getRawDPadRight in class Gamepad
      Returns:
      If the right d-pad button is pressed
    • getRawLeftBumper

      public boolean getRawLeftBumper()
      Overrides:
      getRawLeftBumper in class Gamepad
      Returns:
      If the left bumper is pressed
    • getRawRightBumper

      public boolean getRawRightBumper()
      Overrides:
      getRawRightBumper in class Gamepad
      Returns:
      If the right bumper is pressed
    • getLeftTrigger

      public double getLeftTrigger()
      Overrides:
      getLeftTrigger in class Gamepad
      Returns:
      The amount that the left trigger is pressed
    • getRightTrigger

      public double getRightTrigger()
      Overrides:
      getRightTrigger in class Gamepad
      Returns:
      The amount that the right trigger is pressed
    • getRawLeftButton

      public boolean getRawLeftButton()
      Overrides:
      getRawLeftButton in class Gamepad
      Returns:
      If the face button on the left is pressed
    • getRawBottomButton

      public boolean getRawBottomButton()
      Overrides:
      getRawBottomButton in class Gamepad
      Returns:
      If the face button on the bottom is pressed
    • getRawRightButton

      public boolean getRawRightButton()
      Overrides:
      getRawRightButton in class Gamepad
      Returns:
      If the face button on the right is pressed
    • getRawTopButton

      public boolean getRawTopButton()
      Overrides:
      getRawTopButton in class Gamepad
      Returns:
      If the face button on the top is pressed
    • getRawLeftMenuButton

      public boolean getRawLeftMenuButton()
      Overrides:
      getRawLeftMenuButton in class Gamepad
      Returns:
      If the left menu button is pressed
    • getRawRightMenuButton

      public boolean getRawRightMenuButton()
      Overrides:
      getRawRightMenuButton in class Gamepad
      Returns:
      If the right menu button is pressed
    • getRawLeftStickButton

      public boolean getRawLeftStickButton()
      Overrides:
      getRawLeftStickButton in class Gamepad
      Returns:
      If the left analog stick is pressed down
    • getRawRightStickButton

      public boolean getRawRightStickButton()
      Overrides:
      getRawRightStickButton in class Gamepad
      Returns:
      If the right analog stick is pressed down