mirror of
https://github.com/nasa/openmct.git
synced 2025-06-12 20:28:14 +00:00
[Plot] Use new API from PlotUpdater
Use PlotLine and PlotLineBuffer from PlotUpdater, to enable merging of real-time and historical telemetry. WTD-806.
This commit is contained in:
@ -34,11 +34,11 @@ define(
|
||||
subplot.setDomainOffset(prepared.getDomainOffset());
|
||||
|
||||
// Draw the buffers. Select color by index.
|
||||
subplot.getDrawingObject().lines = prepared.getBuffers().map(function (buf, i) {
|
||||
subplot.getDrawingObject().lines = prepared.getLineBuffers().map(function (buf, i) {
|
||||
return {
|
||||
buffer: buf,
|
||||
buffer: buf.getBuffer(),
|
||||
color: PlotPalette.getFloatColor(i),
|
||||
points: prepared.getLength(i)
|
||||
points: buf.getLength()
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,7 @@ define(
|
||||
});
|
||||
|
||||
function plotTelemetryTo(subplot, prepared, index) {
|
||||
var buffer = prepared.getBuffers()[index];
|
||||
var buffer = prepared.getLineBuffers()[index];
|
||||
|
||||
// Track the domain offset, used to bias domain values
|
||||
// to minimize loss of precision when converted to 32-bit
|
||||
@ -33,9 +33,9 @@ define(
|
||||
// Draw the buffers. Always use the 0th color, because there
|
||||
// is one line per plot.
|
||||
subplot.getDrawingObject().lines = [{
|
||||
buffer: buffer,
|
||||
buffer: buffer.getBuffer(),
|
||||
color: PlotPalette.getFloatColor(0),
|
||||
points: prepared.getLength(index)
|
||||
points: buffer.getLength()
|
||||
}];
|
||||
|
||||
subplot.update();
|
||||
|
Reference in New Issue
Block a user