feat(pan): configurable decay / afterglow for the spectrum trace (FR-PAN-14) - #199
Merged
Merged
Conversation
…PAN-14) A peak lingers on the trace and fades, so a brief signal (a CW dit, an FT8 tone) can still be seen after it has passed. A ghost trace is kept beside the live one and drawn under it: it meets a rising level at once and falls at a constant dB per second, an exponential decay of power with the operator's time constant (4.34 dB per tau), never below the live trace. - app/src/afterglow.rs: the pure decay, restarting when the pan's centre, span or width changes; non-finite input cannot poison it. - Advanced once per row on arrival in PanShared, not once per drawn frame, so how often the window redraws (FR-PAN-13) cannot change the look. - spectrum_afterglow_ms in the settings: 0 = off (the default), otherwise 50-5000 ms, a Settings field that applies as it is typed. - Both traces map bins to points through one function. - Also: the Networks summary said "of 3 on" after POTA made four. Not seen on screen: the display was asleep when this was built. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
# Conflicts: # docs/requirements/system-requirements.md
This was referenced Sep 21, 2026
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.
Stacked on #198 (GPU load) on #197 (TLS) on #196 (POTA).
What
A Spectrum afterglow setting (Settings, milliseconds, 0 = off — the default, otherwise 50–5000). A peak lingers on the trace and fades, so a brief signal (a CW dit, an FT8 tone) can still be seen after it has passed. A ghost trace is drawn under the live one — a faint fill and a dimmer outline.
Design (mine — please overrule)
Verified
fmt, clippy
--all-features, full workspace tests (445, bounded),cargo xtaskOK. The maths is tested against closed-form values (4.3429 dB per τ, power ratio 1/e, −50 dB peak after 990 ms is −54.30 ± 0.02), not against the code's own output. 35 mutations; survivors that were real (an "off" state enforced three times over so each masked the others; an untested clamp) are fixed, and one equivalent mutation (a draw-time width check guarding a race no test can reach without a renderer) is commented as such. Two structural guards cover the drawing order and the four hand-offs of the setting (one of which ends in..Default::default()and would silently reset a forgotten field).Also fixes the Networks summary saying "of 3 on" after POTA made four.
Not seen on screen — please read
The display was asleep, so how it looks is untested. The fill's opacity (0.10) and the outline's (0.40) are my guesses; that is yours to judge.
Validation parked with DC0SK (not done here)
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk