Commit 9c8ced4c authored by Robert Hedman's avatar Robert Hedman

direction update controller

parent f5eb833a
......@@ -109,11 +109,11 @@ def processInput(jData, mData):
turn = (0, 0)
if drive != (0, 0):
mData.lmotor = (sorted([0, (mData.lmotor[0] + pow(-1,turn[1])*turn[0]), 255])[1], mData.lmotor[1])
mData.rmotor = (sorted([0, (mData.rmotor[0] - pow(-1,turn[1])*turn[0]), 255])[1], mData.rmotor[1])
mData.lmotor = (sorted([0, (mData.lmotor[0] + pow(-1,turn[1])*turn[0]), 200])[1], mData.lmotor[1])
mData.rmotor = (sorted([0, (mData.rmotor[0] - pow(-1,turn[1])*turn[0]), 200])[1], mData.rmotor[1])
else:
mData.lmotor = (sorted([0, ( turn[0]), 245])[1], 1-turn[1])
mData.rmotor = (sorted([0, ( turn[0]), 245])[1], turn[1])
mData.rmotor = (sorted([0, ( turn[0]), 200])[1], turn[1] )
mData.lmotor = (sorted([0, ( turn[0]), 200])[1], sorted([0, (3-turn[1]), 2])[1] )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment