View Single Post
  #1   Spotlight this post!  
Unread 02-11-2006, 10:34
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by Daisy
After running it in my head (which may not be accurate), I think time is the problem. You're incrementing time, so that after 49, it reaches 50, but at it, you do not define what it does with it (ie Left() or Stop(), etc), so it will keep repeating left.Daisy
Yeah, but time gets incremented outside of the if statements. Unless he is clearing the PWM values somewhere, whatever was set in Left will still be sent to the motors for an additional cycle. If he is clearing the values, there would be a 1 cycle pause in the PWM output.

I agree with what was said above. Most likely the time variable isn't global or statically defined. Debug prints should make this apparent rather quickly if this is the case.