Class ButtonAsAxis
java.lang.Object
org.firstinspires.ftc.teamcode.fy23.gamepad2.primitives.axes.ButtonAsAxis
- All Implemented Interfaces:
Axis
Makes a physical gamepad button act as an axis.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firstinspires.ftc.teamcode.fy23.gamepad2.primitives.Axis
Axis.DoubleLambda
-
Constructor Summary
ConstructorDescriptionButtonAsAxis
(Button.BoolLambda button) Pass in a lambda expression that returns the value of aGamepad
button field: new ToggleButton( () -> gamepad.x );ButtonAsAxis
(Button.BoolLambda button, double scalingFactor) In practice, the scaling factor is the output value. -
Method Summary
Modifier and TypeMethodDescriptiondouble
value()
The value of an axis depends on the implementation and its parameters.
-
Constructor Details
-
ButtonAsAxis
Pass in a lambda expression that returns the value of aGamepad
button field: new ToggleButton( () -> gamepad.x ); -
ButtonAsAxis
In practice, the scaling factor is the output value.
-
-
Method Details