Go to Post Off season is a good way to go outside the district. - 346CADmen [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-01-2012, 17:54
neal's Avatar
neal neal is offline
Neal
FRC #1777 (Viking Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2009
Location: United States
Posts: 56
neal is an unknown quantity at this point
Re: A good time based way to program

Thanks all for your suggestions. I'm trying to just stick with SimpleRobot for this year since I don't think we have enough time now to write it for CommandBased one, and to test, troubleshoot it.

Brad, does timeouts also work with SimpleRobot, I checked the cookbook and it only shows examples for the command-based bot.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2012, 03:44
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: A good time based way to program

Quote:
Originally Posted by neal View Post
Thanks all for your suggestions. I'm trying to just stick with SimpleRobot for this year since I don't think we have enough time now to write it for CommandBased one, and to test, troubleshoot it.

Brad, does timeouts also work with SimpleRobot, I checked the cookbook and it only shows examples for the command-based bot.
Unfortunately it doesn't. You're correct that if you do a Timer.delay() it will stop the thread, and the rest of the program. If you want overlapped stuff happening then, as you suggested, you can use timers. Then you'll need a loop that checks if the time is up on the drive system while continuing to service the other subsystems. For trying to do a lot of overlapping operations I'd prefer to use the IterativeRobot base class. Then the looping is built in.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2012, 19:10
neal's Avatar
neal neal is offline
Neal
FRC #1777 (Viking Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2009
Location: United States
Posts: 56
neal is an unknown quantity at this point
Re: A good time based way to program

Thanks!

We'll probably just use Command Based Robot. Just started writing it again and looking through the cookbook and GearsBot.
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 11:21.

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