View Single Post
  #6   Spotlight this post!  
Unread 08-03-2010, 15:50
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: ZomB: a C# Drag and Drop Dashboard

EDIT: Java port posted at post #8

yes, I have not had a chance to port the robot side code (ZDashboard.cpp) yet, but it uses WPILib (and therefore also works with WPILibJ).

(functions may be slightly different for java, I am not a java expert (yet))
Instead of making a ZDashboard object, make a Dashboard object from Driverstation.GetInstance().GetHighPriorityDashboa rdPacker()
then, at the beginning of your code, create a string, and (either immediatly or when the value has been calculated) then assign it a string in the format of @@@451:|controlname=value|name=value|:451@@@
when you have built the string, use the dashboard object to Printf it

example:
Code:
string prints = "@@@451:|";
//code to calculate outputSpeed
prints+="out="+outputSpeed+"|";//name=value pipes (| above enter key on most keyboards, use shift) seperate values
yourDashboardObject.Printf(prints+":451@@@);//this fuction might be different for java

I will try to make a Java version of ZDashboard by this Friday. If you have any other questions, please ask
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 08-03-2010 at 16:42.