Three asked-for changes, one commit because they are one coordinate system. The live axis is a fixed [-window, 0] with the newest sample at 0, so x reads as an age and the labels stand still while the trace rolls under them. That makes the display clock distinct from the stream clock for the first time, so `ScopeModel::stream_at_x0()` becomes the single conversion between them (`display_x = stream_t - stream_at_x0()` in all four modes) and a snapshot carries its own origin in `EventSnapshot::x_offset`. The pause view is now rebased like an event's, reversing an earlier deliberate choice: a frozen absolute-stamped picture would sit a whole uptime right of a newest-relative axis. That also fixed a latent bug, the export adding `trigger_time()` to a *paused* view's stamps. The status bar says how long you have been paused -- wall time, since the producer never stops, through `format_elapsed()` so the field cannot widen. The export writes two time columns: `time`, the axis as displayed, and `abs_seconds`, the stream's own clock for the same sample. f64 seconds and not the wire's integer, because `udps_frame_t::values` is a `const double*` and the integer never exists in this process. Cursors and measurement marks move in opposite directions under the rolling axis, deliberately: a cursor is a position on screen and stays put, a mark names a sample and travels with it. `App::measure_window` is stream-clocked for a sharper reason -- a display-coordinate live window never moves, so the "the window moved" recompute would never fire again. Moves the deps/plotter pin to 58473db, which stops a time label's mantissa reaching its own radix: a one-second tick differenced off a live axis read `1e+3ms`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
3.3 KiB
Plaintext
51 lines
3.3 KiB
Plaintext
<b>Cursors</b>
|
|
|
|
Cursors read values off the traces. There are two kinds: one <i>shared vertical pair</i> that
|
|
every row carries at the same time, and <i>horizontal rulers</i>, one pair per row, that belong
|
|
to that row alone.
|
|
|
|
<b>How to reach it</b>
|
|
|
|
The cursors button in the toolbar, or <tt>c</tt>. The pane below the plot shows the readings and
|
|
owns a <b>Reset</b> button. Drag a marker to move it. The mode dropdown offers four modes:
|
|
<tt>vertical</tt> (the shared time pair), <tt>horizontal</tt> (the per-row rulers),
|
|
<tt>both</tt>, and <tt>mix</tt>.
|
|
|
|
<b>Worth knowing</b>
|
|
|
|
• The vertical pair is <i>one</i> time for the whole figure, so moving it on any row moves it on
|
|
all of them. That is what makes <tt>dt</tt> meaningful across rows.
|
|
• A ruler belongs to its row and nothing shares it, so two rows' rulers are independent.
|
|
• <tt>mix</tt> is the reading mode: one line per <i>bound</i> trace, with the trace's own values
|
|
at each marker and their difference. A slot with a name but no channel behind it is not a
|
|
trace and gets no line.
|
|
• A value is the <i>nearest stored sample's</i>, never a number between two samples. Zoom in past
|
|
the sample spacing and the line between two samples is something the plot drew, not data —
|
|
so a reading off it would be the drawing. The hover crosshair reads the same way.
|
|
• Every reading carries a <i>metric prefix</i> so the digits sit in <tt>1..999</tt>:
|
|
<tt>10.52 mV</tt>, not <tt>0.01 V</tt>. Two decimals is all an instrument landing on an
|
|
<tt>f32</tt> sample can claim, so without the prefix a small value would read <tt>0.00</tt>
|
|
and the reading would be gone. A stream that declares no unit gets the prefix anyway, written
|
|
tight against the number (<tt>585.24m</tt>) — the space separates the number from its unit,
|
|
and a spaced <tt>m</tt> with nothing after it would read as metres.
|
|
• A marker past the newest sample reads <tt>--</tt>. With only one marker over data the row
|
|
reads <tt>partial</tt>: a difference between a number and nothing is not a number.
|
|
• In <tt>mix</tt> each marker also places a crossing annotation per trace, which is what lets
|
|
you see on the plot which sample a number came from. It is <i>on that sample</i>, so when the
|
|
marker falls between two it sits a little off its own line: the line is where you put the
|
|
marker, the dot is the datum being quoted. The hover crosshair's mark snaps the same way, and
|
|
is drawn larger than a trace's sample dots so it does not read as one more sample.
|
|
• The time row exists only in the modes that show the vertical pair. <tt>horizontal</tt> has no
|
|
time row, by design.
|
|
• A cursor <i>stays where you put it</i> while a live view rolls under it, which is what a bench
|
|
scope does: its <tt>T0</tt> is an age, so a marker left at <tt>-1.5s</tt> keeps reading the
|
|
sample a second and a half old as the stream advances. A measurement's marks do the opposite —
|
|
they travel with the sample they measured — because a cursor is a question you asked and a mark
|
|
is an answer about one particular sample.
|
|
|
|
<b>Example</b>
|
|
|
|
Three traces in <tt>mix</tt> mode with both markers over data: 3 lines and 6 crossing marks,
|
|
each line reading like <tt>sine 0.31 V -0.84 V -1.15 V</tt>. Move the second marker past the
|
|
newest sample and the third column reads <tt>--</tt>.
|