public final class Shuffleboard extends Object
boolean
value to be displayed with a toggle
button instead of the default colored box, or set custom colors for that box.
For example, displaying a boolean entry with a toggle button:
NetworkTableEntry myBoolean = Shuffleboard.getTab("Example Tab")
.add("My Boolean", false)
.withWidget("Toggle Button")
.getEntry();
Changing the colors of the boolean box:
NetworkTableEntry myBoolean = Shuffleboard.getTab("Example Tab")
.add("My Boolean", false)
.withWidget("Boolean Box")
.withProperties(Map.of("colorWhenTrue", "green", "colorWhenFalse", "maroon"))
.getEntry();
Specifying a parent layout. Note that the layout type must always be specified, even if
the layout has already been generated by a previously defined entry.
NetworkTableEntry myBoolean = Shuffleboard.getTab("Example Tab")
.getLayout("List", "Example List")
.add("My Boolean", false)
.withWidget("Toggle Button")
.getEntry();
Teams are encouraged to set up shuffleboard layouts at the start of the robot program.
Modifier and Type | Field and Description |
---|---|
static String |
kBaseTableName
The name of the base NetworkTable into which all Shuffleboard data will be added.
|
Modifier and Type | Method and Description |
---|---|
static void |
disableActuatorWidgets()
Disables user control of widgets containing actuators.
|
static void |
enableActuatorWidgets()
Enables user control of widgets containing actuators: speed controllers, relays, etc.
|
static ShuffleboardTab |
getTab(String title)
Gets the Shuffleboard tab with the given title, creating it if it does not already exist.
|
static void |
update()
Updates all the values in Shuffleboard.
|
public static final String kBaseTableName
public static void update()
public static ShuffleboardTab getTab(String title)
title
- the title of the tabpublic static void enableActuatorWidgets()
public static void disableActuatorWidgets()