Go to Post My wife just looked over my shoulder, shook her head, and said "Only engineers...." - Tom Line [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-03-2014, 21:33
SBcake's Avatar
SBcake SBcake is offline
Registered User
AKA: Sam Bacon
FRC #4761 (Robockets)
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Reading MA
Posts: 3
SBcake is an unknown quantity at this point
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!
Reply With Quote
  #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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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