Class WsJoystickToggleButton
java.lang.Object
org.wildstang.framework.io.inputs.Input
org.wildstang.framework.io.inputs.DigitalInput
org.wildstang.hardware.roborio.inputs.WsJoystickToggleButton
Reads a toggle joystick button.
A joystick button whose output TOGGLES between true and false with each button press.
-
Constructor Summary
ConstructorsConstructorDescriptionWsJoystickToggleButton(String p_name, int p_port, int p_buttonIndex, boolean p_initialState) Construct the axis -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns a toggled value each time the button is pressed.voidSets the toggle state back to the start state.Methods inherited from class org.wildstang.framework.io.inputs.DigitalInput
getValue, readDataFromInput, setValueMethods inherited from class org.wildstang.framework.io.inputs.Input
addInputListener, disable, enable, getInputListeners, getName, hasValueChanged, isEnabled, notifyListeners, removeAllListeners, removeInputListener, setValueChanged, update
-
Constructor Details
-
WsJoystickToggleButton
Construct the axis- Parameters:
p_name- Descriptive name of the button.p_port- Controller port as defined in the driver station.p_buttonIndex- Controller button index.p_initialState- Initial state the toggle should start in.
-
-
Method Details
-
readRawValue
protected boolean readRawValue()Returns a toggled value each time the button is pressed.- Specified by:
readRawValuein classDigitalInput- Returns:
- Toggled button value.
-
resetState
public void resetState()Sets the toggle state back to the start state.
-