WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Joystick update rate? (https://forum.worldviz.com/showthread.php?t=1786)

rav 01-23-2009 05:22 AM

Joystick update rate?
 
Hi!

I found this in the vizjoy.py file:
Quote:

#Update joystick events with same priority as input tasks
viz.EventClass.callback(self,viz.UPDATE_EVENT,self .__update,priority=viz.PRIORITY_INPUT)
Does that mean the state is only updated every frame?
Is it possible to get this to be updated every ms or every tick?

We need precise reaction time measurement like in the "tutorial_reactionTime.py" example but with custom joystick buttons.
I tried "yield viztask.waitEvent(vizjoy.BUTTONDOWN_EVENT, data)" but the data object does not seem to be updated. So I don't know how to get the time, the event occured.

farshizzo 01-26-2009 05:33 PM

If you look in the __update function of the joystick class, you'll see that it simply polls the state of the buttons. You could create a thread that polls the joystick button state at a higher rate. However, I'm not sure this method will provide enough accuracy for your experiment.

I've heard of some software that allows you to map a joystick button to a keyboard press. I don't know exactly how they work, so they might end up adding even more latency.

Vizard supports Cedrus response pads, which are made for reaction timing experiments. You might want to look into this.


All times are GMT -7. The time now is 05:00 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC