View Single Post
  #6   Spotlight this post!  
Unread 13-02-2014, 00:12
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: Using Coniditionals to Build Custom Command Groups

Quote:
Originally Posted by aziobro View Post
But it gets run during program load when the command group is constructed.
I want it to run After autonomous is started.
Move where you're instantiating the auto command. I think the default project creates the auto command in robotInit(). I'll assume that's where you're instantiating the command in your program.

If you move this statement down into autoInit() you should get what you're asking for, no?

Code:
public void autonomousInit() {
    	// instantiate and schedule the command used for the autonomous period
        autonomousCommand = new YourAutoCommand();
        autonomousCommand.start();

...
__________________
http://team2168.org
Reply With Quote