Class Input

java.lang.Object
frc.robot.input.Input
Direct Known Subclasses:
AutoInput, TeleopInput

public abstract class Input extends Object
Base class for input handling in the robot. Extend this class to implement specific input types like TeleopInput or AutoInput.
  • Method Details

    • reset

      public void reset()
      Resets the input object, resetting all button bindings.
    • update

      public void update()
      Update the input loop periodically.
    • getAxisValue

      public abstract double getAxisValue(InputTypes.AxialInput key)
      Gets the axis value for a specific axis.
      Parameters:
      key - the axis identifier
      Returns:
      the axis value
    • getButtonValue

      public boolean getButtonValue(InputTypes.ButtonInput key)
      Gets the (raw) button value for a specific button.
      Parameters:
      key - the button identifier
      Returns:
      the (raw) button value
    • getButtonPressed

      public boolean getButtonPressed(InputTypes.ButtonInput key)
      Gets the button pressed value for a specific button.
      Parameters:
      key - the button identifier
      Returns:
      the button pressed value
    • getButtonReleased

      public boolean getButtonReleased(InputTypes.ButtonInput key)
      Gets the button released value for a specific button.
      Parameters:
      key - the button identifier
      Returns:
      the button released value
    • getButton

      protected abstract Function<edu.wpi.first.wpilibj.event.EventLoop,edu.wpi.first.wpilibj.event.BooleanEvent> getButton(InputTypes.ButtonInput key)
    • getBooleanEvent

      protected edu.wpi.first.wpilibj.event.BooleanEvent getBooleanEvent(InputTypes.ButtonInput key, Input.BooleanEventType type)