Implemented qt port + e2e
This commit is contained in:
@@ -225,6 +225,20 @@ void RenderPlotPanel(App& app, int plotIdx, bool& paused) {
|
||||
if (!anyData) { useHistData = false; }
|
||||
}
|
||||
|
||||
/* Visible X window to read from the ring. Reading only the visible slice
|
||||
* (binary-searched) instead of the entire ring — which can hold a million
|
||||
* points — is what keeps live rendering fluid; the full-ring readLast()
|
||||
* copied tens of MB per signal per frame. A 10% margin keeps a sample on
|
||||
* each side so the later fine clip still has its boundary points. */
|
||||
double visT0, visT1;
|
||||
if (live) { visT1 = wallNow; visT0 = wallNow - app.windowSec(); }
|
||||
else { visT1 = app.plotXMax(plotIdx); visT0 = app.plotXMin(plotIdx); }
|
||||
{
|
||||
double margin = (visT1 - visT0) * 0.1;
|
||||
if (!(margin > 0.0)) { margin = 1.0; }
|
||||
visT0 -= margin; visT1 += margin;
|
||||
}
|
||||
|
||||
/* Fill tStore/vStore[si] from the frozen view (paused) or the live ring */
|
||||
auto readBase = [&](size_t si, const Signal& sig, const std::string& key) {
|
||||
if (paused && snap.valid) {
|
||||
@@ -236,7 +250,7 @@ void RenderPlotPanel(App& app, int plotIdx, bool& paused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
(void) sig.buf.readLast((size_t)app.maxPoints(), tStore[si], vStore[si]);
|
||||
(void) sig.buf.readRange(visT0, visT1, tStore[si], vStore[si]);
|
||||
};
|
||||
|
||||
for (size_t si = 0; si < slots.size(); si++) {
|
||||
|
||||
Reference in New Issue
Block a user