Carry alternating CQ on after a contact

Alternating CQ ran off every message the keyer finished, so working a
station that answered started a CQ on the other radio, and Escape --
which stopped it outright -- was the way around that. It now follows
N1MM: only the CQ message carries the alternation to the other radio,
anything else holds it where it is, and so does Escape. The next CQ
picks it up again, which is what the CQ after a logged contact does, so
Ctrl+B is needed once rather than after every contact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-31 13:29:44 +00:00
parent 12dab9644a
commit 921033cd93
6 changed files with 99 additions and 10 deletions

View File

@@ -104,6 +104,44 @@ public class AlternatingCqTests
Assert.Equal([1, 2], called);
}
/// A message that is not a CQ leaves the CQ where it is, and the next CQ
/// carries the alternation on. This is what happens while a contact is
/// worked, and it is N1MM's rule.
[Fact]
public void WorkingAStationHoldsTheCqOnOneRadio()
{
FakeKeyer keyer = new();
List<int> called = [];
using AlternatingCq cq = Driving(keyer, called);
cq.Start(1);
cq.Hold();
keyer.FinishMessage();
keyer.FinishMessage();
Assert.Equal([1], called);
Assert.True(cq.IsRunning);
Assert.False(cq.CarriesOn);
}
/// The CQ that follows a logged contact starts the alternation again,
/// without the operator switching it back on.
[Fact]
public void TheNextCqCarriesTheAlternationOnAgain()
{
FakeKeyer keyer = new();
List<int> called = [];
using AlternatingCq cq = Driving(keyer, called);
cq.Start(1);
cq.Hold();
keyer.FinishMessage();
cq.CarryOn();
keyer.FinishMessage();
Assert.Equal([1, 2], called);
}
[Fact]
public void AKeyerThatCannotReportCompletionCannotDriveIt()
{