diff options
| -rw-r--r-- | motion.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -20,17 +20,17 @@ local function strengthclamp(x) return math.max(math.min(x,4),0) end parallel.waitForAny( function() while true do - if vover then p.launch(0,-90,hstrength) + if vover then p.launch(0,-90,vstrength) else os.sleep(0) end end end, function() while true do htext.setText(tostring(hstrength)) vtext.setText(tostring(vstrength)) local _,key = os.pullEvent"key" - if key == 265 then hstrength=hstrength+hdelta - elseif key == 264 then hstrength=hstrength-hdelta - elseif key == 262 then vstrengtv=vstrengtv-vdelta - elseif key == 263 then vstrengtv=vstrengtv+vdelta + if key == 265 then vstrength=vstrength+vdelta + elseif key == 264 then vstrength=vstrength-vdelta + elseif key == 262 then hstrength=hstrength-hdelta + elseif key == 263 then hstrength=hstrength+hdelta elseif key == 67 then p.launch(yaw, pitch, hstrength) elseif key == 86 then vover = not vover vtext.setAlpha(vover and 255 or 0) |
