From b52776fe09b6d41681988fc2a7078a74a147418b Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Sun, 2 Aug 2026 11:56:20 +0800 Subject: [PATCH] fix: Reduce train pre-arrival debounce timeout to 2.5 minutes --- station_broadcast.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/station_broadcast.lua b/station_broadcast.lua index 96a22c0..8fdc895 100644 --- a/station_broadcast.lua +++ b/station_broadcast.lua @@ -2,7 +2,7 @@ -- ============================================================================ -- 1. Configuration & Constants -- ============================================================================ -local APP_VERSION_TEXT = "v1.0.21" +local APP_VERSION_TEXT = "v1.0.22" local CONFIG = { CLOUD_URL = "ws://stabadmin.fse-media.group", @@ -2256,8 +2256,8 @@ function Main.loop() local announceKey = tName .. "_" .. dest local now = os.epoch("utc") -- Prevent spamming: CRN's "1 min" can be fuzzy and stay for a while. - -- We increase the cooldown to 5 minutes (300000 ms) per train per destination. - if not State.announcedApproaching[announceKey] or (now - State.announcedApproaching[announceKey] > 300000) then + -- We increase the cooldown to 2.5 minutes (150000 ms) per train per destination. + if not State.announcedApproaching[announceKey] or (now - State.announcedApproaching[announceKey] > 150000) then State.announcedApproaching[announceKey] = now Utils.log("INFO", "Train Approaching: " .. tName) Network.send({