TX: add "Hold TX freq" setting (WSJT-X-style)#352
Open
patrickrb wants to merge 2 commits into
Open
Conversation
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 Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 insetTransmit(). - 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
holdTxFreqsetting (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: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
shouldFollowTargetFreq()predicate + 3 unit tests inFT8TransmitSignalTest.testDebugUnitTestgreen; 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).