Class InternalButton
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
edu.wpi.first.wpilibj2.command.button.Button
edu.wpi.first.wpilibj2.command.button.InternalButton
- All Implemented Interfaces:
BooleanSupplier
public class InternalButton extends Button
This class is intended to be used within a program. The programmer can manually set its value.
Also includes a setting for whether or not it should invert its value.
This class is provided by the NewCommands VendorDep
-
Constructor Summary
Constructors Constructor Description InternalButton()
Creates an InternalButton that is not inverted.InternalButton(boolean inverted)
Creates an InternalButton which is inverted depending on the input. -
Method Summary
Modifier and Type Method Description void
setInverted(boolean inverted)
void
setPressed(boolean pressed)
Methods inherited from class edu.wpi.first.wpilibj2.command.button.Button
cancelWhenPressed, toggleWhenPressed, whenHeld, whenPressed, whenPressed, whenReleased, whenReleased, whileHeld, whileHeld
Methods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger
and, cancelWhenActive, debounce, debounce, getAsBoolean, negate, onFalse, onTrue, or, toggleOnFalse, toggleOnTrue, toggleWhenActive, whenActive, whenActive, whenInactive, whenInactive, whileActiveContinuous, whileActiveContinuous, whileActiveOnce, whileFalse, whileTrue
-
Constructor Details
-
InternalButton
public InternalButton()Creates an InternalButton that is not inverted. -
InternalButton
Creates an InternalButton which is inverted depending on the input.- Parameters:
inverted
- if false, then this button is pressed when set to true, otherwise it is pressed when set to false.
-
-
Method Details