View Single Post
  #1  
Old 02-08-2010, 05:00 PM
ursi ursi is offline
Member
 
Join Date: Dec 2009
Posts: 11
scheduled animation paths: jumps

Hi

Three animation paths should be scheduled one after another.

The path speed should be 100 steps/sec
Code:
pathFW.speed(100) # default: 1/sec?
I thought the waiting time should be devided by 100 as well>
Code:
yield viztask.waitTime(len(BW_Pos)/100)
My schedule looks like that, but in the animation there is a jump at the end of the first animation path... I guess, there is a timing problem and the system starts with the second path (pathStopp) before the 1st path (pathFW) is finished.

Code:
def onkeydown(key):
	PATH()
	if key == 't':
		###+++++++++++++++++++++++++++
		### SCHEDULE the room movement, sound and the output voltage
		def ScheduleOutputs():
				song.play()
				d.eAnalogOut(3.0, 0.0) #(AO0, AO1)
				pathFW.play()
				yield viztask.waitTime(((len(FW_Pos))/100))
				d.eAnalogOut(1.0, 0.0)
				pathStopp.play()
				yield viztask.waitTime(((len(Stopp_Pos))/100))
				d.eAnalogOut(3.0, 0.0)
				pathBW.play()
				yield viztask.waitTime(((len(BW_Pos))/100))
				d.eAnalogOut(1.0, 0.0)
				song.stop()
				
		viztask.schedule(ScheduleOutputs())		
###+++++++++++++++++++++++++++
viz.callback(viz.KEYDOWN_EVENT,onkeydown)
So, how can I manage that timing problem?
Attached Files
File Type: txt SledMotionBW.txt (3.8 KB, 972 views)
File Type: txt SledMotionFW.txt (3.3 KB, 988 views)
File Type: txt SledMotionStopp.txt (886 Bytes, 1049 views)
Reply With Quote