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
Constructors -
Method Summary
Methods inherited from class com.stuypulse.stuylib.input.WPIGamepad
getButton, getJoystick, getRawAxis, getRawButton, hasJoystick, setRumbleMethods 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:
getGamepadNamein 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:
getRawDPadUpin classGamepad- Returns:
- If the up d-pad button is pressed
-
getRawDPadDown
public boolean getRawDPadDown()- Overrides:
getRawDPadDownin classGamepad- Returns:
- If the down d-pad button is pressed
-
getRawDPadLeft
public boolean getRawDPadLeft()- Overrides:
getRawDPadLeftin classGamepad- Returns:
- If the left d-pad button is pressed
-
getRawDPadRight
public boolean getRawDPadRight()- Overrides:
getRawDPadRightin classGamepad- Returns:
- If the right d-pad button is pressed
-
getRawLeftBumper
public boolean getRawLeftBumper()- Overrides:
getRawLeftBumperin classGamepad- Returns:
- If the left bumper is pressed
-
getRawRightBumper
public boolean getRawRightBumper()- Overrides:
getRawRightBumperin classGamepad- Returns:
- If the right bumper is pressed
-
getLeftTrigger
public double getLeftTrigger()- Overrides:
getLeftTriggerin classGamepad- Returns:
- The amount that the left trigger is pressed
-
getRightTrigger
public double getRightTrigger()- Overrides:
getRightTriggerin classGamepad- Returns:
- The amount that the right trigger is pressed
-
getRawLeftButton
public boolean getRawLeftButton()- Overrides:
getRawLeftButtonin classGamepad- Returns:
- If the face button on the left is pressed
-
getRawBottomButton
public boolean getRawBottomButton()- Overrides:
getRawBottomButtonin classGamepad- Returns:
- If the face button on the bottom is pressed
-
getRawRightButton
public boolean getRawRightButton()- Overrides:
getRawRightButtonin classGamepad- Returns:
- If the face button on the right is pressed
-
getRawTopButton
public boolean getRawTopButton()- Overrides:
getRawTopButtonin classGamepad- Returns:
- If the face button on the top is pressed
-
getRawLeftMenuButton
public boolean getRawLeftMenuButton()- Overrides:
getRawLeftMenuButtonin classGamepad- Returns:
- If the left menu button is pressed
-
getRawRightMenuButton
public boolean getRawRightMenuButton()- Overrides:
getRawRightMenuButtonin classGamepad- Returns:
- If the right menu button is pressed
-
getRawLeftStickButton
public boolean getRawLeftStickButton()- Overrides:
getRawLeftStickButtonin classGamepad- Returns:
- If the left analog stick is pressed down
-
getRawRightStickButton
public boolean getRawRightStickButton()- Overrides:
getRawRightStickButtonin classGamepad- Returns:
- If the right analog stick is pressed down
-