Add debug print to Error :64

This commit is contained in:
Dominic Zimmer 2020-07-10 23:02:24 +02:00
parent 1b29082bee
commit be2c995f86

View File

@ -423,7 +423,7 @@ function drawStatus()
if turtlestate["job"] then if turtlestate["job"] then
print("Current job: "..tostring(turtlestate["job"])) print("Current job: "..tostring(turtlestate["job"]))
else else
print("Current job: ") print("Current job: -")
end end
print() print()
if turtlestate["startfuel"] then if turtlestate["startfuel"] then
@ -523,6 +523,7 @@ function enqueueForJob2()
updateState({ state = "Waiting for job... (retrying)" }) updateState({ state = "Waiting for job... (retrying)" })
sleep(3) sleep(3)
else else
updateState({ state = "I was assigned job "..job })
return tonumber(job) return tonumber(job)
end end
end end
@ -683,7 +684,8 @@ end
function turtleAI2() function turtleAI2()
while true do while true do
local job = enqueueForJob2() local job = enqueueForJob2()
turtlestate["job"] = job --turtlestate["job"] = job
updateState({ job = job })
doRefuel2() doRefuel2()
--turtlestate["startfuel"] = turtle.getFuelLevel() --turtlestate["startfuel"] = turtle.getFuelLevel()
goToJob2(job) goToJob2(job)