Skip to content

TX: add "Hold TX freq" setting (WSJT-X-style)#352

Open
patrickrb wants to merge 2 commits into
devfrom
feat/hold-tx-freq
Open

TX: add "Hold TX freq" setting (WSJT-X-style)#352
patrickrb wants to merge 2 commits into
devfrom
feat/hold-tx-freq

Conversation

@patrickrb

Copy link
Copy Markdown
Owner

Problem

Tester feedback: "transmission->TX/RX split option feeling invert. when I turn on it, I expect holding my freq and move RX freq only, but it move TX offset to QSO target."

In same-frequency (TX/RX split, synFrequency) mode, setTransmit() moves your TX offset onto the frequency of the station you answer (FT8TransmitSignal.java:328). There was no way to keep your own TX offset.

Change

New holdTxFreq setting (default off, persisted as "holdTxFreq", with a toggle in Transmission settings right under TX/RX split). When on, your TX offset is held when answering a station instead of moving to theirs — the WSJT-X "Hold Tx Freq" behavior.

The follow now goes through shouldFollowTargetFreq(synFrequency, holdTxFreq) = synFrequency && !holdTxFreq, so:

  • split off → never follows (unchanged),
  • split on, hold off → follows the target (unchanged default),
  • split on, hold on → holds your TX offset (new).

Default off keeps existing behavior identical until the operator opts in. Hound/DXpedition auto-QSY is untouched.

Scope note

This is the minimal "add a setting to hold TX" the tester asked for. The broader waterfall-tap semantics rework they also mused about ("change TX offset only whenever option activated or not") is intentionally not included here.

Tests

  • New shouldFollowTargetFreq() predicate + 3 unit tests in FT8TransmitSignalTest.
  • testDebugUnitTest green; built and installed on the Pixel 8, launches cleanly.

Part of a series addressing tester feedback on the Android UI (the TX/RX split item).

In same-frequency (TX/RX split) mode, setTransmit() moves your TX offset
onto the frequency of the station you answer. A tester found this
inverted: turning on TX/RX split unexpectedly moved their TX offset to
the QSO target.

Add a holdTxFreq setting (default off, persisted as "holdTxFreq", with a
toggle in Transmission settings under TX/RX split). When on, the TX
offset is kept on your own frequency when answering a station — the
WSJT-X "Hold Tx Freq" behavior. The follow now happens only when split
is on AND hold is off, via the pure shouldFollowTargetFreq() predicate,
which is unit-tested.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.45%. Comparing base (6bc083c) to head (6941f50).
⚠️ Report is 29 commits behind head on dev.

Files with missing lines Patch % Lines
...o/ks3ckc/ft8af/ui/settings/TransmissionSettings.kt 0.00% 11 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #352      +/-   ##
============================================
- Coverage     11.70%   11.45%   -0.26%     
- Complexity      113      120       +7     
============================================
  Files            85       89       +4     
  Lines         11691    12575     +884     
  Branches       2110     2248     +138     
============================================
+ Hits           1369     1441      +72     
- Misses        10191    11003     +812     
  Partials        131      131              
Files with missing lines Coverage Δ
...o/ks3ckc/ft8af/ui/settings/TransmissionSettings.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional WSJT-X-style “Hold TX freq” setting so operators can keep their TX offset when answering a station, instead of automatically moving TX onto the target’s frequency in synFrequency mode.

Changes:

  • Introduces holdTxFreq (default off), persists it via config ("holdTxFreq"), and exposes it in Transmission settings UI.
  • Refactors the “follow target frequency” decision into shouldFollowTargetFreq(synFrequency, holdTxFreq) and applies it in setTransmit().
  • Adds unit tests covering the new predicate behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ft8af/app/src/test/java/com/k1af/ft8af/ft8transmit/FT8TransmitSignalTest.java Adds unit tests for shouldFollowTargetFreq() decision logic.
ft8af/app/src/main/res/values/strings_compose.xml Adds new user-facing strings for the Hold TX frequency setting.
ft8af/app/src/main/kotlin/radio/ks3ckc/ft8af/ui/settings/TransmissionSettings.kt Adds the Hold TX frequency toggle and persists it to config.
ft8af/app/src/main/java/com/k1af/ft8af/GeneralVariables.java Adds global holdTxFreq setting flag.
ft8af/app/src/main/java/com/k1af/ft8af/ft8transmit/FT8TransmitSignal.java Uses shouldFollowTargetFreq() in setTransmit() and adds the predicate for testability.
ft8af/app/src/main/java/com/k1af/ft8af/database/DatabaseOpr.java Loads holdTxFreq from persisted config at startup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ft8af/app/src/main/java/com/k1af/ft8af/ft8transmit/FT8TransmitSignal.java Outdated
Comment thread ft8af/app/src/test/java/com/k1af/ft8af/ft8transmit/FT8TransmitSignalTest.java Outdated
Comment thread ft8af/app/src/main/java/com/k1af/ft8af/database/DatabaseOpr.java
Review nits:
- shouldFollowTargetFreq Javadoc + test comment called synFrequency
  "same-frequency (TX/RX split)", which is contradictory (split == TX!=RX).
  Reword to "TX=RX (synFrequency)" to match strings.xml ("TX=RX").
- Parse holdTxFreq like synFreq (any non-empty, non-"0" is true) instead of
  only exact "1", so the two boolean configs handle stored values consistently.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants