Go to Post You enjoy your pepperoni pizza, I'll enjoy my cheese and peppers, and we can both agree that people that like pineapple on their pizza, while strange... are completely entitled to their opinions. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 21-02-2015, 07:02
Brrch Brrch is offline
Registered User
AKA: Alon
FRC #2212 (Spikes)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: Israel
Posts: 4
Brrch is an unknown quantity at this point
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by lopsided98 View Post
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);
If you use RobotBuilder, the "Button on SmartDashboard" checkbox also works as long as your command has a default constructor.
When I tried to copy the classes to a Robot Project it said that the import edu.wpi.first.smartdashboard could not be resolved. Which library should I use?
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi