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
AButton
that uses aNetworkTable
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
All Methods Instance Methods Concrete Methods 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 Detail
-
NetworkButton
public NetworkButton(NetworkTableEntry entry)
Creates a NetworkButton that commands can be bound to.- Parameters:
entry
- The entry that is the value.
-
NetworkButton
public NetworkButton(NetworkTable table, String field)
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
public NetworkButton(String table, String field)
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 Detail
-
get
public boolean 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()
.
-
-