ATU pre-tune: per-band early exit instead of full-sweep abort (#3062). Principle XIII.#3063
Conversation
…. Principle XIII. After 3 consecutive TUNE_FAIL_BYPASS results, advance m_currentIndex past the remaining points on the dying band rather than aborting the whole sweep. Multi-band runs keep producing useful results when only one band's antenna is bad (e.g. broken feedline on 80m while 40m/20m/15m are fine). - Last-band / single-band failure: the skip loop body never executes, beginNextPoint() increments past m_points.size() and falls through to finishSweep() — matches the prior terminal-abort behaviour for those cases (covers the test-plan edge cases). - First point of a new band fails-bypasses: counter is reset to 0 before the recursion, so three fresh fails are required to trigger another per-band skip. - m_skipCount is incremented by (current - skipStart), not (+ 1): the triggering point already incremented m_failCount, so only the remaining points on the dying band count as skips. - Audible cue (QApplication::beep) preserved from PR #3050 item #7. - Message includes the next band name when one exists so the operator sees what is about to run. Principle XIII (The Operator Outranks Every Agent): the operator with one bad antenna outranks a defensive over-abort — give them the useful remainder of the sweep rather than the binary "every band aborted" verdict the previous safety net imposed. Blast radius: risk_score=0.0504, 5 high-risk affected (top: RadioModel::transmitModel, RadioModel::isConnected, SliceModel::sliceId). All five are downstream-transitive callees of onAtuStateChanged whose behaviour and call sites are unchanged by this patch — the edit modifies only the consecutive-fail-bypass branch's control flow.
There was a problem hiding this comment.
Looks good — implementation matches the issue spec and the surrounding code's idioms.
Verified:
- Skip-count accounting is correct: the failing point is already in
m_failCount(line 779), and only the points after it on the dying band are added tom_skipCount. This matches the issue's intent and is more accurate than the sketch in #3062 (which would have double-counted the failing point as a skip). - Edge cases all collapse to
finishSweep()viabeginNextPoint():- Single-band sweep → loop body runs through remaining points, then
beginNextPoint()increments pastm_points.size()and callsfinishSweep(). - Last band of a multi-band sweep → same path.
- Failure on the very last point → loop body is a no-op,
beginNextPoint()finishes.
- Single-band sweep → loop body runs through remaining points, then
m_consecutiveFailBypassreset beforebeginNextPoint()so the new band gets a fresh 3-strike budget. Matches the issue's edge-case #3.- Beep + status text preserved; existing
showFailControlspath for non-terminal fail-bypass is untouched.
One small nit (non-blocking) — the inline comment claims "If the dying band is the last one, the loop body never runs". That's only true when we're at the last point of the last band; in the more common case (fail on point 1 of 5 on the last band) the loop body does run, skipping points 2-5 before beginNextPoint() finishes the sweep. End behavior is correct; the comment just describes one sub-case, not all "last band" cases. Worth tightening if you re-touch the file, not worth a respin.
Thanks for the careful change, @aethersdr-agent — the per-band early exit is a genuine UX win for multi-band sweeps with one bad antenna.
🤖 aethersdr-agent · cost: $4.9065 · model: claude-opus-4-7
…sdr#3062). Principle XIII. (aethersdr#3063) ## Summary Fixes aethersdr#3062 ### What was changed ATU pre-tune: per-band early exit instead of full-sweep abort (aethersdr#3062). Principle XIII. ### Files modified - `src/gui/AtuPreTuneDialog.cpp` ``` src/gui/AtuPreTuneDialog.cpp | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) ``` --- Generated by AetherClaude (automated agent for AetherSDR) --- <sub>🤖 aethersdr-agent · cost: $4.5039 · model: claude-opus-4-7</sub> Co-authored-by: aethersdr-agent[bot] <273844287+aethersdr-agent[bot]@users.noreply.github.com>
Summary
Fixes #3062
What was changed
ATU pre-tune: per-band early exit instead of full-sweep abort (#3062). Principle XIII.
Files modified
src/gui/AtuPreTuneDialog.cppGenerated by AetherClaude (automated agent for AetherSDR)
🤖 aethersdr-agent · cost: $4.5039 · model: claude-opus-4-7