Skip to content

tci: follow-up polish for #3145 spot-click TCI notification #3152

Description

@ten9876

Three small polish items surfaced during review of #3145. Bundled here so the original fix could ship clean.

1. Document the asymmetric gating in the spot-click lambda

src/gui/MainWindow.cpp around line 12257 — the TCI branch requires m_tciServer && s && !s->isLocked() && !m_swrSweep.running; the radio branch only requires !isPassiveLocalSpotId(spotIndex).

The asymmetry is intentional: TCI must mirror AetherSDR's local-tune outcome (so it should suppress when local tuning would be blocked), while the radio branch delegates the gating decision to the radio firmware. Without an inline comment, a future contributor "normalising" the two branches could silently regress Log4OM behavior under lock or SWR sweep.

Action: add a 2–3 line comment above the if (tciSpot) branch explaining the rationale.

2. Note the dual-message wire-format change

TciServer::wireSpotModel's lambda now emits both clicked_on_spot: and rx_clicked_on_spot: for every radio-origin spot click (previously just clicked_on_spot:). Per #3145's PR description this mirrors Thetis and known TCI clients tolerate the extra message, but it's a wire-format change worth surfacing for anyone tracking external TCI traffic (e.g. third-party log clients writing protocol parsers).

Action: add a one-line note in docs/architecture/tci-receivers.md under "Spot Click Notifications" mentioning that this is a v2 protocol upgrade — both forms are now emitted unconditionally, not based on client capability.

3. Warn when notifySpotClicked falls back to slices.first()

src/core/TciServer.cppnotifySpotClicked() falls back to slices.first() when no slice is provided. The MainWindow caller always supplies one; only the wireSpotModel path lacks slice context (it has only the panId, which is what sliceForPanId looks up). If the panId lookup fails the fallback fires silently.

Action: emit qWarning() << "TciServer::notifySpotClicked falling back to first slice; panId lookup failed for spot" << spotIndex so multi-slice / pan-mismatch edge cases are diagnosable in the field.

Priority

Low — none of these regress anything; they're documentation + observability polish on a working fix. Take whenever convenient.

cc @jensenpat (original PR author) for context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfacedocumentationImprovements or additions to documentationenhancementImprovement to existing featuregood first issueGood for newcomersmaintainer-reviewRequires maintainer review before any action is takenpriority: lowLow priorityprotocolSmartSDR protocolrefactorCode cleanup, restructuring, or consolidation — no user-visible behavior change

    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