Thread: sleep()
View Single Post
  #25   Spotlight this post!  
Unread 23-02-2004, 17:12
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: sleep()

Ive been wanting to scope the loop myself, but havent got to it yet- thanks for instrumenting your RC.

One thing I have not been able to figure out. The main loop looks for new input from the OI, and if it doesnt see it, it call the user_fast code

I dont see anything in the fast code to throttle it back - can you put your toggles at the beginning and end of the fast section and see how fast it runs with your scope for us?

I thought they said it runs every 4mS or so, and you have to be carefull not to overwhelm the pwms by changing them too fast - I also think you cannot do a get_analog_value... too quickly either?

but does anyone know - is the fast code loop timed by some event (the get or put data maybe?)

and is its period consistant?

BTW - if you are looking at timing be sure to comment out all your printf statements - there seems to be a whole library of code behind them, I think they will make a drastic reduction in your loop speed.

Last edited by KenWittlief : 23-02-2004 at 17:14.