-
Notifications
You must be signed in to change notification settings - Fork 1
Spin Box and Dial
Carson Rueter edited this page Jan 24, 2025
·
1 revision
The Spin Box and Dial widgets are used to display and modify number values.
To display a dial or spin box, send any number value to NetworkTables:
SmartDashboard.putNumber("Heading (deg)", m_odometry.getPoseMeters().getRotation().toDegrees());
Spin boxes and dials contain some common configurations:
- Title Font Size: The font size of the title text.
- Font Size: The font size of the spin box.
- Lower Bound: The minimum displayed value of the spin box/dial.
- Upper Bound: The maximum displayed value of the spin box/dial.
- Step Size: How much to step the value by when incrementing/decrementing.
- Topic: What NetworkTables topic to use.
Some configurations are specific to the dials:
- Start Angle: What angle the dial should have at its minimum value.
- End Angle: What angle the dial should have at its maximum value.
0/360 degrees is north, 270/-90 degrees is west, 90 degrees is east, and 180/-180 degrees is south.