WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-19-2008, 01:48 PM
vizLearner vizLearner is offline
Member
 
Join Date: Nov 2008
Posts: 2
vizact.ontimer problems?

Hi all,
I have a program that is supposed to give stimuli to a subject and constantly monitor a button for feedback from the subject. The button is not keyboard, but connected by adding a .dls file. The method to check the button, however, never runs. I had an older version that used a callback to a timer_event perfectly, and I don't know why it won't work now. Heres the code below that I think is relevant...


def giveStimuli():
...
def checkButton():
...
vizact.ontimer(.001,checkButton)
starttimer(0,.001,FOREVER)
viztask.schedule(giveStimuli())
Reply With Quote
  #2  
Old 11-19-2008, 02:42 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
checkButton should be getting called. try

Code:
def checkButton():
	print "in checkButton"

vizact.ontimer(0,checkButton)
this following line has incorrect syntax and you don't need it here for calling checkButton since you are using vizact.ontimer

Code:
starttimer(0,.001,FOREVER)
if you were using a callback with it it would be

Code:
viz.starttimer(0,0,viz.FOREVER)
one other thing is that your timer will not run every .001 seconds. It will only get called as fast as your framerate. If you use 0 for the rate the timer will be called every frame.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 problems with our HMD Vbents Precision Position Tracker (PPT) 1 07-26-2006 07:55 PM
avatar animation problems jrodman Vizard 1 01-18-2006 09:12 AM
Export/import problems and Vizard 3.0 release searsky Vizard 0 01-03-2006 01:34 AM
Viz PPT 1 problems Adam Precision Position Tracker (PPT) 3 08-30-2005 10:51 AM
Problems with lighting in 2.0 murm Vizard 6 04-21-2004 09:59 AM


All times are GMT -7. The time now is 10:29 PM.


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