summaryrefslogtreecommitdiff
path: root/motion.lua
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-02-28 23:42:27 +0000
committerrebecca <ubq323@ubq323.website>2026-02-28 23:42:27 +0000
commit4b87ebf9263215ae9a9a03d81b474bcf8b43465c (patch)
treea3b1297ef5db956d3f9f2565c3e8f4080ce58882 /motion.lua
parent2ac06f55702ca18b2e03eab3c590666caf101c0d (diff)
motion
Diffstat (limited to 'motion.lua')
-rw-r--r--motion.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/motion.lua b/motion.lua
index e469a16..715d038 100644
--- a/motion.lua
+++ b/motion.lua
@@ -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)