Class NetworkButton
java.lang.Object
edu.wpi.first.wpilibj2.command.button.Trigger
edu.wpi.first.wpilibj2.command.button.Button
edu.wpi.first.wpilibj2.command.button.NetworkButton
- All Implemented Interfaces:
BooleanSupplier
public class NetworkButton extends Button
A
Button
that uses a NetworkTable
boolean field.-
Constructor Summary
Constructors Constructor Description NetworkButton(NetworkTableEntry entry)
Creates a NetworkButton that commands can be bound to.NetworkButton(NetworkTable table, String field)
Creates a NetworkButton that commands can be bound to.NetworkButton(String table, String field)
Creates a NetworkButton that commands can be bound to. -
Method Summary
Modifier and Type Method Description boolean
get()
Returns whether or not the trigger is active.Methods inherited from class edu.wpi.first.wpilibj2.command.button.Button
cancelWhenPressed, toggleWhenPressed, toggleWhenPressed, whenHeld, whenHeld, whenPressed, whenPressed, whenPressed, whenReleased, whenReleased, whenReleased, whileHeld, whileHeld, whileHeld
Methods inherited from class edu.wpi.first.wpilibj2.command.button.Trigger
and, cancelWhenActive, debounce, debounce, getAsBoolean, negate, or, toggleWhenActive, toggleWhenActive, whenActive, whenActive, whenActive, whenInactive, whenInactive, whenInactive, whileActiveContinuous, whileActiveContinuous, whileActiveContinuous, whileActiveOnce, whileActiveOnce
-
Constructor Details
-
NetworkButton
Creates a NetworkButton that commands can be bound to.- Parameters:
entry
- The entry that is the value.
-
NetworkButton
Creates a NetworkButton that commands can be bound to.- Parameters:
table
- The table where the networktable value is located.field
- The field that is the value.
-
NetworkButton
Creates a NetworkButton that commands can be bound to.- Parameters:
table
- The table where the networktable value is located.field
- The field that is the value.
-
-
Method Details
-
get
Description copied from class:Trigger
Returns whether or not the trigger is active.This method will be called repeatedly a command is linked to the Trigger.
Functionally identical to
Trigger.getAsBoolean()
.
-