.
This commit is contained in:
parent
fdee19b4db
commit
ce5f8cd2cc
@ -34,13 +34,13 @@ local function getPos()
|
|||||||
print("[Postion init]")
|
print("[Postion init]")
|
||||||
|
|
||||||
write("x: ")
|
write("x: ")
|
||||||
x = read()
|
x = tonumber(read())
|
||||||
write("y: ")
|
write("y: ")
|
||||||
y = read()
|
y = tonumber(read())
|
||||||
write("z: ")
|
write("z: ")
|
||||||
z = read()
|
z = tonumber(read())
|
||||||
write("r (S=0,W=1,N=2,E=3):")
|
write("r (S=0,W=1,N=2,E=3):")
|
||||||
r = read()
|
r = tonumber(read())
|
||||||
basic.clearDisplay()
|
basic.clearDisplay()
|
||||||
|
|
||||||
pos["x"] = x
|
pos["x"] = x
|
||||||
|
@ -325,12 +325,9 @@ if fs.exists "brulijam/files/state-t-fiboMiner.txt" then
|
|||||||
checkPosition()
|
checkPosition()
|
||||||
mineFibo()
|
mineFibo()
|
||||||
else
|
else
|
||||||
print("c1")
|
|
||||||
state = getState()
|
state = getState()
|
||||||
print("c2")
|
|
||||||
|
|
||||||
local pos = tutel.getPos()
|
local pos = tutel.getPos()
|
||||||
print("c3")
|
|
||||||
|
|
||||||
state["lastValidR"] = pos["r"]
|
state["lastValidR"] = pos["r"]
|
||||||
state["lastValidX"] = pos["x"]
|
state["lastValidX"] = pos["x"]
|
||||||
@ -338,6 +335,5 @@ else
|
|||||||
state["lastValidZ"] = pos["z"]
|
state["lastValidZ"] = pos["z"]
|
||||||
|
|
||||||
setState(state)
|
setState(state)
|
||||||
print("c4")
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user