Update
This commit is contained in:
parent
dbd2687ffe
commit
479fd0bb4e
@ -42,7 +42,7 @@ local function ensure_dotlua(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function gitea_url(path)
|
local function gitea_url(path)
|
||||||
return "https://gitea.leafbla.de/dominic/turtles/raw/branch/master/".. path
|
return "https://git.leafbla.de/dominic/turtles/raw/branch/master/".. path
|
||||||
end
|
end
|
||||||
|
|
||||||
local function download_file(repo_path, local_path)
|
local function download_file(repo_path, local_path)
|
||||||
|
@ -57,7 +57,7 @@ end
|
|||||||
|
|
||||||
local function move(raw_move, position_update)
|
local function move(raw_move, position_update)
|
||||||
return function()
|
return function()
|
||||||
success, err = raw_move()
|
local success, err = raw_move()
|
||||||
if not success then
|
if not success then
|
||||||
return false, err
|
return false, err
|
||||||
end
|
end
|
||||||
|
@ -43,12 +43,6 @@ local BACKUP_SAP_SLOT_TARGET_COUNT = 20
|
|||||||
-- Should be enough even if every tree is fully grown
|
-- Should be enough even if every tree is fully grown
|
||||||
local FUEL_LEVEL_TARGET = 1000
|
local FUEL_LEVEL_TARGET = 1000
|
||||||
|
|
||||||
local function breakpoint()
|
|
||||||
write("Enter to step ")
|
|
||||||
repeat e, d = os.pullEvent() until e == "key" and d == 257
|
|
||||||
print("(OK)")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function calculate_tree_position(row_index, tree_index)
|
local function calculate_tree_position(row_index, tree_index)
|
||||||
|
|
||||||
local x = (row_index - 1) * 5
|
local x = (row_index - 1) * 5
|
||||||
@ -72,7 +66,9 @@ local function greedy_move(x, z, o)
|
|||||||
T.rotateTowards("-z")
|
T.rotateTowards("-z")
|
||||||
end
|
end
|
||||||
for _ = 1, math.abs(z - T.state.z) do
|
for _ = 1, math.abs(z - T.state.z) do
|
||||||
T.fwd()
|
while not T.fwd() do
|
||||||
|
sleep(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -83,7 +79,9 @@ local function greedy_move(x, z, o)
|
|||||||
T.rotateTowards("-x")
|
T.rotateTowards("-x")
|
||||||
end
|
end
|
||||||
for _ = 1, math.abs(x - T.state.x) do
|
for _ = 1, math.abs(x - T.state.x) do
|
||||||
T.fwd()
|
while not T.fwd() do
|
||||||
|
sleep(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user