Go to Post I'm not worried about talking to the robot, but I am worried about when the robot starts talking back... - Moros [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 09-02-2010, 01:28
Thomas4019 Thomas4019 is offline
Registered User
FRC #3006
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Salt Lake City
Posts: 7
Thomas4019 is an unknown quantity at this point
Smile Java Dynamic Settings

Our teams have found the deployment times with Java+Netbeans can take quite a while. We have found it to take a long time to fine-tune certain settings. To solve this problem our team has developed a specialized Java class called Settings.

It allows us to store settings on a text file (settings.txt) on the root of the cRIO. Then, we can change the file, upload it through FTP, and the values are instantly changed. This has proved invaluable to our development process. I thought I would share this to help other teams that may be having similar problems.

For example, in our code we use Settings.getDouble("Min Radius") so that the minimum radius required for vision tracking can be changed at run time. This has saved us hours of debugging time!

Our Settings.java file can be found on our team's site here

Here's our settings.txt file which can be used as an example for the syntax of the file. Basically, it's just "key = value" for each line.

We have been able to configure Textpad to upload the current file to the robot by only pressing Control + 4. If you want help configuring Textpad to do this, I can post a guide here.

If you attempt to retrieve a setting that does not exist in the file it will throw a NullPointerException. Also, any lines in the settings.txt file that don't have an "=" character are simply ignored. Finally, you must have a setting with a key of "Autoupdate Delay" which specifies the number of milliseconds before the settings.txt file will be read again.

Hope this helps,
Thomas Hansen
Team 3006
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
**FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** Pjohn1959 Programming 37 31-08-2009 15:55
Wireless settings IndySam FRC Control System 2 24-11-2008 15:19
Optimal Tracking settings bush Programming 2 31-01-2006 11:38
Setting Autonomous Settings from OI Tom Saxton Programming 15 27-03-2005 11:45
Pneumatic settings Raz Pneumatics 8 03-02-2003 20:38


All times are GMT -5. The time now is 10:44.

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