tune: trigger approaching announcement earlier
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- ============================================================================
|
||||
-- 1. Configuration & Constants
|
||||
-- ============================================================================
|
||||
local APP_VERSION_TEXT = "v1.0.42"
|
||||
local APP_VERSION_TEXT = "v1.0.43"
|
||||
|
||||
local CONFIG = {
|
||||
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
||||
@@ -18,7 +18,7 @@ local CONFIG = {
|
||||
ALERT_CONFIRM_MS = 60000,
|
||||
ALERT_COOLDOWN_MS = 300000,
|
||||
APPROACHING_COOLDOWN_MS = 120000,
|
||||
APPROACHING_STABLE_MS = 15000,
|
||||
APPROACHING_STABLE_MS = 5000,
|
||||
DEBUG = true
|
||||
}
|
||||
|
||||
@@ -2590,7 +2590,7 @@ function Main.loop()
|
||||
if not pending then
|
||||
State.pendingApproaching[announceKey] = { since = now, lastEta = etaSeconds }
|
||||
else
|
||||
if etaSeconds > (tonumber(pending.lastEta) or etaSeconds) + 0.5 then
|
||||
if etaSeconds > (tonumber(pending.lastEta) or etaSeconds) + 3 then
|
||||
pending.since = now
|
||||
end
|
||||
pending.lastEta = etaSeconds
|
||||
@@ -2723,7 +2723,7 @@ function Main.loop()
|
||||
if not pending then
|
||||
State.pendingApproaching[announceKey] = { since = now, lastEta = etaSeconds }
|
||||
else
|
||||
if etaSeconds > (tonumber(pending.lastEta) or etaSeconds) + 0.5 then
|
||||
if etaSeconds > (tonumber(pending.lastEta) or etaSeconds) + 3 then
|
||||
pending.since = now
|
||||
end
|
||||
pending.lastEta = etaSeconds
|
||||
|
||||
Reference in New Issue
Block a user