You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two band-plan-aware features walk BandPlanManager::segments() to figure out where to TX within a band:
ATU pre-tune (src/gui/AtuPreTuneDialog.cpp, lines 80-105) — uses a computeContiguousRegions() helper that splits the band into contiguous regions, so discrete-channel bands like US 60 m (5 separate channels with kHz-scale gaps) get walked per-region. Each channel becomes its own region; the pre-tune does NOT try to TX in the inter-channel gaps.
Antenna SWR sweep (src/gui/MainWindow.cpp::startSwrSweep, post-Respect active band plan in Antenna SWR sweep (#2800). Principle IV. #2817) — uses a simpler min(lowMhz) / max(highMhz) walk across matching segments. Gives a single contiguous range, which is correct for continuous bands like 40 m / 20 m but misses the inter-channel gaps on US 60 m / Belgian 30 m etc.
For the user-reported bug in #2800 (IARU R1 40 m trip), the simpler approach is fully sufficient. But for discrete-channel bands the SWR sweep will still try to TX in inter-channel gaps and trip the interlock.
What to do
Extract computeContiguousRegions from AtuPreTuneDialog.cpp into a shared BandPlanManager helper:
AtuPreTuneDialog::recomputeBands calls the manager method instead of its private helper.
MainWindow::startSwrSweep calls the same method and walks ALL returned regions, sweeping each one (or pops a "This band has N discrete channels — sweep each individually?" confirm modal).
Pickup
AetherClaude-eligible. Mechanical refactor — pull a private function up into a shared module, update both call sites. The existing test for AtuPreTuneDialog already covers the region-walking math (#2648); just add a test for the SWR sweep's use of the same helper.
Principle IV — region-aware data comes from BandPlanManager. The helper belongs in the manager, not duplicated in each consumer.
Context
Two band-plan-aware features walk
BandPlanManager::segments()to figure out where to TX within a band:ATU pre-tune (
src/gui/AtuPreTuneDialog.cpp, lines 80-105) — uses acomputeContiguousRegions()helper that splits the band into contiguous regions, so discrete-channel bands like US 60 m (5 separate channels with kHz-scale gaps) get walked per-region. Each channel becomes its own region; the pre-tune does NOT try to TX in the inter-channel gaps.Antenna SWR sweep (
src/gui/MainWindow.cpp::startSwrSweep, post-Respect active band plan in Antenna SWR sweep (#2800). Principle IV. #2817) — uses a simplermin(lowMhz)/max(highMhz)walk across matching segments. Gives a single contiguous range, which is correct for continuous bands like 40 m / 20 m but misses the inter-channel gaps on US 60 m / Belgian 30 m etc.For the user-reported bug in #2800 (IARU R1 40 m trip), the simpler approach is fully sufficient. But for discrete-channel bands the SWR sweep will still try to TX in inter-channel gaps and trip the interlock.
What to do
Extract
computeContiguousRegionsfromAtuPreTuneDialog.cppinto a sharedBandPlanManagerhelper:Then:
AtuPreTuneDialog::recomputeBandscalls the manager method instead of its private helper.MainWindow::startSwrSweepcalls the same method and walks ALL returned regions, sweeping each one (or pops a "This band has N discrete channels — sweep each individually?" confirm modal).Pickup
AetherClaude-eligible. Mechanical refactor — pull a private function up into a shared module, update both call sites. The existing test for
AtuPreTuneDialogalready covers the region-walking math (#2648); just add a test for the SWR sweep's use of the same helper.Principle IV — region-aware data comes from
BandPlanManager. The helper belongs in the manager, not duplicated in each consumer.73, Jeremy KK7GWY & Claude (AI dev partner)