Pileup: work the strongest caller first (opt-in) + SNR on caller-queue chips#692
Merged
Merged
Conversation
…ller chips) When running a pileup (calling CQ and getting several answers at once during a DXpedition, POTA activation, or contest), the caller queue always worked the oldest waiting station first (FIFO). On a busy run the best-copy stations then wait behind marginal ones, wasting cycles on exchanges that may not complete. Add an opt-in Auto-Sequence setting, "Work strongest caller first", that makes the auto-dequeue pick the highest-SNR waiting caller next instead (ties break toward the earliest-queued, so equal signals keep first-heard order). The selection policy is extracted to a pure, unit-tested CallerQueueOrdering.pickNextIndex; default is off, preserving the historic FIFO behavior for anyone who prefers it. The on-screen caller-queue chips now also show each waiting caller's SNR and sort strongest-first to match, so the operator can see at a glance who the engine will work next (and tap to pick someone else). - GeneralVariables.pileupStrongestFirst (DB key pileupStrongestFirst, default off) - CallerQueueOrdering pure policy; FT8TransmitSignal.dequeueNextCaller uses it - ActiveQsoPanel: orderCallerQueue + callerSnrLabel helpers, SNR chip label - Tests: CallerQueueOrderingTest (Java), CallerQueueDisplayTest (Kotlin) 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 #692 +/- ##
============================================
- Coverage 36.70% 36.68% -0.03%
Complexity 211 211
============================================
Files 222 222
Lines 27479 27500 +21
Branches 3395 3398 +3
============================================
+ Hits 10087 10089 +2
- Misses 17147 17166 +19
Partials 245 245
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
What & why
When you run a pileup — calling CQ and getting several answers in the same slot during a DXpedition, POTA activation, or contest — FT8AF queues the extra callers and works them one after another. Until now that queue was strict FIFO: the station that called earliest was always worked next, regardless of how well you were copying it. On a busy run that means strong, easy-to-complete stations sit waiting behind marginal ones, and you burn cycles on exchanges that may never finish.
This adds an opt-in operating option that lets the app work the strongest waiting caller next instead, so you complete the best-copy contacts first and keep the run moving.
What changed
Implementation
GeneralVariables.pileupStrongestFirst(persisted via DB keypileupStrongestFirst, default off;volatile— written on the UI thread, read on the transmit thread).CallerQueueOrdering.pickNextIndex(queue, strongestFirst);FT8TransmitSignal.dequeueNextCaller()now uses it instead ofremove(0).orderCallerQueue/callerSnrLabelextracted fromActiveQsoPanelfor testing.Tests
CallerQueueOrderingTest(Java, pure): FIFO vs. strongest-first selection, negative-SNR handling, tie-break to earliest, full-drain ordering, no-mutation, empty/null guards.CallerQueueDisplayTest(Kotlin, pure): display ordering mirrors the engine policy, stable-for-ties, SNR label formatting.Verification
./gradlew :app:testDebugUnitTest— full suite green../gradlew :app:assembleDebug— APK builds clean.