![]() |
ZomB: a C# Drag and Drop Dashboard
2 Attachment(s)
Team 451 would like to share our ZomB Dashboard (Yes, you read that right, zombie) that we have been working on, and get some feedback. We have used this successfully for a few response testing, like ultrasonic (it looks good on a graph)
Pre-build controls: AnalogMeter, DataGraph(inspired by taskmanager), DirectionMeter, DistanceMeter, SpikeControl, RoundSpeedMeter, TacoMeter(Yes, it even has cheese), MessageDisplay, VarValue, OnOffControl, ColorFind(Totally misleading name, still testing) There are 2 parts, the dashboard, and the robot files. Requirements: Visual Studio 2008, .Net 2.0 Note: we use C++, but you can do this in java and LabView also, look at the bottom of this post for the format The robot side files are ZDashboard.h and cpp, copy them into your project and add at the top of the main file #include "ZDashboard.h" in your code, create a ZDashboard object , and initialize it. Code:
class RobotDemo:public SimpleRobotCode:
//...Some notes: THIS IS BETA!!! I am still working on bugs, the least tested feature is the VarValue control and the var and AddDebugVariable functions. please report any bugs the .Net controls features are in the .Cat group. most have Max, Min, and Value. DataGraphs cannot have a Min less that 0 Taco is pure fun To see what each control does, open the test project (run it), click on a control, and move the slider at the top (EDIT: direction and analog meter barely move). onoff and spike are click state change, the thing in the lower right corner is a drag and drop sample, not related to create a new Dashboard, make a new project, Reference System451.Communications.Dashboard.dll (in dash/System451.Communication.Dashboard/bin/Release folder), build the project. the controls will appear at the top of the toolbox, they are drag and drop. add 1 dashboardDataHub control. in the constructor (or a start button) add this code Code:
dashboardDataHub1.AddDashboardControl(YourControls);the Format of the strings, which can be Printf'd from the Dashboard class is @@@451:|controlname=value|name=value|:451@@@ |
Re: ZomB: a C# Drag and Drop Dashboard
Looks shiny. I wrote some old-school looking analog meter controls for C# a few years ago, you might find it useful to use with your dashboard.
http://www.virtualroadside.com/blog/...for-c-and-net/ |
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
I added a camera feed to this today, complements of the dashboard here: http://www.chiefdelphi.com/forums/sh...ad.php?t=82422 . It still uses .net 2, so no need to update!
I have some bug fixes that I will post tommorow (some not on this computer), so for now, here is the CS files, and the dll |
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
Here's the latest version, I would create a new project that references the dll, and add stuff like my original post explains, as the DefaultDash is a bit of a mess.
Changes from initial release: Fixed multithreading bugs Added CameraView Added CSV DataSaver |
Re: ZomB: a C# Drag and Drop Dashboard
Can I use this with Java?
|
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:|";I will try to make a Java version of ZDashboard by this Friday. If you have any other questions, please ask |
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
minor bug fix: mono compatible (not tested, but MoMA say's looks good)
|
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
Got a Java port, just add the attached ZDashboard.java to your project.
Code:
import edu.wpi.first.wpilibj.SimpleRobot; |
Re: ZomB: a C# Drag and Drop Dashboard
Thanks! it will work for our purposes :D
|
Re: ZomB: a C# Drag and Drop Dashboard
It wOnt compile, it says th dashboard packer is bad and so is the send function
edit: The java library wont compile, it says getDashBoardPacker and send are bad calls |
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
Quote:
Here it is fixed |
Re: ZomB: a C# Drag and Drop Dashboard
It says that the string is too long
|
Re: ZomB: a C# Drag and Drop Dashboard
1 Attachment(s)
Quote:
IMPORTANT UPDATE! - V0.3 This fixes a few bugs that were fixed with the Camera update, and lost with the mono fix (and adds the fixes to a few other new controls) This also fixes the default Dashboard. Adds configurable IP address for the camera, so you can actually see YOUR camera! added some camera target options - send widthxheigth+x,y to target (ZomB.Add("Target","400x300+5,5");) added Restart to camera Added virtuald's AnalogMeter (VirtualdAnalogMeter) I will probably have some more detailed documentation and how-to's out by Friday Features that are coming: Soon: TCP instead of dashboard, but fallback available virtuald's oscilliscope Before week 6: message splitting a few more controls eventually: re-write of data hub for many params better designer support VS-less design mode (like slavik262's dashboard) |
Re: ZomB: a C# Drag and Drop Dashboard
i just tried to send a motor value to the dashboard.
|
Re: ZomB: a C# Drag and Drop Dashboard
Quote:
also make sure you are not sending every loop, you don't want to overload the dashboard (50Hz) assuming you are running ZB on a different laptop, go to the driverstation setup tab, click on remote dashboard and enter the other laptop's IP |
| All times are GMT -5. The time now is 02:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi