Spot a call locally and wipe when the radio moves far on a QSY

With a call in the entry window, a move of more than 2 kHz on the same
band puts the call on the bandmap where it was heard and wipes the boxes,
as N1MM does. The spot goes to the other stations as ADDSPOT and to the
Spots broadcast, never to the cluster. ADDSPOT from other stations is
added to the bandmap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 05:50:20 +00:00
co-authored by Claude Sonnet 5.5
parent 986f359a40
commit f784a73115
10 changed files with 215 additions and 3 deletions
@@ -495,6 +495,41 @@ public class StationLinkTests
Assert.Equal("RUN-PC", stacked[1].FromComputerName);
}
/// A spot put on one station's bandmap reaches the others with the
/// frequency, the time and the spotter intact.
[Fact]
public async Task ASpotIsPassedToTheOtherStations()
{
(int onePort, int twoPort) = SparePorts();
using StationLink one = new("RUN-PC", Version, stationNumber: 1, port: onePort);
using StationLink two = new("MULT-PC", Version, stationNumber: 2, port: twoPort);
one.Start();
two.Start();
List<SharedSpot> spots = [];
two.SpotArrived += (_, spot) => spots.Add(spot);
one.AddStation("MULT-PC", "127.0.0.1", twoPort);
await WaitForAsync(() => one.Stations.Any(s => s is { IsMine: false, IsConnected: true }));
DateTime at = new(2026, 10, 24, 13, 5, 9, DateTimeKind.Utc);
await one.SendSpotAsync(new SharedSpot(
"DL1ABC",
at,
Frequency.FromKilohertz(14_195.4),
"Local spot by OM5M",
Frequency.Zero,
"OM5M",
IsWorked: false));
await WaitForAsync(() => spots.Count == 1);
SharedSpot arrived = spots.Single();
Assert.Equal("DL1ABC", arrived.Call);
Assert.Equal(at, arrived.AtUtc);
Assert.Equal(14_195.4, arrived.Frequency.Kilohertz, 1);
Assert.Equal("Local spot by OM5M", arrived.Comment);
Assert.Equal("OM5M", arrived.Spotter);
Assert.False(arrived.IsWorked);
}
/// Two stations logging different contests would resynchronise into each
/// other's logs. Each says which contest it is on as soon as it connects.
[Fact]