Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Customizable Dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=80561)

Huskie65 16-02-2010 02:36

Re: Customizable Dashboard
 
Wow this is lookin great. Can't wait to see final product!

misko 18-02-2010 22:33

Re: Customizable Dashboard
 
This sounds like good stuff. Does anyone know if FIRST will allow this to be used during a competition? Or are we going to be required to use their drive station/dashboard infrastructure?

slavik262 18-02-2010 23:36

Re: Customizable Dashboard
 
You can use whatever dashboard you want, provided that you don't change how the robot sends data to the dashboard. That's why the FIRST Driver Station software has a "remote dashboard" option.

slavik262 21-02-2010 20:43

Re: Customizable Dashboard
 
This weekend I did a lot more work on it. You can now save and load the entire dashboard, including control properties, names, locations, and packet data offsets (in short, everything). The packet data toolbar at the bottom is completely done, letting you drag and drop data sources straight into the packet bar.

I'm not putting up screenshots because the system doesn't look any different from when I last posted some, but the things you saw before work now :D

Both of the things I finished this weekend are big steps towards this project losing vaporware status. All I have left to do is make the actual run/display mode where the dashboard interacts with the robot. This will be developed a lot faster than the other components due to the lack of user interaction.

~Cory~ 22-02-2010 21:37

Re: Customizable Dashboard
 
I would be very happy to help to port a version to linux...

Robototes2412 26-02-2010 19:58

Re: Customizable Dashboard
 
SO would I

slavik262 02-03-2010 22:45

Re: Customizable Dashboard
 
I have the dashboard running, fullscreen, and went today to test the networking side of it, only to find out that FIRST has changed the network protocol around, making my white paper on the protocol completely useless.

If anyone has newer documentation on the dashboard packet, the sooner I get it, the sooner I can get this out.

Vikesrock 02-03-2010 22:49

Re: Customizable Dashboard
 
Quote:

Originally Posted by slavik262 (Post 930751)
If anyone has newer documentation on the dashboard packet, the sooner I get it, the sooner I can get this out.

Not sure when the packet changed or when this info was compiled, but this might help you:

http://www.chiefdelphi.com/forums/sh...ight=dashboard

EHaskins 02-03-2010 23:11

Re: Customizable Dashboard
 
Quote:

Originally Posted by Vikesrock (Post 930752)
Not sure when the packet changed or when this info was compiled, but this might help you:

http://www.chiefdelphi.com/forums/sh...ight=dashboard

That information should be accurate as of now. If you have any issues with it let me know.

I assume the following code is what you're looking for, but if you need information on the structure of the default data packets I can help with that as well.

(C#)
Code:

        public void Parse(byte[] userData)
        {
            using (var stream = new MemoryStream(userData))
            using (var reader = new MiscUtil.IO.EndianBinaryReader(new MiscUtil.Conversion.BigEndianBitConverter(), stream))
            {
                var packetNumber = reader.ReadByte();

                var highDataLength = reader.ReadInt32();
                var highData = reader.ReadBytes(highDataLength);
                if (highDataLength > 0)
                    StatusData.Update(highData);

                var errorString = reader.ReadFrcString(); //ReadFrcString is an extension method which

                var lowDataLength = reader.ReadInt32();
                var lowData = reader.ReadBytes(lowDataLength);
                if (lowDataLength > 0)
                    ioData.Update(lowData);
            }
        }

        public static string ReadFrcString(this EndianBinaryReader reader)
        {
            int length = reader.ReadInt32();
            if (length < 0 || length > (reader.BaseStream.Length - reader.BaseStream.Position))
                return string.Empty;
            byte[] bytes = reader.ReadBytes(length);
            return System.Text.Encoding.ASCII.GetString(bytes);
        }


slavik262 02-03-2010 23:19

Re: Customizable Dashboard
 
Quote:

Originally Posted by Vikesrock (Post 930752)
Not sure when the packet changed or when this info was compiled, but this might help you:

http://www.chiefdelphi.com/forums/sh...ight=dashboard

This is what I was looking for. Thanks Vikesrock for finding it and Eric for making it. I was going off the old format which has a key differences that was causing problems
(There used to be dedicated space for error and user strings before the user data).

My net code should just require a few tweaks. Expect an initial release in a few days. :D

CardcaptorRLH85 03-03-2010 14:48

Re: Customizable Dashboard
 
I'm going to hazard a guess that this won't be ready for week 1 events (this Weekend) Just wondering since I'm heading to Kettering University in about an hour to setup the field and all so, my time to integrate a new dashboard into our robots program will be quite limited until the competition actually starts.

slavik262 04-03-2010 00:25

Re: Customizable Dashboard
 
Quote:

Originally Posted by CardcaptorRLH85 (Post 930992)
I'm going to hazard a guess that this won't be ready for week 1 events (this Weekend) Just wondering since I'm heading to Kettering University in about an hour to setup the field and all so, my time to integrate a new dashboard into our robots program will be quite limited until the competition actually starts.

Probably not. I'm really sorry to those of you who were hoping to use it then. The initial release (with just the meter control) should be out by Saturday *knock on wood* with subsequent controls following shortly thereafter. For those of you who just want video, a full-screen video dashboard is also currently in production (since I would use all the same code to incorporate a video display into this dashboard project anyways).

slavik262 06-03-2010 02:38

Re: Customizable Dashboard
 
The initial release is finished. It's 1:30 AM on Saturday here, so I'm going to get some sleep now. Tomorrow (well, technically today, but after I get some sleep) I'll put together some basic documentation (a basic instruction guide, known bugs, planned improvements, etc.) and throw the dashboard and the dox on this thread for you guys to check out. :D

Please be understanding with this release and think of it as an early beta. It's feature-complete, but there's a few minor things missing (keyboard shortcuts, prompts to save if you've made changes to the dashboard before closing the window, etc.). Rest assured, these features will be added very quickly. My goal here is to give you guys something concrete that you can start to play with in anticipation of the more finished project, instead of making you wait with nothing while I finish things.

EHaskins 06-03-2010 02:43

Re: Customizable Dashboard
 
Quote:

Originally Posted by slavik262 (Post 932076)
The initial release is finished. It's 1:30 AM on Saturday here, so I'm going to get some sleep now. Tomorrow (well, technically today, but after I get some sleep) I'll put together some basic documentation (a basic instruction guide, known bugs, planned improvements, etc.) and throw the dashboard and the dox on this thread for you guys to check out. :D

I'd be nice if you had it posted before 10am, so I can test it when I have access to our control system tomorrow.

slavik262 07-03-2010 02:03

Re: Customizable Dashboard
 
1 Attachment(s)
The dashboard is live!

As you can see, the difference between this dashboard and other dashboards released such as ZomB is that this is a complete package requiring no other software. You make your dashboard in the program, and you run your dashboard in the program. Simple, and no need for Visual Studio or other development tools.

Using it is simple. To create meter controls (the only type implemented so far - more to come soon), click on the meter button on the toolbar then just click, hold, and drag meters into existence (click where you want a corner of the meter to be, drag to where the other corner should be, and release. The meter will pop into being). Make sure you click the meter button again when you're done creating meters, switching the cursor back to multi-select mode (drag a box around controls to select them). You can also select multiple controls by holding the Control key and clicking the other controls. Holding shift while dragging a corner of a control will cause it to keep its current aspect ratio.

Once you've created your controls, tell them where to get data from. In the Packet Data bar at the bottom of the screen will appear a box for each control you've created. Hovering over each box will tell you the name of the control it belongs to (if this doesn't work at first, just click in the Packet Data bar to give it focus). Drag the box into the "User Data Byte Number" line to tell the control where in the packet to get its data from. Each space represents a byte, and since a float (the data type the meter control takes) is 4 bytes, it is 4 spaces wide. The box will turn green to indicate you have successfully placed it in the packet. At the current time you cannot have multiple controls receive data from the same byte(s) - this will cause the box to turn red until it has enough space for itself.

In your robot code, simply use the high-priority packer to pack the packet with the data in the same order you laid out in the dashboard.

Hit the green run arrow. If you have not saved your dashboard yet, you will be prompted to do so (the dashboard must be saved to run). The display mode will automatically start up, displaying your dashboard in fullscreen. To exit display mode, simply hit Alt-F4 and you will return to edit mode.

I realize that right now there's only one control type (the Meter), but rest assured, more will quickly follow. Think of this as a demo. Feel free to provide suggestions, and together we can keep making this system better and better.

If you have any further questions, please read the text documents included with the program. If you still have questions, post them here, PM me, or email me at slavik262@gmail.com

Enjoy!


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

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