wiiuse Forums

Last visit was: Tue Apr 22, 2008 8:45 pm It is currently Tue Apr 22, 2008 8:45 pm

All times are UTC

 [ 2 posts ] 
Author Message
 Post subject: synchronous events?
PostPosted: Sat Apr 19, 2008 9:42 pm 

Joined: Sat Apr 19, 2008 9:28 pm
Posts: 1
So I want to try and get pitch data every x milliseconds.

I tried:

while(1) {
wiiuse_poll(wiimotes, 1);
printf("wiimote pitch = %f\n", wiimotes[0]->orient.pitch);

This appears to get "lagged" pitch data. As if the events are being stacked up faster then I am polling them. How can I turn this into a synchronous system? I do not want a function to be called every time there is an "event", instead I want to get the pitch and key press data every x milliseconds.

Is this possible?

Thanks for any help!

p.s: great project!!

 Post subject: Re: synchronous events?
PostPosted: Sun Apr 20, 2008 5:30 am 
User avatar

Joined: Sat Feb 03, 2007 12:11 am
Posts: 172
No, sorry. Rather than sleep, you could poll() then check if the time you want to wait has elapsed before you do your printf().


 [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: Alexa [Bot] and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group