From 21ef7f476aaaf11315b7790e95c79070cc9f441e Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Mon, 19 Dec 2022 11:15:48 -0600 Subject: [PATCH] auto refresh fix --- server/scripts/modules/navigation.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/scripts/modules/navigation.mjs b/server/scripts/modules/navigation.mjs index 1cd0e12..8edcbe4 100644 --- a/server/scripts/modules/navigation.mjs +++ b/server/scripts/modules/navigation.mjs @@ -16,7 +16,7 @@ const weatherParameters = {}; // auto refresh const AUTO_REFRESH_INTERVAL_MS = 500; -const AUTO_REFRESH_TIME_MS = 600000; // 10 min. +const AUTO_REFRESH_TIME_MS = 6000; // 10 min. let AutoRefreshIntervalId = null; let AutoRefreshCountMs = 0; @@ -175,6 +175,7 @@ const navTo = (direction) => { if (!firstDisplay) return; firstDisplay.navNext(msg.command.firstFrame); + firstDisplay.showCanvas(); return; } if (direction === msg.command.nextFrame) currentDisplay().navNext(); @@ -377,7 +378,7 @@ const stopAutoRefreshTimer = () => { const refreshCheck = () => { // Time has elapsed. - if (AutoRefreshCountMs >= AUTO_REFRESH_TIME_MS) { + if (AutoRefreshCountMs >= AUTO_REFRESH_TIME_MS && isPlaying()) { loadTwcData(); return true; }