feat(status): statusvindue på skærmen slås til med en tast

This commit is contained in:
2026-09-30 14:52:35 +02:00
parent 131b1ad10c
commit ba2a3e94f1
11 changed files with 702 additions and 1 deletions
+10
View File
@@ -53,6 +53,16 @@ function ADStuckDiag.describe(vehicle)
return table.concat(parts, " ")
end
-- Kun læsning (statusvinduet): køretøjer der har holdt stille mindst minMs -> {{vehicle, ms}}, længst først.
function ADStuckDiag.stillVehicles(minMs)
local list = {}
for vehicle, ms in pairs(stillMs) do
if ms >= (minMs or ADStuckDiag.STILL_MS) then table.insert(list, {vehicle = vehicle, ms = ms}) end
end
table.sort(list, function(a, b) return a.ms > b.ms end)
return list
end
function ADStuckDiag.tick(dt)
timerMs = timerMs + (dt or 0)
if timerMs < ADStuckDiag.CHECK_INTERVAL_MS then return end