Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Missing Tools Directory: Netbeans (http://www.chiefdelphi.com/forums/showthread.php?t=127574)

SBcake 06-03-2014 21:33

Missing Tools Directory: Netbeans
 
Hello everybody, I am from team 4761 and we are currently struggling with setting up a Dashboard. We are open to using the FRC PC Dashboard or the SmartDashboard.

We have been working with this for a couple days and the only progress that we have made is getting the image from the camera onto these two Dashboards.

The specific problem we are having is transporting variables from the code to a Dashboard. (such as the value of

We have no "tools" directory in "sunspotfrcSDK" ... Is that bad...?
Does this sound like a NetworkTables issue to anyone?

Let me know what you guys think.
Thanks for any input!

pblankenbaker 09-03-2014 12:18

Re: Missing Tools Directory: Netbeans
 
The Smartdashboard for Java is present under the "tools" sub-directory on my system:

Code:

taco:~ pkb$ ls ~/sunspotfrcsdk/tools/
OutlineViewer.jar
RobotBuilder-723e66e1b976fd6f4f7b17596bf3da936bb6f9ac.jar
SmartDashboard.jar
SmartDashboard.javadoc.zip
TableViewer-ce9796aa332842b8b05fa7f8796c82b38420010c.jar
sfx.zip
taco:~ pkb$

The SmartDashoard.jar file is for the old (default) version of the Java Smart Dashboard. The sfx.zip file contains the new version. These files appear after installing the FRC Java NetBeans plugins. My guess is that if you don't have these files on your system, then your NetBeans plugins need to be re-installed.

Here is a trivial robot program that does nothing other than update a few values on the smart dashboard to serve as an example. If you run this program on your robot while the smart dashboard is up, you should see a "Autonomous" value appear and go "true" for 5 seconds when you run autonomous mode. When you run teleop, you should see "Operator Control" on appear on the dashboard in the "true" state.

Code:

public class RobotTemplate extends SimpleRobot {

    public void autonomous() {
        SmartDashboard.putBoolean("Autonomous", true);
        Timer.delay(5.0);
        SmartDashboard.putBoolean("Autonomous", false);
    }

    public void operatorControl() {
        SmartDashboard.putBoolean("Operator Control", true);
        while (isOperatorControl()) {
          Timer.delay(0.1);
        }
        SmartDashboard.putBoolean("Operator Control", false);
    }

    public void test() {
   
    }
}

The SmartDashboard class has several "put" methods for things other than booleans (numbers, strings, etc).

Hope that helps.


All times are GMT -5. The time now is 22:39.

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