View Single Post
  #8   Spotlight this post!  
Unread 16-03-2012, 02:33
AlexD744 AlexD744 is offline
Registered User
FRC #0744 (744 Shark Attack)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Ft. Lauderdale, FL
Posts: 638
AlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond repute
Re: Help Programming Autonomous

As far as timeOuts for commands, although you are setting the timeout, did you change the isFinished() method to read "return isTimedOut();" I had an issue with this before i buckled down and decided to actually read the documentation more thoroughly.

if you want to know what our code looks like, it's a simple three line command sequence.

addParallel(new TmAutonPrepareShooter(1.0));
addSequential(new WaitCommand(3.0));
addSequential(new TmAutonShootBall(5));

The first command simply sets the shooter to a speed to 1.0 and then returns. The second command is a 3 second delay while the shooter actually gets up to speed (notice that the first command says Parallel, while the second says Sequential). And the last command turns on the motors that feed into the shooter at a slow enough speed to allow time for the shooter to regain it's momentum. (The parameter is 5 seconds, speed is set within the class). In your case, you are breaking up the two motors that I'm controlling in one command. It seems like you are doing most of this, another thing to check is to make sure the in the end() and interrupted() methods of each command that you are stopping the motors. Not sure if this will solve you problem but I hope it helps.
__________________
www.sharkattack744.com
Reply With Quote