View Single Post
  #3   Spotlight this post!  
Unread 30-12-2009, 21:29
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,753
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: New Programmer looking for some help!

Another thing that hasn't been mentioned is that you are putting a long loop into the autonomous iterative callback. There are two supported ways of doing the autonomous -- iterative and independent.

The independent is somewhat easier to use for things like this. You enter your loop and use the Delay & Feed VI to time the movements in the loop. If you open the autonomous independent, there is code very similar to this already present, but turned off with a case structure and a constant. The independent runs until the DS or FMS ends the auto and disables the robot.

The iterative is supposed to return within 20ms so that the next packet can cause your callback to be called again. Technically, you can do this with the iterative, you you'll need to make some state data such as a global to keep track of the existing state and to trigger new state changes on some of the calls.

Greg McKaskle
Reply With Quote