Mark the CQ frequency on the bandmap and leave Run when the radio moves off it

Starting Run stores the frequency in the position. The bandmap draws a
purple, bold "CQ Frequency" pseudospot there, which is not added to the
shared bandmap, and a click on it tunes back and sets Run. A move of more
than 3 kHz (a setting on the telnet Filters tab) while running switches
to search and pounce.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 12:12:35 +00:00
co-authored by Claude Sonnet 5.5
parent ab98c1b871
commit 1e0fb3eb08
14 changed files with 154 additions and 15 deletions
@@ -25,6 +25,45 @@ public class OperatingPositionTests
CountryPrefix = "DL",
};
[Fact]
public void RunningRemembersTheFrequencyItStartedOn()
{
OperatingPosition position = Session();
position.Tune(Frequency.FromKilohertz(14_025));
position.IsRunning = true;
position.Tune(Frequency.FromKilohertz(14_026));
Assert.Equal(Frequency.FromKilohertz(14_025), position.CqFrequency);
Assert.True(position.IsRunning);
}
[Fact]
public void MovingFarOffTheCqFrequencyGoesBackToSearching()
{
OperatingPosition position = Session();
position.Tune(Frequency.FromKilohertz(14_025));
position.IsRunning = true;
position.Tune(Frequency.FromKilohertz(14_028.5));
Assert.False(position.IsRunning);
Assert.Equal(Frequency.FromKilohertz(14_025), position.CqFrequency);
}
[Fact]
public void TheDistanceThatEndsRunningIsSet()
{
OperatingPosition position = Session();
position.CqLeaveHertz = 1_000;
position.Tune(Frequency.FromKilohertz(14_025));
position.IsRunning = true;
position.Tune(Frequency.FromKilohertz(14_026.5));
Assert.False(position.IsRunning);
}
/// N1MM's `{FORCELOG}`: a contact the checks refuse still goes in the log,
/// because one that was never logged cannot be fixed afterwards.
[Fact]