This commit is contained in:
Kai Vogelgesang 2021-02-09 16:28:41 +01:00
parent dbd2687ffe
commit 479fd0bb4e
3 changed files with 8 additions and 10 deletions

View File

@ -42,7 +42,7 @@ local function ensure_dotlua(path)
end
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
local function download_file(repo_path, local_path)

View File

@ -57,7 +57,7 @@ end
local function move(raw_move, position_update)
return function()
success, err = raw_move()
local success, err = raw_move()
if not success then
return false, err
end

View File

@ -43,12 +43,6 @@ local BACKUP_SAP_SLOT_TARGET_COUNT = 20
-- Should be enough even if every tree is fully grown
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 x = (row_index - 1) * 5
@ -72,7 +66,9 @@ local function greedy_move(x, z, o)
T.rotateTowards("-z")
end
for _ = 1, math.abs(z - T.state.z) do
T.fwd()
while not T.fwd() do
sleep(1)
end
end
end
@ -83,7 +79,9 @@ local function greedy_move(x, z, o)
T.rotateTowards("-x")
end
for _ = 1, math.abs(x - T.state.x) do
T.fwd()
while not T.fwd() do
sleep(1)
end
end
end