|
Re: Interactive Widgets on SmartDashboard
If you call SmartDashboard.putX() on the robot, where X is any of the supported data types, there actually isn't any magic happening here; it just puts it into a NetworkTable named "SmartDashboard". On the dashboard, it listens for changes to this table and adds widgets accordingly. The default widgets for basic data types allow you to modify these values; just click in the text box and type a new value. These will be placed back into the NetworkTable, and can be retrieved with SmartDashboard.getX() (you can also use a ITableListener to detect updates). I don't believe there is a slider option for normal SmartDashboard use, but if you grab the source code it should be possible to take the LiveWindow slider, convert it to a normal widget, and compile it as an extension.
__________________
I code stuff.
|