Class PS4
java.lang.Object
com.stuypulse.stuylib.input.Gamepad
com.stuypulse.stuylib.input.WPIGamepad
com.stuypulse.stuylib.input.gamepads.PS4
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
Implementation of the PS4 for the
Gamepad
Class-
Field Summary
Fields inherited from class com.stuypulse.stuylib.input.Gamepad
ANALOG_THRESHOLD
-
Constructor Summary
-
Method Summary
Methods inherited from class com.stuypulse.stuylib.input.WPIGamepad
getButton, getJoystick, getRawAxis, getRawButton, hasJoystick, setRumble
Methods inherited from class com.stuypulse.stuylib.input.Gamepad
getBottomButton, getDPad, getDPadDown, getDPadLeft, getDPadRight, getDPadUp, getDPadX, getDPadY, getLeftBumper, getLeftButton, getLeftMenuButton, getLeftStick, getLeftStickButton, getLeftStickDown, getLeftStickLeft, getLeftStickRight, getLeftStickUp, getLeftTriggerButton, getLeftTriggerPressed, getRightBumper, getRightButton, getRightMenuButton, getRightStick, getRightStickButton, getRightStickDown, getRightStickLeft, getRightStickRight, getRightStickUp, getRightTriggerButton, getRightTriggerPressed, getTopButton, initSendable
-
Constructor Details
-
PS4
public PS4(int port) -
PS4
public PS4(edu.wpi.first.wpilibj.Joystick joystick)
-
-
Method Details
-
getGamepadName
- Overrides:
getGamepadName
in classWPIGamepad
- Returns:
- The name of the gamepad being used
-
getLeftX
public double getLeftX() -
getLeftY
public double getLeftY() -
getRightX
public double getRightX() -
getRightY
public double getRightY() -
getRawDPadUp
public boolean getRawDPadUp()- Overrides:
getRawDPadUp
in classGamepad
- Returns:
- If the up d-pad button is pressed
-
getRawDPadDown
public boolean getRawDPadDown()- Overrides:
getRawDPadDown
in classGamepad
- Returns:
- If the down d-pad button is pressed
-
getRawDPadLeft
public boolean getRawDPadLeft()- Overrides:
getRawDPadLeft
in classGamepad
- Returns:
- If the left d-pad button is pressed
-
getRawDPadRight
public boolean getRawDPadRight()- Overrides:
getRawDPadRight
in classGamepad
- Returns:
- If the right d-pad button is pressed
-
getRawLeftBumper
public boolean getRawLeftBumper()- Overrides:
getRawLeftBumper
in classGamepad
- Returns:
- If the left bumper is pressed
-
getRawRightBumper
public boolean getRawRightBumper()- Overrides:
getRawRightBumper
in classGamepad
- Returns:
- If the right bumper is pressed
-
getLeftTrigger
public double getLeftTrigger()- Overrides:
getLeftTrigger
in classGamepad
- Returns:
- The amount that the left trigger is pressed
-
getRightTrigger
public double getRightTrigger()- Overrides:
getRightTrigger
in classGamepad
- Returns:
- The amount that the right trigger is pressed
-
getRawLeftButton
public boolean getRawLeftButton()- Overrides:
getRawLeftButton
in classGamepad
- Returns:
- If the face button on the left is pressed
-
getRawBottomButton
public boolean getRawBottomButton()- Overrides:
getRawBottomButton
in classGamepad
- Returns:
- If the face button on the bottom is pressed
-
getRawRightButton
public boolean getRawRightButton()- Overrides:
getRawRightButton
in classGamepad
- Returns:
- If the face button on the right is pressed
-
getRawTopButton
public boolean getRawTopButton()- Overrides:
getRawTopButton
in classGamepad
- Returns:
- If the face button on the top is pressed
-
getRawLeftMenuButton
public boolean getRawLeftMenuButton()- Overrides:
getRawLeftMenuButton
in classGamepad
- Returns:
- If the left menu button is pressed
-
getRawRightMenuButton
public boolean getRawRightMenuButton()- Overrides:
getRawRightMenuButton
in classGamepad
- Returns:
- If the right menu button is pressed
-
getRawLeftStickButton
public boolean getRawLeftStickButton()- Overrides:
getRawLeftStickButton
in classGamepad
- Returns:
- If the left analog stick is pressed down
-
getRawRightStickButton
public boolean getRawRightStickButton()- Overrides:
getRawRightStickButton
in classGamepad
- Returns:
- If the right analog stick is pressed down
-