View Single Post
  #7   Spotlight this post!  
Unread 18-08-2013, 15:17
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
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.
Reply With Quote