Class CommandLogitechF310Controller

java.lang.Object
org.wpilib.command3.button.CommandLogitechF310Controller

public class CommandLogitechF310Controller extends Object
A version of LogitechF310Controller with Trigger factories for command-based.
See Also:
  • Constructor Details

    • CommandLogitechF310Controller

      public CommandLogitechF310Controller(int port)
      Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the default scheduler using its default event loop.
      Parameters:
      port - The port index on the Driver Station that the controller is plugged into.
    • CommandLogitechF310Controller

      public CommandLogitechF310Controller(LogitechF310Controller controller)
      Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the default scheduler using its default event loop.
      Parameters:
      controller - The LogitechF310Controller object to use for this controller.
    • CommandLogitechF310Controller

      public CommandLogitechF310Controller(Scheduler scheduler, int port)
      Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the given scheduler using its default event loop.
      Parameters:
      scheduler - The scheduler that should execute the triggered commands.
      port - The port index on the Driver Station that the controller is plugged into.
    • CommandLogitechF310Controller

      public CommandLogitechF310Controller(Scheduler scheduler, LogitechF310Controller controller)
      Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the given scheduler using its default event loop.
      Parameters:
      scheduler - The scheduler that should execute the triggered commands.
      controller - The LogitechF310Controller object to use for this controller.
  • Method Details

    • getHID

      public CommandGenericHID getHID()
      Get the underlying CommandGenericHID object.
      Returns:
      the wrapped CommandGenericHID object
    • getController

      public LogitechF310Controller getController()
      Get the wrapped controller object.
      Returns:
      the wrapped controller object
    • a

      public Trigger a()
      Constructs a Trigger instance around the A button's digital signal.
      Returns:
      a Trigger instance representing the A button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • a

      public Trigger a(EventLoop loop)
      Constructs a Trigger instance around the A button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the A button's digital signal attached to the given loop.
    • b

      public Trigger b()
      Constructs a Trigger instance around the B button's digital signal.
      Returns:
      a Trigger instance representing the B button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • b

      public Trigger b(EventLoop loop)
      Constructs a Trigger instance around the B button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the B button's digital signal attached to the given loop.
    • x

      public Trigger x()
      Constructs a Trigger instance around the X button's digital signal.
      Returns:
      a Trigger instance representing the X button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • x

      public Trigger x(EventLoop loop)
      Constructs a Trigger instance around the X button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the X button's digital signal attached to the given loop.
    • y

      public Trigger y()
      Constructs a Trigger instance around the Y button's digital signal.
      Returns:
      a Trigger instance representing the Y button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • y

      public Trigger y(EventLoop loop)
      Constructs a Trigger instance around the Y button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Y button's digital signal attached to the given loop.
    • back

      public Trigger back()
      Constructs a Trigger instance around the Back button's digital signal.
      Returns:
      a Trigger instance representing the Back button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • back

      public Trigger back(EventLoop loop)
      Constructs a Trigger instance around the Back button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Back button's digital signal attached to the given loop.
    • logitech

      public Trigger logitech()
      Constructs a Trigger instance around the Logitech button's digital signal.
      Returns:
      a Trigger instance representing the Logitech button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • logitech

      public Trigger logitech(EventLoop loop)
      Constructs a Trigger instance around the Logitech button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Logitech button's digital signal attached to the given loop.
    • start

      public Trigger start()
      Constructs a Trigger instance around the Start button's digital signal.
      Returns:
      a Trigger instance representing the Start button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • start

      public Trigger start(EventLoop loop)
      Constructs a Trigger instance around the Start button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Start button's digital signal attached to the given loop.
    • leftStick

      public Trigger leftStick()
      Constructs a Trigger instance around the Left Stick button's digital signal.
      Returns:
      a Trigger instance representing the Left Stick button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • leftStick

      public Trigger leftStick(EventLoop loop)
      Constructs a Trigger instance around the Left Stick button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Left Stick button's digital signal attached to the given loop.
    • rightStick

      public Trigger rightStick()
      Constructs a Trigger instance around the Right Stick button's digital signal.
      Returns:
      a Trigger instance representing the Right Stick button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • rightStick

      public Trigger rightStick(EventLoop loop)
      Constructs a Trigger instance around the Right Stick button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Right Stick button's digital signal attached to the given loop.
    • leftBumper

      public Trigger leftBumper()
      Constructs a Trigger instance around the Left Bumper button's digital signal.
      Returns:
      a Trigger instance representing the Left Bumper button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • leftBumper

      public Trigger leftBumper(EventLoop loop)
      Constructs a Trigger instance around the Left Bumper button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Left Bumper button's digital signal attached to the given loop.
    • rightBumper

      public Trigger rightBumper()
      Constructs a Trigger instance around the Right Bumper button's digital signal.
      Returns:
      a Trigger instance representing the Right Bumper button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • rightBumper

      public Trigger rightBumper(EventLoop loop)
      Constructs a Trigger instance around the Right Bumper button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Right Bumper button's digital signal attached to the given loop.
    • dpadUp

      public Trigger dpadUp()
      Constructs a Trigger instance around the Dpad Up button's digital signal.
      Returns:
      a Trigger instance representing the Dpad Up button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • dpadUp

      public Trigger dpadUp(EventLoop loop)
      Constructs a Trigger instance around the Dpad Up button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Dpad Up button's digital signal attached to the given loop.
    • dpadDown

      public Trigger dpadDown()
      Constructs a Trigger instance around the Dpad Down button's digital signal.
      Returns:
      a Trigger instance representing the Dpad Down button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • dpadDown

      public Trigger dpadDown(EventLoop loop)
      Constructs a Trigger instance around the Dpad Down button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Dpad Down button's digital signal attached to the given loop.
    • dpadLeft

      public Trigger dpadLeft()
      Constructs a Trigger instance around the Dpad Left button's digital signal.
      Returns:
      a Trigger instance representing the Dpad Left button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • dpadLeft

      public Trigger dpadLeft(EventLoop loop)
      Constructs a Trigger instance around the Dpad Left button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Dpad Left button's digital signal attached to the given loop.
    • dpadRight

      public Trigger dpadRight()
      Constructs a Trigger instance around the Dpad Right button's digital signal.
      Returns:
      a Trigger instance representing the Dpad Right button's digital signal attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
      See Also:
    • dpadRight

      public Trigger dpadRight(EventLoop loop)
      Constructs a Trigger instance around the Dpad Right button's digital signal.
      Parameters:
      loop - the event loop instance to attach the event to.
      Returns:
      a Trigger instance representing the Dpad Right button's digital signal attached to the given loop.
    • leftTrigger

      public Trigger leftTrigger(double threshold, EventLoop loop)
      Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater than threshold.
      Parameters:
      threshold - the minimum axis value for the returned Trigger to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
      loop - the event loop instance to attach the Trigger to.
      Returns:
      a Trigger instance that is true when the Left Trigger axis exceeds the provided threshold, attached to the given event loop
    • leftTrigger

      public Trigger leftTrigger(double threshold)
      Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater than threshold.
      Parameters:
      threshold - the minimum axis value for the returned Trigger to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
      Returns:
      a Trigger instance that is true when the Left Trigger axis exceeds the provided threshold, attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
    • leftTrigger

      public Trigger leftTrigger()
      Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater than 0.5.
      Returns:
      a Trigger instance that is true when the Left Trigger axis exceeds 0.5, attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
    • rightTrigger

      public Trigger rightTrigger(double threshold, EventLoop loop)
      Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater than threshold.
      Parameters:
      threshold - the minimum axis value for the returned Trigger to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
      loop - the event loop instance to attach the Trigger to.
      Returns:
      a Trigger instance that is true when the Right Trigger axis exceeds the provided threshold, attached to the given event loop
    • rightTrigger

      public Trigger rightTrigger(double threshold)
      Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater than threshold.
      Parameters:
      threshold - the minimum axis value for the returned Trigger to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
      Returns:
      a Trigger instance that is true when the Right Trigger axis exceeds the provided threshold, attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
    • rightTrigger

      public Trigger rightTrigger()
      Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater than 0.5.
      Returns:
      a Trigger instance that is true when the Right Trigger axis exceeds 0.5, attached to the default scheduler event loop on the scheduler passed to the controller's constructor, or the default scheduler if a scheduler was not explicitly provided.
    • getLeftX

      public double getLeftX()
      Get the Left X value of the controller.
      Returns:
      The axis value.
    • getLeftY

      public double getLeftY()
      Get the Left Y value of the controller.
      Returns:
      The axis value.
    • getRightX

      public double getRightX()
      Get the Right X value of the controller.
      Returns:
      The axis value.
    • getRightY

      public double getRightY()
      Get the Right Y value of the controller.
      Returns:
      The axis value.
    • getLeftTrigger

      public double getLeftTrigger()
      Get the Left Trigger value of the controller.
      Returns:
      The axis value.
    • getRightTrigger

      public double getRightTrigger()
      Get the Right Trigger value of the controller.
      Returns:
      The axis value.