From 53f96bf5dbbd9996d66f20fb7828b2f17f72f69e Mon Sep 17 00:00:00 2001 From: Laurie Fisher Date: Fri, 27 Jun 2025 15:24:35 +0100 Subject: [PATCH] test --- libs/turtleutils.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/turtleutils.lua b/libs/turtleutils.lua index 13c7e70..5cba0b0 100644 --- a/libs/turtleutils.lua +++ b/libs/turtleutils.lua @@ -95,14 +95,17 @@ local function refuelIfNeeded() end while fuel < MIN_FUEL do - if statusCallback then statusCallback("out_of_fuel") end - + local x, y, z, gpsActive = M.getPosition() local posText = gpsActive and string.format("GPS (%d,%d,%d)", x, y, z) or 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) local added = refuelFromInventory(MIN_FUEL)