View Single Post
  #2   Spotlight this post!  
Unread 09-03-2014, 12:18
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
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.
Reply With Quote