This commit is contained in:
Laurie Fisher 2025-06-27 15:24:35 +01:00
parent e0c5b67eea
commit 53f96bf5db
Signed by: PinkEyedOrphan
GPG Key ID: 7F827B68147AEE76

View File

@ -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)