View Single Post
  #4   Spotlight this post!  
Unread 20-01-2014, 21:08
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: 431
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: Java Autonomous Periodic

In the Iterative robot project. The AutonomousInit() method is called once, each time the auto mode is entered (this is triggered by the field). It is meant to aid in initializing variables/components to known states.

Putting code in this method which delays for any significant length of time is not what it was designed for. I've take a look through the source code for the IterativeRobot class, and I can't find anything indicating that it won't work (that's not saying that it will). Just know that the Timer.delay() method should never be used in any of the periodic methods within the IterativeRobot project.

The SimpleRobot class, on the other hand, will work perfectly fine with such delays in the auto/teleop methods. You might consider using that class instead if you anticipate needing to use delays in other areas of your code.
__________________
http://team2168.org
Reply With Quote