Class WsJSButtonInputConfig

java.lang.Object
org.wildstang.hardware.roborio.inputs.config.WsJSButtonInputConfig
All Implemented Interfaces:
InputConfig
Direct Known Subclasses:
WsDPadButtonInputConfig

public class WsJSButtonInputConfig extends Object implements InputConfig
Contains configurations for joystick buttons.
  • Constructor Details

    • WsJSButtonInputConfig

      public WsJSButtonInputConfig(int p_port, int p_button)
      Construct the joystick button config
      Parameters:
      p_port - Driver station controller port number.
      p_button - Joystick button index.
  • Method Details

    • getPort

      public int getPort()
      Returns the controller port number from the driver station.
      Returns:
      The controller port number.
    • getButton

      public int getButton()
      Returns the joystick button index.
      Returns:
      The joystick button index.
    • toString

      public String toString()
      Builds a JSON String describing the joystick button config.
      Overrides:
      toString in class Object
      Returns:
      Port number and button number.