Quote:
Originally Posted by Arhowk
1) How to put a button on the dash? (like putting up a command puts the button to run the command)
|
Anything extending WPILib's Trigger class will show up on the dashboard as a button -- including all of WPILib's Button types.
Quote:
Originally Posted by Arhowk
2) It seems as though the "Save" function only saves the layout of the values and not their value. When you load the robot, SmartDashboard.getNumber() throws a TableNoKeyAtIndex error (meaning that it has no data). Is it possible to make a setup where you open an xml setup and it will automatically send all of the values to the cRIO?
|
SmartDashboard's "save" stores what widgets are loaded and their properties (size, color, etc.). SmartDashboard widgets aren't supposed to provide values to the robot; they're supposed to display them and allow them to be tweaked at runtime. If you want a value to stick around, change the value you give to put() on the robot or use Preferences.
Quote:
Originally Posted by Arhowk
3) What exactly does the "Robot Preferences" widget do? I thought it could be used for #2 but it seems their keys cannot contain [s]strings[/s] spaces //E: the [s] BBCode isnt in this vBulletin?
|
The Robot Preferences widget puts a bunch of values into a network table so that the robot can read them. When you hit save, it sends another network table value telling the robot to save. The robot then saves the preference values (assuming you have a Preferences object on the robot) to the file wpilib-preferences.ini on the cRio, to be loaded again at a later time.
Quote:
Originally Posted by Arhowk
4) How would i convert a BinaryImage to a Sendable so I can show the BinaryImage on the dash?
|
I don't even know if this is possible, but I know it would be a really bad idea. While binary images are much smaller than full-color ones, this will still result in a lot of network traffic. You'd have
at least two video streams across the network -- one to the cRio from the camera, one to the laptop from the cRio. If you also have a feed to your dashboard, you now have three streams, two of which are full-color, and this becomes quite a load, possibly running over the network traffic limitations. If you want to be able to display different steps of the process live, I recommend doing your image processing on the laptop through a SmartDashboard widget -- for inspiration, you might want to look at Miss Daisy's vision system available
here.
Quote:
Originally Posted by Arhowk
5) So.. on the dashboard... I can convert an integer into a progress bar. Is there a way to make it a slider bar so i can input data without converting to plain text?
|
I believe you would have to make a custom widget using swing's NumberSlider object. That's what the LiveWindow speed controller widget does.