Class CommandPS5Controller

java.lang.Object
edu.wpi.first.wpilibj2.command.button.CommandGenericHID
edu.wpi.first.wpilibj2.command.button.CommandPS5Controller

public class CommandPS5Controller
extends CommandGenericHID
A version of PS5Controller with Trigger factories for command-based.
See Also:
PS5Controller
  • Constructor Details

  • Method Details

    • getHID

      Get the underlying GenericHID object.
      Overrides:
      getHID in class CommandGenericHID
      Returns:
      the wrapped GenericHID object
    • L2

      public Trigger L2()
      Constructs an event instance around the L2 button's digital signal.
      Returns:
      an event instance representing the L2 button's digital signal attached to the default scheduler button loop.
    • L2

      public Trigger L2​(EventLoop loop)
      Constructs an event instance around the L2 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the L2 button's digital signal attached to the given loop.
    • R2

      public Trigger R2()
      Constructs an event instance around the R2 button's digital signal.
      Returns:
      an event instance representing the R2 button's digital signal attached to the default scheduler button loop.
    • R2

      public Trigger R2​(EventLoop loop)
      Constructs an event instance around the R2 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the R2 button's digital signal attached to the given loop.
    • L1

      public Trigger L1()
      Constructs an event instance around the L1 button's digital signal.
      Returns:
      an event instance representing the L1 button's digital signal attached to the default scheduler button loop.
    • L1

      public Trigger L1​(EventLoop loop)
      Constructs an event instance around the L1 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the L1 button's digital signal attached to the given loop.
    • R1

      public Trigger R1()
      Constructs an event instance around the R1 button's digital signal.
      Returns:
      an event instance representing the R1 button's digital signal attached to the default scheduler button loop.
    • R1

      public Trigger R1​(EventLoop loop)
      Constructs an event instance around the R1 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the R1 button's digital signal attached to the given loop.
    • L3

      public Trigger L3()
      Constructs an event instance around the L3 button's digital signal.
      Returns:
      an event instance representing the L3 button's digital signal attached to the default scheduler button loop.
    • L3

      public Trigger L3​(EventLoop loop)
      Constructs an event instance around the L3 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the L3 button's digital signal attached to the given loop.
    • R3

      public Trigger R3()
      Constructs an event instance around the R3 button's digital signal.
      Returns:
      an event instance representing the R3 button's digital signal attached to the default scheduler button loop.
    • R3

      public Trigger R3​(EventLoop loop)
      Constructs an event instance around the R3 button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the R3 button's digital signal attached to the given loop.
    • square

      public Trigger square()
      Constructs an event instance around the square button's digital signal.
      Returns:
      an event instance representing the square button's digital signal attached to the default scheduler button loop.
    • square

      public Trigger square​(EventLoop loop)
      Constructs an event instance around the square button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the square button's digital signal attached to the given loop.
    • cross

      public Trigger cross()
      Constructs an event instance around the cross button's digital signal.
      Returns:
      an event instance representing the cross button's digital signal attached to the default scheduler button loop.
    • cross

      public Trigger cross​(EventLoop loop)
      Constructs an event instance around the cross button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the cross button's digital signal attached to the given loop.
    • triangle

      public Trigger triangle()
      Constructs an event instance around the triangle button's digital signal.
      Returns:
      an event instance representing the triangle button's digital signal attached to the default scheduler button loop.
    • triangle

      public Trigger triangle​(EventLoop loop)
      Constructs an event instance around the triangle button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the triangle button's digital signal attached to the given loop.
    • circle

      public Trigger circle()
      Constructs an event instance around the circle button's digital signal.
      Returns:
      an event instance representing the circle button's digital signal attached to the default scheduler button loop.
    • circle

      public Trigger circle​(EventLoop loop)
      Constructs an event instance around the circle button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the circle button's digital signal attached to the given loop.
    • create

      public Trigger create()
      Constructs an event instance around the create button's digital signal.
      Returns:
      an event instance representing the create button's digital signal attached to the default scheduler button loop.
    • create

      public Trigger create​(EventLoop loop)
      Constructs an event instance around the create button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the create button's digital signal attached to the given loop.
    • PS

      public Trigger PS()
      Constructs an event instance around the PS button's digital signal.
      Returns:
      an event instance representing the PS button's digital signal attached to the default scheduler button loop.
    • PS

      public Trigger PS​(EventLoop loop)
      Constructs an event instance around the PS button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the PS button's digital signal attached to the given loop.
    • options

      public Trigger options()
      Constructs an event instance around the options button's digital signal.
      Returns:
      an event instance representing the options button's digital signal attached to the default scheduler button loop.
    • options

      public Trigger options​(EventLoop loop)
      Constructs an event instance around the options button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the options button's digital signal attached to the given loop.
    • touchpad

      public Trigger touchpad()
      Constructs an event instance around the touchpad's digital signal.
      Returns:
      an event instance representing the touchpad's digital signal attached to the default scheduler button loop.
    • touchpad

      public Trigger touchpad​(EventLoop loop)
      Constructs an event instance around the touchpad's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      an event instance representing the touchpad's digital signal attached to the given loop.
    • getLeftX

      public double getLeftX()
      Get the X axis value of left side of the controller.
      Returns:
      the axis value.
    • getRightX

      public double getRightX()
      Get the X axis value of right side of the controller.
      Returns:
      the axis value.
    • getLeftY

      public double getLeftY()
      Get the Y axis value of left side of the controller.
      Returns:
      the axis value.
    • getRightY

      public double getRightY()
      Get the Y axis value of right side of the controller.
      Returns:
      the axis value.
    • getL2Axis

      public double getL2Axis()
      Get the L2 axis value of the controller. Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].
      Returns:
      the axis value.
    • getR2Axis

      public double getR2Axis()
      Get the R2 axis value of the controller. Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].
      Returns:
      the axis value.