View Single Post
  #4   Spotlight this post!  
Unread 18-02-2010, 06:37
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,748
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: Kicking while driving

The two code implementations are very similar. Do this as fast as you can until enough time passes.

A couple other approaches to try.

Put the kicking code in a parallel loop that looks at a global to see if it should kick, hold, or return the foot, etc. Then in teleop drive, just set the globals based on the joystick. In the parallel loop you can still use your timed sequence just fine.

A more efficient way of doing the notification is to use an occurrence, queue, or other programming mechanism to let drive signal the loop when it should start a new sequence.

Another approach is to break up the code and keep it in the teleop, but make it a state machine as already mentioned.

Greg McKaskle
Reply With Quote