View Single Post
  #6   Spotlight this post!  
Unread 20-02-2012, 20:15
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using throttle to manipulate Autonomous Mode

The other comments will improve the code, but you will still find an odd jerk at the beginning as the while loops will both run at least once. You may find it even a bit better to surround the loop with a case statement and change the loops to run forever. The case can be the Boolean results of the compare, or you convert it to an enum or integer using scaling, and put the code in various frames of the case.

Greg McKaskle
Reply With Quote