using packet timestamp

This commit is contained in:
Martino Ferrari
2026-05-21 15:56:29 +02:00
parent 3315c02282
commit b465dd680c
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -1965,18 +1965,20 @@ function renderDirtyPlots() {
// via setScale instead of rebuilding all data arrays (much cheaper).
if (!trig.enabled && !globalPause) {
plots.forEach(p => {
if (!p.uplot || p.xRange) return;
if (!p.uplot || p.xRange || p.traces.length === 0) return;
p.needsRedraw = true;
});
}
plots.forEach(p => {
if (!p.needsRedraw || !p.uplot) return;
if (!p.needsRedraw || !p.uplot || p.traces.length === 0) return;
const inTrigModeNow = trig.enabled && trig.snapshot !== null;
const isRolling = !trig.enabled && !p.xRange;
// Fast path: rolling-window plot with no new data — just shift viewport.
// Fast path: rolling-window plot with no new data — just shift viewport
// anchored to buffer timestamps so the x-range only advances when
// signal data actually moves forward.
if (isRolling && _dataGen === p.lastDataGen && p.uplot.data && p.uplot.data[0] && p.uplot.data[0].length > 0) {
p.needsRedraw = false;
zoomGuard = true;