WPILibC++  2019.2.1-4-g05d6660
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
frc::BuiltInWidgets Class Reference

The types of the widgets bundled with Shuffleboard. More...

#include <BuiltInWidgets.h>

Static Public Attributes

static const WidgetType kTextView
 Displays a value with a simple text field. More...
 
static const WidgetType kNumberSlider
 Displays a number with a controllable slider. More...
 
static const WidgetType kNumberBar
 Displays a number with a view-only bar. More...
 
static const WidgetType kDial
 Displays a number with a view-only dial. More...
 
static const WidgetType kGraph
 Displays a number with a graph. More...
 
static const WidgetType kBooleanBox
 Displays a boolean value as a large colored box. More...
 
static const WidgetType kToggleButton
 Displays a boolean with a large interactive toggle button. More...
 
static const WidgetType kToggleSwitch
 Displays a boolean with a fixed-size toggle switch. More...
 
static const WidgetType kVoltageView
 Displays an analog input or a raw number with a number bar. More...
 
static const WidgetType kPowerDistributionPanel
 Displays a PowerDistributionPanel. More...
 
static const WidgetType kComboBoxChooser
 Displays a SendableChooser with a dropdown combo box with a list of options. More...
 
static const WidgetType kSplitButtonChooser
 Displays a SendableChooser with a toggle button for each available option. More...
 
static const WidgetType kEncoder
 Displays an edu.wpi.first.wpilibj.Encoder displaying its speed, total travelled distance, and its distance per tick. More...
 
static const WidgetType kSpeedController
 Displays a SpeedController. More...
 
static const WidgetType kCommand
 Displays a command with a toggle button. More...
 
static const WidgetType kPIDCommand
 Displays a PID command with a checkbox and an editor for the PIDF constants. More...
 
static const WidgetType kPIDController
 Displays a PID controller with an editor for the PIDF constants and a toggle switch for enabling and disabling the controller. More...
 
static const WidgetType kAccelerometer
 Displays an accelerometer with a number bar displaying the magnitude of the acceleration and text displaying the exact value. More...
 
static const WidgetType k3AxisAccelerometer
 Displays a 3-axis accelerometer with a number bar for each axis' accleration. More...
 
static const WidgetType kGyro
 Displays a gyro with a dial from 0 to 360 degrees. More...
 
static const WidgetType kRelay
 Displays a relay with toggle buttons for each supported mode (off, on, forward, reverse). More...
 
static const WidgetType kDifferentialDrive
 Displays a differential drive with a widget that displays the speed of each side of the drivebase and a vector for the direction and rotation of the drivebase. More...
 
static const WidgetType kMecanumDrive
 Displays a mecanum drive with a widget that displays the speed of each wheel, and vectors for the direction and rotation of the drivebase. More...
 
static const WidgetType kCameraStream
 Displays a camera stream. More...
 

Detailed Description

The types of the widgets bundled with Shuffleboard.

For example, setting a number to be displayed with a slider:

NetworkTableEntry example = Shuffleboard.getTab("My Tab")
.add("My Number", 0)
.withWidget(BuiltInWidgets.kNumberSlider)
.getEntry();

Each value in this enum goes into detail on what data types that widget can support, as well as the custom properties that widget uses.

Member Data Documentation

const WidgetType frc::BuiltInWidgets::k3AxisAccelerometer
static

Displays a 3-axis accelerometer with a number bar for each axis' accleration.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
RangeRangek16GThe accelerometer range
Show valueBooleantrue Show or hide the acceleration values
PrecisionNumber2 How many numbers to display after the decimal point
Show tick marksBooleanfalse Show or hide the tick marks on the number bars
const WidgetType frc::BuiltInWidgets::kAccelerometer
static

Displays an accelerometer with a number bar displaying the magnitude of the acceleration and text displaying the exact value.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
MinNumber-1 The minimum acceleration value to display
MaxNumber1 The maximum acceleration value to display
Show textBooleantrue Show or hide the acceleration values
PrecisionNumber2 How many numbers to display after the decimal point
Show tick marksBooleanfalse Show or hide the tick marks on the number bars
const WidgetType frc::BuiltInWidgets::kBooleanBox
static

Displays a boolean value as a large colored box.


Supported types:

  • Boolean


Custom properties:

NameTypeDefault ValueNotes
Color when trueColor"green" Can be specified as a string (
"#00FF00"
) or a rgba integer (
0x00FF0000
)
Color when falseColor"red" Can be specified as a string or a number
const WidgetType frc::BuiltInWidgets::kCameraStream
static

Displays a camera stream.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
Show crosshairBooleantrue Show or hide a crosshair on the image
Crosshair colorColor"white" Can be a string or a rgba integer
Show controlsBooleantrueShow or hide the stream controls
RotationString"NONE" Rotates the displayed image. One of
["NONE", "QUARTER_CW",
"QUARTER_CCW", "HALF"]
const WidgetType frc::BuiltInWidgets::kComboBoxChooser
static

Displays a SendableChooser with a dropdown combo box with a list of options.


Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kCommand
static

Displays a command with a toggle button.

Pressing the button will start the command, and the button will automatically release when the command completes.
Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kDial
static

Displays a number with a view-only dial.

Displayed values are rounded to the nearest integer.
Supported types:

  • Number


Custom properties:

NameTypeDefault ValueNotes
MinNumber0The minimum value of the dial
MaxNumber100The maximum value of the dial
Show valueBooleantrue Whether or not to show the value as text
const WidgetType frc::BuiltInWidgets::kDifferentialDrive
static

Displays a differential drive with a widget that displays the speed of each side of the drivebase and a vector for the direction and rotation of the drivebase.

The widget will be controllable if the robot is in test mode.
Supported types:


Custom properties:

NameTypeDefault ValueNotes
Number of wheelsNumber4Must be a positive even integer
Wheel diameterNumber80Pixels
Show velocity vectorsBooleantrue
const WidgetType frc::BuiltInWidgets::kEncoder
static

Displays an edu.wpi.first.wpilibj.Encoder displaying its speed, total travelled distance, and its distance per tick.


Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kGraph
static

Displays a number with a graph.

NOTE: graphs can be taxing on the computer running the dashboard. Keep the number of visible data points to a minimum. Making the widget smaller also helps with performance, but may cause the graph to become difficult to read.
Supported types:

  • Number
  • Number array


Custom properties:

NameTypeDefault ValueNotes
Visible timeNumber30 How long, in seconds, should past data be visible for
const WidgetType frc::BuiltInWidgets::kGyro
static

Displays a gyro with a dial from 0 to 360 degrees.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
Major tick spacingNumber45Degrees
Starting angleNumber180 How far to rotate the entire dial, in degrees
Show tick mark ringBooleantrue
const WidgetType frc::BuiltInWidgets::kMecanumDrive
static

Displays a mecanum drive with a widget that displays the speed of each wheel, and vectors for the direction and rotation of the drivebase.

The widget will be controllable if the robot is in test mode.
Supported types:


Custom properties:

NameTypeDefault ValueNotes
Show velocity vectorsBooleantrue
const WidgetType frc::BuiltInWidgets::kNumberBar
static

Displays a number with a view-only bar.


Supported types:

  • Number


Custom properties:

NameTypeDefault ValueNotes
MinNumber-1.0The minimum value of the bar
MaxNumber1.0The maximum value of the bar
CenterNumber0The center ("zero") value of the bar
const WidgetType frc::BuiltInWidgets::kNumberSlider
static

Displays a number with a controllable slider.


Supported types:

  • Number


Custom properties:

NameTypeDefault ValueNotes
MinNumber-1.0The minimum value of the slider
MaxNumber1.0The maximum value of the slider
Block incrementNumber0.0625 How much to move the slider by with the arrow keys
const WidgetType frc::BuiltInWidgets::kPIDCommand
static

Displays a PID command with a checkbox and an editor for the PIDF constants.

Selecting the checkbox will start the command, and the checkbox will automatically deselect when the command completes.
Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kPIDController
static

Displays a PID controller with an editor for the PIDF constants and a toggle switch for enabling and disabling the controller.


Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kPowerDistributionPanel
static

Displays a PowerDistributionPanel.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
Show voltage and current valuesBooleantrue Whether or not to display the voltage and current draw
const WidgetType frc::BuiltInWidgets::kRelay
static

Displays a relay with toggle buttons for each supported mode (off, on, forward, reverse).


Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kSpeedController
static

Displays a SpeedController.

The speed controller will be controllable from the dashboard when test mode is enabled, but will otherwise be view-only.
Supported types:


Custom properties:

NameTypeDefault ValueNotes
OrientationString"HORIZONTAL" One of
["HORIZONTAL", "VERTICAL"]
const WidgetType frc::BuiltInWidgets::kSplitButtonChooser
static

Displays a SendableChooser with a toggle button for each available option.


Supported types:


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kTextView
static

Displays a value with a simple text field.


Supported types:

  • String
  • Number
  • Boolean


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kToggleButton
static

Displays a boolean with a large interactive toggle button.


Supported types:

  • Boolean


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kToggleSwitch
static

Displays a boolean with a fixed-size toggle switch.


Supported types:

  • Boolean


This widget has no custom properties.

const WidgetType frc::BuiltInWidgets::kVoltageView
static

Displays an analog input or a raw number with a number bar.


Supported types:


Custom properties:

NameTypeDefault ValueNotes
MinNumber0The minimum value of the bar
MaxNumber5The maximum value of the bar
CenterNumber0The center ("zero") value of the bar
OrientationString"HORIZONTAL" The orientation of the bar. One of
["HORIZONTAL",
"VERTICAL"]
Number of tick marksNumber5 The number of discrete ticks on the bar

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