using packet timestamp
This commit is contained in:
+1
-1
@@ -328,7 +328,7 @@ func buildSourcesMsg(sm map[string]*sourceHubState) []byte {
|
|||||||
|
|
||||||
// Run is the hub's main goroutine. Must be started with go hub.Run().
|
// Run is the hub's main goroutine. Must be started with go hub.Run().
|
||||||
func (h *Hub) Run() {
|
func (h *Hub) Run() {
|
||||||
ticker := time.NewTicker(time.Second / 20)
|
ticker := time.NewTicker(time.Second / 30)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
statsTicker := time.NewTicker(time.Second)
|
statsTicker := time.NewTicker(time.Second)
|
||||||
|
|||||||
@@ -1965,18 +1965,20 @@ function renderDirtyPlots() {
|
|||||||
// via setScale instead of rebuilding all data arrays (much cheaper).
|
// via setScale instead of rebuilding all data arrays (much cheaper).
|
||||||
if (!trig.enabled && !globalPause) {
|
if (!trig.enabled && !globalPause) {
|
||||||
plots.forEach(p => {
|
plots.forEach(p => {
|
||||||
if (!p.uplot || p.xRange) return;
|
if (!p.uplot || p.xRange || p.traces.length === 0) return;
|
||||||
p.needsRedraw = true;
|
p.needsRedraw = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
plots.forEach(p => {
|
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 inTrigModeNow = trig.enabled && trig.snapshot !== null;
|
||||||
const isRolling = !trig.enabled && !p.xRange;
|
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) {
|
if (isRolling && _dataGen === p.lastDataGen && p.uplot.data && p.uplot.data[0] && p.uplot.data[0].length > 0) {
|
||||||
p.needsRedraw = false;
|
p.needsRedraw = false;
|
||||||
zoomGuard = true;
|
zoomGuard = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user