Hi All,
I have modified one of the brat biped programs to understand the "movement" subroutine.
In my code I ask for a delay to be entered and then a command. The code looks like this
Code:
hserout ["enter delay 4 chars ", 13]
hserin [str delay\4\13]
; hserout [ "You entered delay of ", str delay,13]
main
hserout ["Enter a move command ", 13]
hserin [str cmd\2\13]
command = cmd
gosub move
pause delay
goto main
The move referenced above is a long subroutine where it formats and calls the movement subroutine - small snippet here
Code:
move:
if(command = 1) then ; Walk Forward
hserout ["Forward",13]
;Note, movement subroutine arguments are Rightankle,Rightknee,Righthip,Leftankle,Leftknee,Lefthip,speed
gosub movement [ 7.0,-20.0,-20.0, -7.0, 20.0, 20.0, 500.0]
pause delay
gosub movement [ -7.0,-20.0,-20.0, 7.0, 20.0, 20.0, 500.0]
pause delay
gosub movement [ -7.0, 20.0, 20.0, 7.0,-20.0,-20.0, 500.0]
pause delay
gosub movement [ 7.0, 20.0, 20.0, -7.0,-20.0,-20.0, 500.0]
pause delay
elseif(command = 2) ; Walk Backwards
hserout ["Back",13]
gosub movement [ -7.0,-20.0,-20.0, 7.0, 20.0, 20.0, 500.0]
pause delay
gosub movement [ 7.0,-20.0,-20.0, -7.0, 20.0, 20.0, 500.0]
pause delay
gosub movement [ 7.0, 20.0, 20.0, -7.0,-20.0,-20.0, 500.0]
pause delay
gosub movement [ -7.0, 20.0, 20.0, 7.0,-20.0,-20.0, 500.0]
pause delay
elseif(command = 3) ; Long Stride Forward
What I am seeing is that the program when executed never even goes in to move!!!!
Any ideas ?
Thanks
Gopal