Robot Core Documentation
Loading...
Searching...
No Matches
edu.wpi.first.wpilibj2.command.button.InternalButton Class Reference
Inheritance diagram for edu.wpi.first.wpilibj2.command.button.InternalButton:
edu.wpi.first.wpilibj2.command.button.Trigger

Public Member Functions

 InternalButton ()
 
 InternalButton (boolean inverted)
 
void setInverted (boolean inverted)
 
void setPressed (boolean pressed)
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.button.Trigger
 Trigger (EventLoop loop, BooleanSupplier condition)
 
 Trigger (BooleanSupplier condition)
 
Trigger onTrue (Command command)
 
Trigger onFalse (Command command)
 
Trigger whileTrue (Command command)
 
Trigger whileFalse (Command command)
 
Trigger toggleOnTrue (Command command)
 
Trigger toggleOnFalse (Command command)
 
Trigger and (BooleanSupplier trigger)
 
Trigger or (BooleanSupplier trigger)
 
Trigger negate ()
 
Trigger debounce (double seconds)
 
Trigger debounce (double seconds, Debouncer.DebounceType type)
 

Detailed Description

This class is intended to be used within a program. The programmer can manually set its value. Also includes a setting for whether it should invert its value.

This class is provided by the NewCommands VendorDep

Constructor & Destructor Documentation

◆ InternalButton() [1/2]

edu.wpi.first.wpilibj2.command.button.InternalButton.InternalButton ( )

Creates an InternalButton that is not inverted.

◆ InternalButton() [2/2]

edu.wpi.first.wpilibj2.command.button.InternalButton.InternalButton ( boolean inverted)

Creates an InternalButton which is inverted depending on the input.

Parameters
invertedif false, then this button is pressed when set to true, otherwise it is pressed when set to false.

Member Function Documentation

◆ setInverted()

void edu.wpi.first.wpilibj2.command.button.InternalButton.setInverted ( boolean inverted)

Sets whether to invert button state.

Parameters
invertedWhether button state should be inverted.

◆ setPressed()

void edu.wpi.first.wpilibj2.command.button.InternalButton.setPressed ( boolean pressed)

Sets whether button is pressed.

Parameters
pressedWhether button is pressed.

The documentation for this class was generated from the following file: