Class WsJSButtonInputConfig
- java.lang.Object
-
- org.wildstang.hardware.roborio.inputs.config.WsJSButtonInputConfig
-
- All Implemented Interfaces:
InputConfig
- Direct Known Subclasses:
WsDPadButtonInputConfig
public class WsJSButtonInputConfig extends java.lang.Object implements InputConfig
Contains configurations for joystick buttons.
-
-
Constructor Summary
Constructors Constructor Description WsJSButtonInputConfig(int p_port, int p_button)Construct the joystick button config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetButton()Returns the joystick button index.intgetPort()Returns the controller port number from the driver station.java.lang.StringtoString()Builds a JSON String describing the joystick button config.
-
-
-
Method Detail
-
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 java.lang.String toString()
Builds a JSON String describing the joystick button config.- Overrides:
toStringin classjava.lang.Object- Returns:
- Port number and button number.
-
-