View Single Post
  #3   Spotlight this post!  
Unread 16-02-2013, 17:31
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: Trouble understanding timed tasks in Periodic vi

Let me restate what Mark said a different way.

There are four things in the loop that run simultaneously. They are the Wait for 10ms, the production of the i, determining if the loop runs another iteration, and the test of joystick button and conditional motor stuff.

The iteration of a loop completes when all inner tasks complete, and the wait of 10 ensures that it doesn't run faster than 100 times per second. With no delay, it would be way faster than you need and would take all of the CPU time that others aren't using.

Greg McKaskle
Reply With Quote