From 7f7b35caf4846cb1d0d92aacd8bee6904c8c0e40 Mon Sep 17 00:00:00 2001 From: Kayo Kallas Date: Mon, 18 May 2020 22:58:05 -0700 Subject: [PATCH] Update dntoeu plot option (#105) --- ait/gui/static/index.html | 12 ++++++------ ait/gui/static/js/ait/gui/Plot.js | 30 +++++++++++++++++------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ait/gui/static/index.html b/ait/gui/static/index.html index 7395993a..d62c5101 100644 --- a/ait/gui/static/index.html +++ b/ait/gui/static/index.html @@ -202,10 +202,10 @@

1553 HS Voltages

"height": 300 } - - - - + + + +
@@ -226,13 +226,13 @@

1553 HS Currents

"height": 300 } - +
- +
diff --git a/ait/gui/static/js/ait/gui/Plot.js b/ait/gui/static/js/ait/gui/Plot.js index 509817c6..1d0b835e 100644 --- a/ait/gui/static/js/ait/gui/Plot.js +++ b/ait/gui/static/js/ait/gui/Plot.js @@ -79,9 +79,9 @@ class DygraphsBackend } } - plot (data, dntoeu) { + plot (data, raw) { const pname = data['packet'] - let packet = getPacket(data['data'], dntoeu) + let packet = getPacket(data['data'], raw) const names = this._plot._packets[pname] if (!names) return @@ -208,9 +208,9 @@ class HighchartsBackend Object.assign(options, overrides) } - plot(data, dntoeu) { + plot(data, raw) { const pname = data['packet'] - let packet = getPacket(data['data'], dntoeu) + let packet = getPacket(data['data'], raw) const names = this._plot._packets[pname] if (!names) return @@ -306,9 +306,13 @@ class HighchartsBackend * point to be removed from the queue. This is only used by the Dygraphs * backend. * + * raw + * If the `raw` parameter is true, the raw value will be returned. + * DN to EU conversions will be skipped. (Default: raw=false) + * * .. code:: Javascript * - * + * * * **ait-plot-config:** * @@ -347,10 +351,10 @@ class HighchartsBackend * "height": 300 * } * - * - * - * - * + * + * + * + * * */ const Plot = @@ -358,8 +362,8 @@ const Plot = /** * Plots data from the given packet. */ - plot (packet, dntoeu=false) { - this._backend.plot(packet, dntoeu) + plot (packet, raw=false) { + this._backend.plot(packet, raw) }, @@ -404,7 +408,7 @@ const Plot = this._packets[packet] = this._packets[packet] || [ ] this._packets[packet].push(name) - this._dntoeu = vnode.attrs.dntoeu + this._raw = vnode.attrs.raw }, @@ -458,7 +462,7 @@ const Plot = this._time = new PlotTimeField() } - ait.events.on('ait:tlm:packet', (p) => this.plot(p, this._dntoeu)) + ait.events.on('ait:tlm:packet', (p) => this.plot(p, this._raw)) ait.events.on('ait:playback:on', () => this.redraw()) ait.events.on('ait:playback:off', () => this.redraw()) },