Skip to content

TX volume: live slider in AUDIO section + 80% default#92

Merged
patrickrb merged 9 commits into
mainfrom
feat/tx-volume-slider
Jun 3, 2026
Merged

TX volume: live slider in AUDIO section + 80% default#92
patrickrb merged 9 commits into
mainfrom
feat/tx-volume-slider

Conversation

@patrickrb
Copy link
Copy Markdown
Owner

Summary

  • Settings → AUDIO now has a live slider for TX volume instead of the old 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. Persisted to the config DB on dismiss. The hardware volume key handler in ComposeMainActivity is unchanged — it still does ±5% quick-adjust and shares the same state.
  • Moved the row from the TRANSMISSION section to the AUDIO section, right under Audio Output, where someone tuning audio levels actually expects it.
  • Bumped the default volume from 50% → 80% so new users producing audible drive on a typical rig out of the box, without immediately pegging ALC. Anyone who wants something different just drags the slider and we persist it.

Why

With the libusb USB-audio output path in PR #84 now driving the rig directly, dialing in TX drive while watching ALC needs to be a live operation — open dialog, type number, save, test, repeat was unusable. Slider lets you drag a couple of percent at a time and watch the rig meter respond in real time.

Test plan

  • Slider in AUDIO section updates value live; next TX uses the new level immediately.
  • Persists across app restart (config DB).
  • Hardware volume buttons still do ±5% and stay in sync with the slider.
  • Default 80% on fresh install / wiped data drives audibly without ALC red.

🤖 Generated with Claude Code

patrickrb and others added 9 commits June 1, 2026 15:50
Splits the release pipeline so dev is the integration target and main
is the production candidate. Every push to either branch publishes to
Play internal so testers always have the latest; production promotion
remains a manual step in Play Console.

Changes to build-release.yml:
- Push triggers: drop the legacy capital-D "Dev"; add lowercase "dev".
- PR triggers: now fire for PRs to either main or dev (was main only)
  so feature → dev PRs get unit tests.
- Tag determination grows a dev branch lane: push to dev produces a
  run-numbered "dev-<N>" tag, marks the GitHub release as prerelease,
  and uploads to Play internal alongside the main-branch v* releases.
  Distinct tag prefix keeps the two streams visually separate in both
  the GitHub releases list and the Play Console releaseName column.
- softprops/action-gh-release now honors the is_prerelease output so
  dev-* releases sort under the latest v* and don't shadow "latest".

New main-gate.yml workflow:
- A required PR status check that enforces PRs to main must come from
  the dev branch. Failing fast on any other source means the release
  discipline (feature → dev → main) is mechanically enforced rather
  than left to convention.

Once this lands on main, the repo owner enables branch protection in
GitHub Settings → Branches:
- main: require PR, require status checks (test, build, enforce-source-is-dev),
  restrict who can push to the repo owner only.
- dev:  require PR, require status checks (test, build).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the new project site (https://ft8af.app) in three places where
it's natural for a user to land:

- README.md: a prominent "🌐 ft8af.app" line right under the tagline,
  so anyone browsing the repo on GitHub gets the link before the
  feature list.
- About dialog: new "Website" section above "Built by", clickable
  via LocalUriHandler in the same style as the existing QRZ author
  links. Tap to open in the browser.
- Splash screen: small "ft8af.app" line under the version footer.
  Same monospace family, slightly fainter so it doesn't fight the
  version number. Decorative only — splash is transient.

Intentionally left alone:
- The "FT8 · MOBILE COMPANION" subtitle on the splash. Three URLs
  near the top of the splash would be loud; the version footer is
  the natural place for the domain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
docs: surface ft8af.app site link
The car-dash TX-abort symptom (PTT keys → 250-300ms → PTT releases,
no audio sent) is still happening despite #84 shipping the libusb
nativeWrite. But the full TX output path is logged only to logcat, so
from debug.log there's no way to tell:

  1. Which output branch ran (USB direct vs. AudioTrack).
  2. If USB direct ran, which step failed before reaching writeAudio
     (device lookup, USB permission, open, hasOutput, activateOutput).

Same instrumentation pattern as the input side that surfaced the real
bugs in #82 / #83.

Changes:
- playFT8Signal: log the branch decision with audioOutputDeviceId and
  the saved USB output VID:PID. Log which branch was taken.
- playViaUsbAudio: fileLog at each failure point and at the success
  pivots (device opened + output activated, before writeAudio,
  writeAudio return value). Every failure path has a distinct
  message so the failure point is obvious from one log line.

After the next car-dash repro we'll know whether the abort is:
- audioOutputDeviceId not being -1 at TX time (picker reset?),
- device lookup failing (UsbManager state),
- permission lost on re-attach,
- activateOutput failing on the car-dash kernel,
- or actually reaching writeAudio and libusb dying inside.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
FT8TransmitSignal: instrument TX output path with fileLog
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>
Pairs with the live slider in Settings. 50% was conservative — on the
libusb USB-audio output path the rig input stage typically wants more
drive than that, and asking new users to discover the slider before
their first TX makes the rig look broken. 80% is a reasonable starting
point that produces audible drive on a typical rig without immediately
pegging ALC; users who want a different default tune it from the
slider and we persist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@patrickrb patrickrb changed the base branch from main to dev June 3, 2026 15:27
@patrickrb patrickrb changed the base branch from dev to main June 3, 2026 15:28
@patrickrb patrickrb merged commit f5e4ff6 into main Jun 3, 2026
2 of 4 checks passed
@patrickrb patrickrb deleted the feat/tx-volume-slider branch June 3, 2026 15:28
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