From 94713539daac7c098c48e388ac9bdcd39e1e16a3 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Mon, 16 Feb 2026 00:34:35 -0500 Subject: [PATCH] fix: Enhance GPS position retrieval with increased timeout and logging --- turtle.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/turtle.lua b/turtle.lua index a8b8284..8213095 100644 --- a/turtle.lua +++ b/turtle.lua @@ -54,15 +54,19 @@ print("ID: " .. os.getComputerID()) -- GPS Functions local function updatePosition() - local x, y, z = gps.locate(2) + print("Requesting GPS position...") + local x, y, z = gps.locate(10) -- Increased timeout to 10 seconds if x then state.position = {x = math.floor(x), y = math.floor(y), z = math.floor(z)} + print("GPS position: " .. x .. ", " .. y .. ", " .. z) return true end + print("GPS timeout - no position received") return false end local function setHome() + print("Setting home position...") if updatePosition() then state.homePosition = { x = state.position.x,