RobotCore
Robot Core Documentation
Public Member Functions | List of all members
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.Button edu.wpi.first.wpilibj2.command.button.Trigger

Public Member Functions

 InternalButton ()
 
 InternalButton (boolean inverted)
 
void setInverted (boolean inverted)
 
void setPressed (boolean pressed)
 
boolean get ()
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.button.Button
 Button ()
 
 Button (BooleanSupplier isPressed)
 
Button whenPressed (final Command command, boolean interruptible)
 
Button whenPressed (final Command command)
 
Button whenPressed (final Runnable toRun, Subsystem... requirements)
 
Button whileHeld (final Command command, boolean interruptible)
 
Button whileHeld (final Command command)
 
Button whileHeld (final Runnable toRun, Subsystem... requirements)
 
Button whenHeld (final Command command, boolean interruptible)
 
Button whenHeld (final Command command)
 
Button whenReleased (final Command command, boolean interruptible)
 
Button whenReleased (final Command command)
 
Button whenReleased (final Runnable toRun, Subsystem... requirements)
 
Button toggleWhenPressed (final Command command, boolean interruptible)
 
Button toggleWhenPressed (final Command command)
 
Button cancelWhenPressed (final Command command)
 
- Public Member Functions inherited from edu.wpi.first.wpilibj2.command.button.Trigger
 Trigger (BooleanSupplier isActive)
 
 Trigger ()
 
Trigger whenActive (final Command command, boolean interruptible)
 
Trigger whenActive (final Command command)
 
Trigger whenActive (final Runnable toRun, Subsystem... requirements)
 
Trigger whileActiveContinuous (final Command command, boolean interruptible)
 
Trigger whileActiveContinuous (final Command command)
 
Trigger whileActiveContinuous (final Runnable toRun, Subsystem... requirements)
 
Trigger whileActiveOnce (final Command command, boolean interruptible)
 
Trigger whileActiveOnce (final Command command)
 
Trigger whenInactive (final Command command, boolean interruptible)
 
Trigger whenInactive (final Command command)
 
Trigger whenInactive (final Runnable toRun, Subsystem... requirements)
 
Trigger toggleWhenActive (final Command command, boolean interruptible)
 
Trigger toggleWhenActive (final Command command)
 
Trigger cancelWhenActive (final Command command)
 
Trigger and (Trigger trigger)
 
Trigger or (Trigger trigger)
 
Trigger negate ()
 

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 or not it should invert its value.

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

◆ get()

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

Returns whether or not the trigger is active.

This method will be called repeatedly a command is linked to the Trigger.

Returns
whether or not the trigger condition is active.

Reimplemented from edu.wpi.first.wpilibj2.command.button.Trigger.


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