fix: Trigger train pre-arrival broadcast only on '现在' or '0' instead of '1 min'

This commit is contained in:
2026-08-02 12:02:44 +08:00
parent 53b4d1b296
commit 5c899b30bb
+2 -2
View File
@@ -2,7 +2,7 @@
-- ============================================================================ -- ============================================================================
-- 1. Configuration & Constants -- 1. Configuration & Constants
-- ============================================================================ -- ============================================================================
local APP_VERSION_TEXT = "v1.0.23" local APP_VERSION_TEXT = "v1.0.24"
local CONFIG = { local CONFIG = {
CLOUD_URL = "ws://stabadmin.fse-media.group", CLOUD_URL = "ws://stabadmin.fse-media.group",
@@ -2252,7 +2252,7 @@ function Main.loop()
end end
if tName and etaVal then if tName and etaVal then
if etaVal == "1" or etaVal == "现在" then if etaVal == "现在" or etaVal == "0" then
local announceKey = tName .. "_" .. dest local announceKey = tName .. "_" .. dest
local now = os.epoch("utc") local now = os.epoch("utc")
-- Prevent spamming: CRN's "1 min" can be fuzzy and stay for a while. -- Prevent spamming: CRN's "1 min" can be fuzzy and stay for a while.