From 2d4f45c4ce10f33d44e3c646e378c85c970517c7 Mon Sep 17 00:00:00 2001 From: Kayo Kallas Date: Fri, 12 Jun 2020 16:37:10 -0700 Subject: [PATCH] Issue #173 - Update GUI refresh handler --- ait/gui/static/js/ait/gui/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ait/gui/static/js/ait/gui/index.js b/ait/gui/static/js/ait/gui/index.js index c7c91897..b7f9c9a6 100644 --- a/ait/gui/static/js/ait/gui/index.js +++ b/ait/gui/static/js/ait/gui/index.js @@ -173,6 +173,7 @@ function init () { }) ait.tlm = {dict: {}} + ait.tlm.promise = m.request({ url: '/tlm/dict' }) ait.tlm.promise.then((dict) => { const proto = location.protocol === 'https:' ? 'wss' : 'ws' @@ -181,9 +182,9 @@ function init () { ait.tlm.dict = TelemetryDictionary.parse(dict) ait.tlm.stream = new TelemetryStream(url, ait.tlm.dict) - ait.events.on('ait:tlm:packet', () => { + setInterval(() => { m.redraw() - }) + }, 1000) }) m.request({url: '/limits/dict'}).then((dict) => {