Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   C++ dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=132132)

ejb1123 05-01-2015 01:07

C++ dashboard
 
In the driver station for the FRC 2015. There is a option for C++ dashboard. I have read that the c++ was for wind river devkit, but with the transition to eclipse for c++ I don't know how I would make a dashboard in C++. How would this be done?
It might be useful for client side(DS Computer) image analysis with openCV instead of compiling it to run on the roborio.

fsilberberg 05-01-2015 09:51

Re: C++ dashboard
 
For C++ and Java, we support easy sending of data to the SmartDashboard via NetworkTables. You can find information about how use the SmartDashboard here: http://wpilib.screenstepslive.com/s/...-robot-program. Note that while many of the examples are in Java, the same functions are available in the SmartDashboard class in C++. So where Java has
Code:

SmartDashboard.putString("name", "value");
C++ would have
Code:

SmartDashboard:: PutString("name", "value");

Pratik Kunapuli 05-01-2015 10:29

Re: C++ dashboard
 
Although the code is written in Java, the white paper here: (http://www.chiefdelphi.com/media/papers/2676) is an excellent resource for doing vision processing off-board on the laptop. This code was used by 341 for the past 3 years and it gets the image from the axis camera on robot, and then goes through a series of filters, compressions and other processes and finally displays the image to the Smart Dashboard.

Joe Ross 05-01-2015 11:22

Re: C++ dashboard
 
To clarify, the C++ Dashboard option on the Driver Station will launch the SmartDashboard, which you can interact with using the code in Fred's post. This option was there in previous years also. You can read more about SmartDashboard here: https://wpilib.screenstepslive.com/s/4485/m/26401

You can also write your own dashboard in any language you want, and have it launched by the Driver Station by modifying the ini file referenced here: https://wpilib.screenstepslive.com/s...tware#SetupTab

SuperBK 17-01-2015 13:21

Re: C++ dashboard
 
The link for how to set DS.INI to run the smart dashboard points to an invalid page? What is the syntax in ds.ini to start the smart dashboard?

Greg McKaskle 17-01-2015 21:46

Re: C++ dashboard
 
In FRC DS Data Storage.ini, change the line
DashboardCmdLine = ""C:\\Program Files (x86)\\FRC Dashboard\\Dashboard.exe""

to point to another file built in C++. The doubled characters are so that the ini file will treat them like a path that contains spaces.

Greg McKaskle

SuperBK 17-01-2015 22:59

Re: C++ dashboard
 
Should this work to start the smart dashboard automatically when I select "Default Dashboard":

DashboardCmdLine=""java -jar C:\\Users\Developer\\wpilib\\tools\\SmartDashboard .jar""

Also even if I set the driver station to "C++ Dashboard", it defaults to "Labview" the next time I run it.

Greg McKaskle 18-01-2015 07:28

Re: C++ dashboard
 
The ini setting you show looks like it would work. Please put it into a cmd window, without the duplication of \ and ", and see if it works there. That is pretty much all the DS does with it.

As for the second issue, yeah. The refactoring accidentally turned the Default DB into a Boolean, which turns into a 0 or 1, which means the only two settings that persist the round trip are Default and LV. Sorry bout that. We are, of course, hoping that no update will be needed, but there are a few smaller issues like this that will be fixed if/when there is. I understand that there is a known issues list, but I couldn't find it just now.

Greg McKaskle

SuperBK 18-01-2015 10:57

Re: C++ dashboard
 
I had one single backslash in there, but still no joy. It just starts the default dashboard. I tried it on two different computers. For now, we will just have to start it manually.
Thanks,
Brian

althebaker43 18-01-2015 16:50

Re: C++ dashboard
 
I was able to start the SmartDashboard JAR by specifying the absolute path to the JRE executable, like so:

Code:

DashboardCmdLine = "C:\\Program Files\\Java\\jre1.8.0_25\\bin\\java.exe -jar C:\\Users\\althebaker43\\wpilib\\tools\\SmartDashboard.jar"

SuperBK 18-01-2015 19:22

Re: C++ dashboard
 
Sorry, didn't work for me. java was already in the PATH. Interestingly, it pointed to c:\ProgramData\Oracle\java\javapath. I didn't know java was there and I had installed it again under "Program Files". I changed my path to that, but still get the default dashboard.

Greg McKaskle 18-01-2015 21:16

Re: C++ dashboard
 
If /when the java dashboard selector worked, it would have sent

java -jar C:\Users\UserName\wpilib\tools\SmartDashboard.jar

to the a default shell.

If you cannot get the ini file to work, you can put a Dashboard.exe where the FRC Dashboard is installed. But I don't really see why the CmdLine doesn't work.

Greg McKaskle

SuperBK 18-01-2015 23:09

Re: C++ dashboard
 
I replaced Dashboard.exe with one of my own that executes

Code:

java -jar C:\Users\developer\wpilib\tools\SmartDashboard.jar
and it works to load the smart dashboard. I saved a copy of the default dashboard of course.

Not sure why the command line didn't work either, but enough fooling around this this for now. if anyone wants a copy of it, let me know.

Thanks for all the suggestions,
Brian

SuperBK 20-01-2015 22:21

Re: C++ dashboard
 
I found the correct page (by reading Chief Delphi)
https://wpilib.screenstepslive.com/s...anual-id=24192

The file I should have been editing is
C:\Users\Public\Documents\FRC\FRC DS Data Storage.ini

and NOT
DriverStation.ini in the driver station folder.

No wonder it didn't work!

Greg McKaskle 21-01-2015 08:24

Re: C++ dashboard
 
Whew. So not a bug. Thanks for letting us know.

Greg McKaskle


All times are GMT -5. The time now is 02:41.

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