Go to Post Dean looks rather debonaire in a tux. Like some sort of engineer super hero. The tuxedo is like his Clark Kent costume under which lies his amazing denim suit, to be whipped out at a moments notice in the face of uninspired youth and problems unconquered. - phrontist [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 22-02-2003, 23:05
Unsung FIRST Hero
miketwalker miketwalker is offline
Robot Lifeguard
FRC #1902 (Exploding Bacon)
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Orlando, FL
Posts: 878
miketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond repute
Send a message via AIM to miketwalker
Autonomous code tutorial

Sorry about the lateness of this, I just haven't had time to sit down and write this up. But I figure some teams still might be able to use it. At http://www.combbat.com/programming/autonomous.shtml I have the tutorial. I came up with this code and then I saw in the white pages that some other people had a pretty similar idea for it too, so I wrote this up to help explain to rookie teams. Also, if any teams need help with their coding at the UCF Regionals or Nationals just come on by Team 21's pit and ask for me (Mike) and I'll come on over and help out. Good luck to everyone! If you need any help with your code you can also e-mail me at miketwalker@cfl.rr.com and I'll try to see what I can do to help out. Can't wait to see what you guys do on the field! Good luck programmers.
__________________
Chopsaw? Chopsaw.
  #2   Spotlight this post!  
Unread 23-02-2003, 09:21
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,604
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
There is one big problem with your code.
Code:
if counter = 50 ...
counter isn't guaranteed to ever be 50. Consider this scenario, counter is 49, and delta_t is 1. you increment counter as counter + 1 + delta_t. So after that loop, counter is 51. Since counter never equaled 50, you stay in that state forever (well, until counter overflows, and you have a chance to do it all over again).

You should be using >=

In my assembly class, we had a problem similar to this, except my professor rigged it so that if you just used = it was going to fail almost every time (to make it easier to find out). Since then, that's been one thing that I've always been careful about.
  #3   Spotlight this post!  
Unread 23-02-2003, 12:28
Unsung FIRST Hero
miketwalker miketwalker is offline
Robot Lifeguard
FRC #1902 (Exploding Bacon)
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Orlando, FL
Posts: 878
miketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond repute
Send a message via AIM to miketwalker
Thanks for that, I'll fix that now. That might explain why every now and then we have that glitch. Thanks.
__________________
Chopsaw? Chopsaw.
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
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Code From Experience EbonySeraphim Programming 7 14-03-2003 21:56
Overcomplicated Autonomous Code EbonySeraphim Programming 33 20-02-2003 21:53
Autonomous code PBoss Programming 7 14-01-2003 15:29
Autonomous Code Adrian Wong Robotics Education and Curriculum 1 18-11-2002 22:34


All times are GMT -5. The time now is 13: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