|
Re: Creating an indicator for encoder on DS
you need to do two things
First: in the Dashboard Data Vi, obtain the data from the encoders, be it from a global variable or what. Bundle the data (you can add more in later) and use the "flatten to string" command (I can't remember where it is, but it turns a bundle into binary) connect the string to the vi "send user data high", which sends it to the dashboard. After that, right click the bundle you flattened and select create constant. Copy the constant and save it for later
Second: you need to make a custom dashboard, which can be done in the project viewer. In the block diagram there is a disabled box that has an item (unflatten from string) in it (I am doing this from memory) what you need to do is create a constant for one of the terminals on the left, use the one you copied in the first part. Connect it to the terminal and the output should be the same bundle you inputted in part one. Unbundle the bundle and use the wires to connect to a gauge or whatever it is that you choose. To save the Dashboard, go to the dashboard project screen and build it to a location. Name it Dashboard.exe and replace the original dashboard, and all the files in it in C:\Program Files\FRC Dashboard.
P.S. you can also add crosshairs in the custom dashboard by adding lines, under decoration.
P.P.S Be careful with connecting those encoders to the shooter wheel. Many, many people fried their encoders from them not being able to handle throwing wheel speeds.
Last edited by Suitster : 15-03-2012 at 20:52.
Reason: accidently hit post
|