Go to Post Sometimes an aggravating season is the most educational. - Al Skierkiewicz [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 09-02-2014, 21:11
dystopic dystopic is offline
Registered User
FRC #1261
 
Join Date: Feb 2014
Location: Duluth
Posts: 5
dystopic is an unknown quantity at this point
Re: Robots don't quit

Quote:
Originally Posted by otherguy View Post
Command base is just the IterativeRobot class using the Command and Scheduler classes.

Look at your code, the main robot class probably has a line like this...
Code:
public class Robot extends IterativeRobot {
Note the "extends IterativeRobot" part.

Same goes for command base as I said before, no loops or thread.sleeps unless you understand the consequences and know it will not affect execution of the rest of the robot code. This is especially true for the code within a command - since the code in a command shares the 20ms execution period with all other active commands.
wait so would this be fine:
Quote:
timer = new Timer();
intake_b.set(true);
timer.start();
while(timer.get() < Constants.solenoid_timing.getDouble()){

}
if(timer.get() >= Constants.solenoid_timing.getDouble()){
intake_b.set(false);
}
the timing value is 2000ms
Reply With Quote
 


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 11:06.

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