Go to Post It's that science and technology inspiration stuff - never know where it'll take you. :) - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-02-2012, 23:35
touchdownjesus4's Avatar
touchdownjesus4 touchdownjesus4 is offline
Registered User
AKA: Tyler Vonderhaar
FRC #4028 (Eagle Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cincinnati, OH
Posts: 64
touchdownjesus4 is on a distinguished road
Re: Help Programming Autonomous

Ok so this is what I have set up, will the Timer.delay(3) delay the next command from running for three seconds, or do I have to use something else?

Quote:
public class AutonomousCommand extends CommandGroup {

public AutonomousCommand() {
addParallel(new AutonomousShoot());
Timer.delay(3);
addSequential(new AutonomousDeliver());
addSequential(new AutonomousConveyor());
addSequential(new AutonomousDeliver());
addSequential(new AllStop());
Reply With Quote
  #2   Spotlight this post!  
Unread 27-02-2012, 23:39
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Help Programming Autonomous

Quote:
Originally Posted by touchdownjesus4 View Post
Ok so this is what I have set up, will the Timer.delay(3) delay the next command from running for three seconds, or do I have to use something else?
100% don't do that! You'll end up pausing all commands for 3 seconds...

Instead of Timer.delay(3), you want addSequential(new WaitCommand(3));
Reply With Quote
  #3   Spotlight this post!  
Unread 27-02-2012, 23:53
touchdownjesus4's Avatar
touchdownjesus4 touchdownjesus4 is offline
Registered User
AKA: Tyler Vonderhaar
FRC #4028 (Eagle Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cincinnati, OH
Posts: 64
touchdownjesus4 is on a distinguished road
Re: Help Programming Autonomous

Quote:
Originally Posted by Sunstroke View Post
100% don't do that! You'll end up pausing all commands for 3 seconds...

Instead of Timer.delay(3), you want addSequential(new WaitCommand(3));

haha alright thanks, new programmer here so I don't exactly know what everything does. Didn't know there was such a thing as WaitCommand() but thanks!

Last edited by touchdownjesus4 : 27-02-2012 at 23:55.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi