Skip to content

fix(spothub): switch mode on Spot List double-click (#2298)#2372

Merged
ten9876 merged 2 commits intomainfrom
fix/2298-spotlist-mode-switch
May 5, 2026
Merged

fix(spothub): switch mode on Spot List double-click (#2298)#2372
ten9876 merged 2 commits intomainfrom
fix/2298-spotlist-mode-switch

Conversation

@aethersdr-agent
Copy link
Copy Markdown
Contributor

Summary

Fixes #2298. Double-clicking a row in the SpotHub Spot List previously only updated the slice frequency, leaving the receiver in its prior mode (e.g. SSB on 7 MHz → click a CW spot → frequency moves but mode stays SSB). Panadapter spot-label clicks already auto-switched mode, but the Spot List bypassed that path.

  • Extracted the spot-mode → radio-mode logic from the panadapter handler into a SpotModeResolver helper (explicit mode → comment first/last word → band-plan inference → radio-mode mapping).
  • Extended DxClusterDialog::tuneRequested to carry the spot's parsed mode and raw comment, and added SpotTableModel::spotAt() so the slot has access to the underlying DxSpot.
  • Wired the new helper into both click paths so they stay in sync. Both honor the existing SpotAutoSwitchMode setting; the panadapter path keeps its FreeDV → RADE special case.
  • Added spot_mode_resolver_test covering comment parsing, band-plan inference, mode mapping, and the issue-2298 motivating cases.

Test plan

  • cmake --build build --target aethersdr succeeds.
  • ctest -R spot_mode_resolver_test passes.
  • Manual: with SpotAutoSwitchMode=True, on 7 MHz SSB, double-click a CW spot in the SpotHub Spot List → slice retunes and switches to CW.
  • Manual: clicking the same kind of spot on the panadapter still switches mode (regression check).
  • Manual: with SpotAutoSwitchMode=False, double-click does not change the mode.

Generated by AetherClaude (automated agent for AetherSDR)

Double-clicking a row in the SpotHub Spot List previously only updated
slice frequency, leaving the receiver in its prior mode. Panadapter
spot-label clicks already auto-switched mode, but the Spot List bypassed
that path.

Extract the spot-mode → radio-mode logic from MainWindow into a
SpotModeResolver helper (explicit mode → comment parse → band-plan
inference → radio mode mapping) and call it from both click paths so
they stay in sync. Honors the existing SpotAutoSwitchMode setting.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
The double-click handler in this PR replaced its only consumer with
spotAt(row)->freqMhz, leaving freqAtRow declared and defined but
never called.  Drop it.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876 ten9876 merged commit c619ffd into main May 5, 2026
4 checks passed
@ten9876 ten9876 deleted the fix/2298-spotlist-mode-switch branch May 5, 2026 06:41
@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented May 5, 2026

Claude here on Jeremy's behalf — merged via admin squash. Folded in a small cleanup (dropped now-unused SpotTableModel::freqAtRow since the new doubleClicked handler replaced its only consumer with spotAt(...)->freqMhz). Single-source-of-truth refactor through SpotModeResolver is genuinely valuable beyond the bug fix — both spot-click paths now stay in sync automatically as future modes get added.

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.

SpotHub-Spot List no read the mode of the Spot

2 participants