test
This commit is contained in:
parent
e0c5b67eea
commit
53f96bf5db
@ -95,14 +95,17 @@ local function refuelIfNeeded()
|
|||||||
end
|
end
|
||||||
|
|
||||||
while fuel < MIN_FUEL do
|
while fuel < MIN_FUEL do
|
||||||
if statusCallback then statusCallback("out_of_fuel") end
|
|
||||||
|
|
||||||
local x, y, z, gpsActive = M.getPosition()
|
local x, y, z, gpsActive = M.getPosition()
|
||||||
local posText = gpsActive and
|
local posText = gpsActive and
|
||||||
string.format("GPS (%d,%d,%d)", x, y, z) or
|
string.format("GPS (%d,%d,%d)", x, y, z) or
|
||||||
string.format("Manual (%d,%d,%d)", x, y, z)
|
string.format("Manual (%d,%d,%d)", x, y, z)
|
||||||
logger.log("No fuel. Waiting for fuel... Location: " .. posText)
|
|
||||||
|
|
||||||
|
if statusCallback then
|
||||||
|
statusCallback("out_of_fuel " .. posText)
|
||||||
|
end
|
||||||
|
|
||||||
|
logger.log("No fuel. Waiting for fuel... Location: " .. posText)
|
||||||
sleep(5)
|
sleep(5)
|
||||||
|
|
||||||
local added = refuelFromInventory(MIN_FUEL)
|
local added = refuelFromInventory(MIN_FUEL)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user