Skip to content

Commit

Permalink
Issue #173 - Update GUI refresh handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Futabay committed Jun 12, 2020
1 parent 76437ba commit 2d4f45c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ait/gui/static/js/ait/gui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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) => {
Expand Down

0 comments on commit 2d4f45c

Please sign in to comment.