|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Custom SmartDashboard Widget Repository
Here's the other useful widget I wrote; it displays commands that have parameters, which you can set from the SmartDashboard. It requires code on the robot, which I have only written in Java, but it can be ported to C++ fairly easily.
This widget is useful for debugging commands, because you can put them on the SD and then play with parameters and make sure they react correctly. The ParameterCommand.jar file contains the widget, while the src folder contains the source for both the widget and the robot code. The robot code includes an example (RotateToCommand.java) from our code which demonstrates the usage of the ParameterCommand. When you want to use put the command on the SD, you simply have to call: Code:
SmartDashboard.putData(yourParameterCommand); Last edited by Ben Wolsieffer : 19-02-2015 at 18:00. Reason: forgot attachment |
|
#2
|
|||
|
|||
|
Re: Custom SmartDashboard Widget Repository
Quote:
|
|
#3
|
|||
|
|||
|
Re: Custom SmartDashboard Widget Repository
Which classes? The only file that needs to in your robot project is ParameterCommand.java. The .java in the smartdashboard directory are the source for the SmartDashboard widget, which are only necessary if you want to modify the the code running in the SmartDashboard.
|
|
#4
|
||||
|
||||
|
Re: Custom SmartDashboard Widget Repository
Quote:
|
|
#5
|
|||
|
|||
|
Re: Custom SmartDashboard Widget Repository
Quote:
The source for the SmartDashboard is here: https://bitbucket.org/byteit101/oldsmartdashboard/src, but if you only want to write extensions for it, you need to add "HOME/wpilib/tools/SmartDashboard.jar" as a library in Eclipse/Netbeans. |
|
#6
|
||||
|
||||
|
Re: Custom SmartDashboard Widget Repository
Quote:
|
|
#7
|
|||
|
|||
|
Re: Custom SmartDashboard Widget Repository
You have to put the .jar file containing the extension in "HOME/SmartDashboard/extensions".
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|