Skip to content

Cleanup: remove dead FFT accumulator state after #3031 #3038

Description

@ten9876

Background

After PR #3031 (fix for TX waterfall scroll rate parity) removed the debt-gated FFT row emission and the per-frame linear-power accumulator from `SpectrumWidget::pushWaterfallRow`, several pieces of state are now dead. PR #3031 intentionally left them in place to keep the behavioural-fix diff focused. This issue tracks the followup cleanup.

Dead state to remove

In `src/gui/SpectrumWidget.h`, five members are now write-only or unread:

  • `m_fftRowDebtMs` — debt accumulator (gate removed)
  • `m_lastFftFrameMs` — timestamp of last FFT frame for debt elapsed (gate removed)
  • `m_lastFftRowMs` — timestamp of last row emission (gate removed; only remaining write is `= 0` in `resetFftWaterfallAccumulator`)
  • `m_fftAccumPower` — per-bin linear-power accumulator (no inter-frame averaging now)
  • `m_fftAccumCount` — accumulation frame count (same reason)

In `src/gui/SpectrumWidget.cpp`:

  • `SpectrumWidget::resetFftWaterfallAccumulator()` definition (around line 2224)
  • 4 call sites of that function:
    • `setWfLineDuration()` (~line 1340)
    • `setTransmitting(true)` entry (~line 2318)
    • One additional reset around line 2355
    • One additional reset around line 2384

Scope estimate

Why this is a follow-up, not a fix-up to #3031

  • fix(waterfall): TX scroll rate now matches RX #3031 was a behaviour fix; this is pure dead-code removal. Keeping them separate makes both easier to bisect if anything ever regresses on either side.
  • The cleanup is trivially mergeable on its own and doesn't block anything.
  • Spotted partly in my own #3031 PR body and partly by the bot's review (which caught `m_lastFftRowMs` as a 5th member I missed in the original list).

Eligibility

`aetherclaude-eligible` candidate — mechanical, well-bounded, easy to verify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenspectrumPanadapter and waterfall

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions