fix: a cursor readout quotes the nearest stored sample, not a value between two
The crosshair and the cursors pane's mix values are one library call, and it interpolated linearly between the two samples bracketing the pointer. That is wrong twice over here. Ingest decimation is a boxcar average over `time_stride` samples, so a number computed between two stored samples is a second, undeclared estimate laid over the first that nothing on screen or in an export holds. And past the sample spacing the polyline is a line the renderer drew, so quoting a point on it reports the drawing rather than the data. The fix is upstream and unconditional (plotter c028f48): `crosshair_span()`'s `t` selects the nearer end instead of blending, with a tie reading the earlier sample. `CrosshairRow::marker` is placed from the same y, so the dot follows the quoted sample. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec93a9831d
commit
d03c9fb443
5 files changed
+37
-7
No files matched your search
+2
-2
@@ -73,8 +73,8 @@ class ChannelBuffer final : public plot::data::Series {
|
||||
/// datagram leaves a gap, so index times must come from the time ring.
|
||||
f64 x_at(u64 i) const override;
|
||||
/// Bracketing samples by binary search over the time ring, which is monotonic,
|
||||
/// so a crosshair value is interpolated between the two samples actually either
|
||||
/// side of the pointer -- a grid walk would land on the wrong pair after a gap.
|
||||
/// so a crosshair reads whichever of the two samples actually either side of the
|
||||
/// pointer is nearer -- a grid walk would land on the wrong pair after a gap.
|
||||
bool neighbours(f64 x, u64& i0, u64& i1) const override;
|
||||
u64 snap_index(f64 x) const override;
|
||||
plot::Range x_bounds() const override;
|
||||
|
||||
Reference in new issue
Block a user