View Single Post
  #2   Spotlight this post!  
Unread 17-02-2014, 01:04
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 434
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Saving values on cRIO

You may find team 254s implementation of a constants.txt file useful:
https://github.com/Team254/FRC-2013/...tantsBase.java
https://github.com/Team254/FRC-2013/...Constants.java

It doesn't write out to a file. It looks for a text file on the crio at startup and allows you to override default values of variables in your program.

I'm assuming you want the ability to calibrate your arm angle without having to recompile code. This could be achieved by uploading new versions of a constants.txt file over FTP to your robot using the above implementation.

You could alternatively extend this implementation to allow the constants.txt file to be written to by the robot. Take a look at java.io.DataOutputStream
__________________
http://team2168.org