diff options
| author | rebecca <ubq323@ubq323.website> | 2026-02-28 23:42:27 +0000 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-02-28 23:42:27 +0000 |
| commit | 4b87ebf9263215ae9a9a03d81b474bcf8b43465c (patch) | |
| tree | a3b1297ef5db956d3f9f2565c3e8f4080ce58882 | |
| parent | 2ac06f55702ca18b2e03eab3c590666caf101c0d (diff) | |
motion
| -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) |
