chore: pålæsnings-diagnose viser rotation, fortsæt-ved-tom og modhold — 1.62.158

This commit is contained in:
2026-10-10 06:02:31 +02:00
parent 6e5bf05fa2
commit a8932a5180
3 changed files with 9 additions and 2 deletions
+7 -1
View File
@@ -74,8 +74,14 @@ local function adGates(adEnv, vehicle, trailer, trigger, fillType)
end
local tm = vehicle.ad.trailerModule
if tm ~= nil then
table.insert(parts, string.format("AD: isLoading=%s trigger=%s", tostring(tm.isLoading), tostring(tm.trigger ~= nil)))
table.insert(parts, string.format("AD: isLoading=%s trigger=%s activeAtTrigger=%s", tostring(tm.isLoading), tostring(tm.trigger ~= nil),
tostring(tm.isActiveAtTrigger ~= nil and tm:isActiveAtTrigger())))
end
-- LoadAtDestinationTask afslutter straks ved rotation "kun pålæsning"/"fortsæt ved tom silo" — medmindre modden holder vognen
local okR, rotate = pcall(autoDrive.getSetting, "rotateTargets", vehicle)
local okC, continueEmpty = pcall(autoDrive.getSetting, "continueOnEmptySilo", vehicle)
local okW, wait = pcall(function() return ADSmartPickup ~= nil and ADSmartPickup.shouldWaitForLoading ~= nil and ADSmartPickup.shouldWaitForLoading(vehicle) end)
table.insert(parts, string.format("rotér=%s fortsætTom=%s smartHolder=%s", okR and tostring(rotate) or "?", okC and tostring(continueEmpty) or "?", okW and tostring(wait) or "?"))
return table.concat(parts, " ")
end