Repository navigation
Conversation
Cursor dragging on the graph: - The canvas now sends which lines it picked. A press within 12 px of the crossing of the nearest X and Y lines drags both; elsewhere only the single nearest line moves (distance in pixels, not fractions). - A drag keeps following the pointer outside the canvas and ends on release anywhere, so it can no longer get stuck. - Resize/move pointer over lines and crossings. Traces: - New plot.rs shared by the canvas and the PNG export: per-column min/max, so Line and Dot modes never drop samples (single-sample spikes stay visible). Smooth mode still averages. - Canvas traces are clipped to the grid on the geometry itself. Frame::with_clip is not used: in iced 0.14 the clipped sub-frame is drawn before the parent's shapes, so the background hid the traces. - PNG Dot mode draws every sample instead of every N-th one. - The canvas draws in layers; the trace layer is cached and rebuilt only when samples, trace options or size change, so cursor drags no longer re-tessellate 60 000 samples. Dots use iced's rectangle fast path (one path of thousands of overlapping circles was very slow). Per-capture scales (scale.rs): - A capture with metadata uses its own V/div, V/off and t/div (shown read-only); a capture without metadata (debug dump) uses the manual scale from settings. Receiving, loading or selecting a capture no longer overwrites the manual scale, and PNG export uses the scale of the exported capture. Also fixes three clippy lints new in Rust 1.100 so the lint check passes.
- Wheel zooms the time axis around the pointer (1.25x per notch, smooth on trackpads); horizontal scroll or Shift+wheel pans time. - Option/Alt+wheel, or wheel over the voltage labels, zooms the voltage axis. Zoom-out may go past the device screen to the full ADC range 0..=255; the screen's edges are then marked with orange lines. - Right/middle-drag pans both axes. - Double-click resets the zoom; the cursor move made by the first click is undone, so cursors stay where they were. - Zooming through the unzoomed view stops there exactly (detent). Time zoom stops at 10 visible samples, voltage zoom at 8 ADC levels. - The zoom is stored with the identity of its capture, so other captures are shown unzoomed without explicit resets. - Measurement and device cursors stay on the signal; lines outside the view are neither drawn nor grabbable. Time and voltage labels follow the visible window with enough decimals; an "X xN Y xM" indicator shows the zoomed axes. Only visible samples are drawn, clipped on both axes. PNG export is unchanged (whole capture, unzoomed). - Remove the unused n_samples field of Scope.
- Workspace version 0.3.0 (dso-parser and the GUI inherit it; the CLI flasher keeps its own version, edition and dependencies). - Edition 2021 -> 2024 and resolver 3 for the workspace. The edition migration adds `use<>` to plot::distinct_values (its iterator does not borrow the input). Nested ifs flagged by clippy's collapsible_if are merged into let-chains; only those blocks are reformatted. - Remove workspace.package.description, which no member used (cargo warned about it). - Dependencies: rust-i18n 3 -> 4, png 0.17 -> 0.18 (Compression::Best is now Compression::High), rfd 0.15 -> 0.18, dirs 6 -> 7 (config_dir is unchanged on all platforms, so settings stay where they are), and Cargo.lock refreshed to the latest compatible versions. - Add a test that translations load for every supported language. - README: Rust 1.85 or later is required for the 2024 edition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes several problems in the scope canvas, gives each capture its own scale, adds zoom and pan with the mouse, and bumps the version to 0.3.0. Three commits:
1. Canvas fixes and per-capture scales
plot.rsis shared by the canvas and the PNG export. Each pixel column draws the min/max of its samples, so single-sample spikes stay visible in Line and Dot modes. Smooth mode still averages. PNG Dot mode now draws every sample instead of every N-th one.Frame::with_clipisn't used because in iced 0.14 the clipped sub-frame is drawn before the parent's shapes, so the background hid the traces.scale.rs): a capture with metadata uses its own V/div, V/off and t/div, shown read-only. A capture without metadata (debug dump) uses the manual scale from settings. Receiving or selecting a capture no longer overwrites the manual scale, and PNG export uses the exported capture's scale.2. Zoom and pan
The user manual, GUI design doc, README module table and all five locales are updated.
3. Version 0.3.0, edition 2024, dependency updates
dso-parserand the GUI. The CLI flasher keeps its own version (0.1.2), edition and dependencies.ifs flagged by clippy are merged into let-chains; only those blocks are reformatted. The unusedworkspace.package.descriptionfield is removed.rust-i18n3→4,png0.17→0.18,rfd0.15→0.18 anddirs6→7, plus a refreshedCargo.lock.dirs7 returns the same config folder on all platforms, so existing settings stay where they are.Testing
cargo test --workspacepasses (73 GUI tests, including new ones for hit-testing, double-click, zoom/pan, clipping, the min/max reduction and per-capture scales).cargo clippy --workspace --all-targets -- -D warningspasses.🤖 Developed with Claude Code