Skip to content

Replace hold-cycles-a-value with hold-opens-a-control-panel #146

Description

@dc0sk

Raised from hardware testing (DC0SK, 2026-07-20):

the hold does work partially, I somehow were able to increase ATT to 21dB, but I am not able to set it back. Only switching it off is possible now. Should we possibly replace the hold function by popup sliders?

Yes. The current design is wrong, and this is the fix.

Why the ladder design fails

FR-UI-HOLD-01 currently makes a hold step a value: ATTN walks 0 → 3 → 6 → … → 21 → 0, NB cycles NONE → NARROW → WIDE.

  • Eight precise half-second holds to cross the attenuator range.
  • Dead end at the top: stepping past 21 dB wraps to 0/off, so from 21 the only reachable state is off. Getting back to an intermediate level means cycling the whole ladder again.
  • Does not generalise. NB's paired [LEVEL] switch exposes on/off, filtering mode and level (D14 p.1368) — a single-value cycle cannot express that, which is exactly why NR and NTCH were skipped when NB was converted.

What the radio actually does

D14 describes a panel, not a cycle:

  • p.1318 — "Hold [ATTN] to bring up the attenuator controls (on/off and level). Attenuation varies from 0 to 21 dB in 3 dB steps."
  • p.1368 — "hold [LEVEL] to bring up the noise blanker controls (on/off, filtering mode, and level)."
  • p.1380 — "hold [ADJ] to adjust the noise reduction settings."

The original implementation departed from this deliberately, on the reasoning that "with a mouse, stepping the level directly is the same idea in one gesture". Hardware says that reasoning was wrong.

Proposed change

Hold becomes uniform: hold → open that control's panel. Tap is unchanged (on/off, or slow/fast for AGC) — that half works and matches the radio.

Control Panel contents CAT
ATTN on/off + level slider, 0–21 dB in 3 dB steps RA
NB on/off + level + filter mode (NONE/NARROW/WIDE) NB
NR on/off + level NR
NTCH on/off + pitch NM
AGC slow/fast/off GT

AGC is arguably fine as-is (three states, tap covers two, hold the third) and could stay a cycle — worth deciding rather than converting reflexively.

Design questions to settle first

  1. Dismissal — click-away, a close button, Escape, or auto-close on next action? The K4's own popups carry an explicit dismiss control (Intro p.20).
  2. Placement — anchored to the control, or a fixed panel region? Anchored is more radio-like; fixed is simpler and avoids clipping at pane edges.
  3. Interaction with the existing tooltip hover. Those controls already use MouseArea on_enter/on_exit for the 500 ms tip; a panel opening under the pointer will fire on_exit, and the tip must not fight the panel.
  4. two_line_btn_visual may become unnecessary. It exists because an interactive Button captures the events tap_hold needs (see the fix in fix(ui): make holds actually fire, and light TX for any route to air #140). If the panel approach changes how the gesture is detected, revisit — and keep the source-level guard either way.

Scope note

This supersedes the value-stepping half of FR-UI-HOLD-01; the ½ s threshold and the tap semantics stay. The requirement should be amended rather than replaced, and its acceptance criteria updated — the current ones assert ladder behaviour (atten_hold wrapping, nb_filter_hold cycling) that will no longer exist.

The ATTN ladder remains functional in the meantime: awkward at the top end, but tap still switches it off and on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions