View Single Post
  #2   Spotlight this post!  
Unread 09-02-2013, 17:45
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Printing to a text file

Reading and writing to the cRIO flash memory isn't really well documented, but you can look in the WPILib source code at the Preferences class. It stores robot preferences in a text file. You can find the code in the Preferences.cpp and Preferences.h files.

The writing is done by a method called WriteTaskRun() that opens the file and writes a bunch of data to it then closes the file.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote