This commit is contained in:
Julian Brammer 2024-06-23 19:48:18 +02:00
parent fdee19b4db
commit ce5f8cd2cc
2 changed files with 4 additions and 8 deletions

View File

@ -34,13 +34,13 @@ local function getPos()
print("[Postion init]")
write("x: ")
x = read()
x = tonumber(read())
write("y: ")
y = read()
y = tonumber(read())
write("z: ")
z = read()
z = tonumber(read())
write("r (S=0,W=1,N=2,E=3):")
r = read()
r = tonumber(read())
basic.clearDisplay()
pos["x"] = x

View File

@ -325,12 +325,9 @@ if fs.exists "brulijam/files/state-t-fiboMiner.txt" then
checkPosition()
mineFibo()
else
print("c1")
state = getState()
print("c2")
local pos = tutel.getPos()
print("c3")
state["lastValidR"] = pos["r"]
state["lastValidX"] = pos["x"]
@ -338,6 +335,5 @@ else
state["lastValidZ"] = pos["z"]
setState(state)
print("c4")
end