Custom Dashboard?

I was just trying to figure out how to make a custom dashboard - a bit late in the game I know, but after our regional competition this year, we decided that having actual feedback from sensors on the robot would be a lot more beneficial than we initially expected. So far we’re just running a dashboard someone uploaded a while ago that was just the default dashboard with the gyro graphs removed, which helped us with the camera vision lag.

Our programming is done in Java and is trying to feed the following information to the dashboard:

  • A boolean to indicate when a ball is in place in front of the kicker
  • Four doubles to indicate the speed values of each Jaguar
  • The status of our 5 solenoids (well, two double solenoids and one single)
  • Two booleans to indicate whether our motors are being overstressed (this is determined by comparing motor controller speed with the values the encoders are reading from the gearboxes)

I have literally no idea how to even start making a dashboard to supply this information. It isn’t absolutely necessary to have all of it displayed because each value is used in the robot code elsewhere, but it would be nice to see the values when driving.

Also, can anyone explain how exactly the dashboard data clusters are supposed to be structured? Since I haven’t seen how the dashboard creation process actually handles a cluster, I’m really not sure what the significance is of having multiple clusters of single datatypes vs. having one large cluster with all of the information within it.


use the ZomB dashboard at , it works for me

Looks promising, I’ll definitely give it a shot. Thanks!

To reply further on the clusters, the only format I could get to work was in a dashboard example (We use C++, though). Whenever I tried to do it myself, the dashboard DID NOT like it. I was gonna play a bit and document the default dashboard cluster setup (the example didn’t have much and didn’t see any in the WPILib docs) but never had enough time. It might be out there, I don’t think I researched too hard.

If you want to see how the default cluster is set up, right click on each item in the cluster and turn on the label. I don’t know why they didn’t leave it on by default, but that will show you exactly what the data members are. The trick here is that the order and type of members in the cluster (low priority packet is the big one on the far left) have to match exactly with what’s being sent from your robot side. Another thing to note is that if you are sending across a float type in C++, you need to change the representation of the orange box in your cluster to be a single type (right click on the box, go to representation and choose SGL). This bit me for a while.

With respect to creating a custom dashboard, here’s what I would suggest. Follow the flow of the large cluster on the left and see how it gets to the front panel controls. You’ll find that it really isn’t difficult. It gets used as the template for a binary string to be unpacked to, then gets fed into a while loop and a couple of error checks. It eventually gets unbundled by name and used however the dashboard needs it before getting sent to the indicators.

Try this as a quick proof of concept. Create a default dashboard project. Remove everything on the front panel. Add a number indicator and name it something like “Test Integer 1”. Go to the diagram and remove everything from the cluster on the left except for a single INT32 (blue box). Right click on it and turn on the label. Name it something useful like “Test Int”. When you scroll to the right, you’ll see that there are a bunch of broken wires. This is where the front panel indicators used to be. You can rip out all the logic that was there (make sure the pink cluster is still connected to the outside of the case statement). Now, add an “Unbundle by name” and connect it to the pink cluster tunnel on the left side of the case statement. You should see your “Test Int” inside. Bring your “Test Integer 1” indicator into the case statement if it isn’t already there and run a wire from the unbundle to the indicator. At this point, this dashboard is functional. It just needs the right packet sent across from the robot side.

On the robot side, look where the dashboard is being populated. Rip out the unnecessary parts so that your code looks something like this (in C++, Java should be similar)

Dashboard &dataDashboardPacker = ap_ds->GetLowPriorityDashboardPacker();

What this does is create the low priority packet, adds a 32 bit integer with value 1234, and finalizes the packet, which sends it across to the dashboard itself.

When you get this to work, you can replace the 1234 with any INT32 variable that you want. Look into the WPILib’s Dashboard.h to see what other things you can add. As long as the order and type on the receiving end match, you can put just about anything you want in there (there is a size limit, but I haven’t hit it yet and am sending around 80 items in a mix of clusters, floats, ints, and bools).

Good luck. If you need further help, PM me and I’ll help how I can.

Wow, I’ll definitely check this out. I had no idea the things were clickable, I never tried it :stuck_out_tongue:

Thanks for the info BigJ. I’ll give that a shot as well, after I give zomB an attempt.