Chief Delphi

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

phurley67 23-11-2016 11:25

SFX Dashboard Tabs
 
Is it possible to change the name of a tab? Even better does anyone know a way to change the displayed tab, from the robot? For example switch from a an auton display to a different display for teleop.


Thanks

euhlmann 23-11-2016 13:18

Re: SFX Dashboard Tabs
 
I believe you can edit the file directly. It's a tar with YAML for the layout inside. Just change the "name" field for the tab

phurley67 23-11-2016 16:57

Re: SFX Dashboard Tabs
 
Thanks, I peeked at the file and did not realize it was a tar file (I could see the yaml, but was not going to change it with all the binary noise at the top).

It worked, now if I could only figure out a way to switch tabs programatically.

euhlmann 23-11-2016 17:29

Re: SFX Dashboard Tabs
 
Don't think it's possible. You should make your own dashboard; it's quite easy.

First, get the NetworkTables library. You can build the official C++ and Java libraries using the project source code (follow readme.md instructions, then add to your project in C++ or Java). There is also Python, C#, and node.js (disclaimer: my own project, used for my webkit smartdashboard)

Then, you can connect to the robot as follows (Java)
Code:

// sets the address to roborio-862-frc.local
// You can also use setIPAddress(String address)
NetworkTable.setTeam(862);
NetworkTable.setClientMode();
NetworkTable.init();

// the table for the WPILib SmartDashboard class
// Preferences and LiveWindow are Preferences and LiveWindow
NetworkTable smartDashboard = NetworkTable.getTable("SmartDashboard");
// the default value parameter is returned from get*() if the client is not connected
double defaultValue = 0;
System.out.println(smartDashboard.getNumber("myNumberVariable", defaultValue));



All times are GMT -5. The time now is 09:36.

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