Skip to content

Settings: TX Volume becomes a live slider in the AUDIO section#88

Merged
patrickrb merged 1 commit into
devfrom
feat/tx-volume-slider
Jun 2, 2026
Merged

Settings: TX Volume becomes a live slider in the AUDIO section#88
patrickrb merged 1 commit into
devfrom
feat/tx-volume-slider

Conversation

@patrickrb
Copy link
Copy Markdown
Owner

@patrickrb patrickrb commented Jun 2, 2026

Summary

Now that the libusb output path is actually pushing audio to the radio (visible on the ALC meter from the latest car-dash test), the level needs to be dialed down a touch. The existing TX Volume control was a number-input dialog buried in the TRANSMISSION section — unusable for live tuning. This makes it a slider with a live readout, in the AUDIO section where someone tuning audio actually expects to find it.

Changes

1. Slider with live update. The editor opens a dialog with:

  • Big 48sp percentage readout (visible at a glance while watching the radio's ALC)
  • Material Slider over 0-100
  • Dragging updates GeneralVariables.volumePercent immediately (and posts to the LiveData), so the next TX uses the new level — no Save-button friction
  • Persists to the config DB on dismiss
  • Hint text: "Adjust live — your next TX uses this level. Watch your radio's ALC and dial down until it's just kissing the line."

2. Moved row from TRANSMISSION → AUDIO. Under Audio Output, where it logically belongs. TRANSMISSION keeps watchdog and stop-after (operating-limits stuff).

The hardware volume key handler in ComposeMainActivity still works as a ±5% quick-adjust — both methods share volumePercent + the LiveData so they stay in sync.

Workflow in the car

  1. Watch ALC during your current TX.
  2. Open Settings → AUDIO → TX Volume.
  3. Drag down a few percent at a time.
  4. Next TX uses the new level — no need to re-open or save.
  5. Tap Done once you've got it.

Test plan

  • assembleDebug compiles clean (Slider + SliderDefaults imports + the dialog itself).
  • Pixel 8 smoke test (was unplugged at build time). Confirm: TX Volume row in AUDIO section opens slider dialog, dragging updates the readout in real time and the LiveData-bound UI elsewhere, hardware volume keys still adjust ±5%.
  • Car-dash via Play internal after merge: dial down a few percent, confirm ALC kisses the line instead of slamming it.

🤖 Generated with Claude Code

You can now actually dial in TX drive while watching your radio's ALC.
Two changes, no behavior breakage:

1. The TX Volume editor is now a slider with a big live readout instead
   of a number-input dialog. Dragging updates GeneralVariables.volumePercent
   immediately (and posts to the LiveData) so the next TX uses the new
   level without you having to tap Save first. We persist to the config
   DB on dismiss. The hardware volume key handler in ComposeMainActivity
   still works as a ±5% quick-adjust — they share the same state.

2. Moved the row from the TRANSMISSION section (where it sat alongside
   watchdog / stop-after) into the AUDIO section right under Audio
   Output. That's where someone tuning audio levels actually expects
   to find it.

Why this matters: on the car-dash with the libusb output path now
working, the TX audio is reaching the rig but a touch hot on ALC.
Number-input UX was unusable for that — open dialog, type number,
save, test, repeat. Slider-with-live-update lets you drag a couple
of percent at a time and watch the rig's meter respond in real time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@patrickrb patrickrb merged commit 9493bf1 into dev Jun 2, 2026
2 checks passed
@patrickrb patrickrb deleted the feat/tx-volume-slider branch June 2, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant