Go to Post This year may be one of the first years where there is a drastic difference in Regional level and Championship level strategies that drive robot design. - tim-tim [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-03-2003, 00:10
manodrum manodrum is offline
Registered User
#1127
 
Join Date: Feb 2003
Location: Alpharetta, GA
Posts: 3
manodrum is an unknown quantity at this point
Question autonomous location

is it best to put the autonomous code in a SUB? or have it in the main loop? if it is in the main loop, how do you stop it from running if you aren't in autonomous mode? I read the article here:

http://www.combbat.com/programming/autonomous.shtml

and I'd like to do my autonomous that way, but I just need to know where to put it.

Thanks,
manodrum
  #2   Spotlight this post!  
Unread 28-03-2003, 00:24
Jeff_Rice's Avatar
Jeff_Rice Jeff_Rice is offline
ElementisRegamusProelium
#1359
Team Role: Programmer
 
Join Date: Dec 2002
Location: Linn County
Posts: 283
Jeff_Rice will become famous soon enoughJeff_Rice will become famous soon enough
We did it in a subroutine. That way, all we had to do was return at the end and thus we made sure we didn't accidently have it do autonomous when we were supposed to drive.
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"
  #3   Spotlight this post!  
Unread 28-03-2003, 07:45
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
I put ours in a sub and every function on our robot was in a sub and I always call all the subs, but at the top of the autonomous I put an if statement like this. if auton_mode = 0 then Return . This canceled the sub if we where not in autonomous mode.
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
  #4   Spotlight this post!  
Unread 01-04-2003, 20:57
Dusan Dusan is offline
Registered User
#0548 (Robostangs)
 
Join Date: Mar 2003
Location: Northville, Michigan
Posts: 8
Dusan is an unknown quantity at this point
3 bank software

Instead of using subs ... why don't you get the new version of P-basic and use multiple banks to switch between softwares.

It keeps it organized and its easy to use

i.e. If auton_mode = 1 THEN
run 2
ENDIF

... thats all it takes to switch between softwares .... if you have anymore questions about how to use it ... just e-mail me at
robostangs548@hotmail.com
  #5   Spotlight this post!  
Unread 02-04-2003, 08:05
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
Multiple programs are nice but a program can be organized with subs. Multiple also works in the old version.
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
Electrical componenets for autonomous navigation maclaren Electrical 10 18-12-2003 02:28
crazy idea for autonomous Mike Ciance Programming 16 24-04-2003 21:50
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


All times are GMT -5. The time now is 16:39.

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