Skip to content

[bug] Gate XVTR waterfall tile shift to transverter paths#1925

Merged
ten9876 merged 1 commit intoten9876:mainfrom
jensenpat:aether/post-release-root-cause
Apr 25, 2026
Merged

[bug] Gate XVTR waterfall tile shift to transverter paths#1925
ten9876 merged 1 commit intoten9876:mainfrom
jensenpat:aether/post-release-root-cause

Conversation

@jensenpat
Copy link
Copy Markdown
Collaborator

Summary

This PR narrows the waterfall tile remapping introduced for transverter support so it only applies to real XVTR-style IF/RF translations. Normal HF panadapter scrolling now leaves the radio-provided waterfall tile range intact, even if the panadapter center has temporarily moved away from the latest tile center while the waterfall stream catches up.

In practical terms: the post-release black-waterfall regression reproduced by dragging/scrolling a panadapter roughly 0.500 MHz away from its starting point should stop happening, while the original XVTR protection from PR #1845 remains gated behind evidence that the pan is actually in a transverter path.

Root Cause

The regression was introduced by PR #1845 / commit 9bc1026 ("Fix waterfall always black when using transverter (XVTR) input").

That change solved an XVTR case by detecting when a waterfall tile's center frequency did not overlap the current panadapter center, then shifting the row's low / high range by the center delta. The assumption was that a large tile-vs-pan center mismatch meant the waterfall data was being reported in IF space while the panadapter was in RF space.

That assumption is valid for some XVTR paths, but it is too broad for ordinary HF panning.

During manual panadapter scrolling, especially with trackpad/drag movement, the client can move the pan center faster than fresh waterfall rows arrive from the radio. In the observed repro, the waterfall disappeared after about 0.500 MHz of movement, which lines up with one waterfall tile/span worth of stale data. The tile was not wrong XVTR data; it was ordinary waterfall data that had not yet caught up to the newly requested pan center.

Because PR #1845 treated any non-overlapping tile/pan center as an XVTR translation, it opportunistically rewrote the row frequency range on normal HF bands. That corrupted the waterfall geometry and made the display go blank until another action, such as zoom, forced the client/radio waterfall state back into alignment.

Investigation Notes

We initially suspected the newer panadapter recentering and margin policy because the symptom appeared while scrolling off the current pan view.

The local testing ruled that out:

That sequence isolated the regression to the waterfall tile reinterpretation logic from PR #1845, not the recentering policy.

What Changed

The waterfall row handler still detects the same "tile center and pan center do not overlap" situation, but it no longer shifts the tile range just because that condition is true.

It now requires XVTR evidence before applying the shift:

  • The observed tile-to-pan center offset must match a configured transverter rfFreq - ifFreq offset within a tolerance based on the tile width, or
  • A slice on the same panadapter must be using an XVT* antenna.

If neither condition is true, the row's original low / high frequency range is left unchanged.

Why This Shape

This keeps the original PR #1845 intent, which was to prevent waterfall rows from being invisible when the radio reports XVTR waterfall data in a translated coordinate space.

It also restores the safer default for normal bands: waterfall row coordinates come from the radio, and ordinary panning should wait for new rows rather than opportunistically re-center stale rows on the client side.

The important learning is that "tile and pan are far apart" is not enough information to infer "this is transverter IF/RF mismatch." It can also mean "the pan moved and waterfall data is one tile behind."

Non-Goals

This PR does not attempt to address the separate post-release investigations around hung slices or garbled AetherSDR audio when a SmartSDR Windows client connects. Those were part of the same troubleshooting window, but this branch only changes the isolated waterfall root cause.

Risk

The main risk is XVTR coverage: this fix intentionally keeps the tile shift for known transverter offsets and XVT* slice antennas, but unusual transverter configurations may need additional validation or a broader signal from the radio/client model.

Normal HF behavior should be lower risk because it returns to trusting the original waterfall row range unless there is specific XVTR evidence.

Validation

  • Built successfully with cmake --build build --parallel 10.
  • Local repro established that the black-waterfall symptom survived reverting the recenter/margin commits.
  • Local repro established that reverting 9bc1026 removed the black-waterfall symptom.
  • This patch applies the smallest targeted correction to the isolated root cause instead of reverting unrelated recentering work.

Manual validation still requested:

👨🏼‍💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat

@jensenpat jensenpat changed the title Gate XVTR waterfall tile shift to transverter paths [bug] Gate XVTR waterfall tile shift to transverter paths Apr 25, 2026
@jensenpat jensenpat marked this pull request as ready for review April 25, 2026 05:20
@jensenpat jensenpat requested a review from ten9876 as a code owner April 25, 2026 05:20
@ten9876 ten9876 merged commit a3aa33e into ten9876:main Apr 25, 2026
4 checks passed
ten9876 pushed a commit that referenced this pull request Apr 25, 2026
Excellent regression-locking refactor from @jensenpat — extracts the XVTR decisions from #1925 into a testable XvtrPolicy helper and adds 413 lines of regression coverage so the rules can't silently regress.

Zero runtime change.  Locks down: XVTR uses radio order field (not status index / RF freq / display label), native bands + WWV/GEN still map correctly, bad XVTR setup fails closed, normal HF panning untouched (#1925 root-cause guard), real IF/RF translation shifts tiles correctly, XVT* slice antenna authorizes fallback, in-range tiles never shifted spuriously.

73, Jeremy KK7GWY & Claude (AI dev partner)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants